/* Dashboard Styles */
.dashboard-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.dashboard-header h1 {
    font-size: 32px;
    color: #333;
    margin: 0;
}

.user-info {
    text-align: right;
}

.user-email {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.user-tier {
    display: inline-block;
}

.tier-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.tier-badge.tier-free {
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    color: #333;
}

.tier-badge.tier-starter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tier-badge.tier-pro {
    background: linear-gradient(135deg, #94C003 0%, #FF9A51 100%);
    color: white;
}

.tier-badge.tier-business {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* Stats Section */
.stats-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stats-section h2 {
    font-size: 24px;
    color: #333;
    margin: 0 0 20px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(148, 192, 3, 0.05) 0%, rgba(255, 154, 81, 0.05) 100%);
    border: 2px solid #94C003;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #94C003;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.usage-limit {
    margin-top: 20px;
}

.limit-bar {
    width: 100%;
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.limit-progress {
    height: 100%;
    background: linear-gradient(135deg, #94C003 0%, #FF9A51 100%);
    transition: width 0.3s ease;
    border-radius: 6px;
}

.limit-text {
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* File History Section */
.file-history-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    min-height: 400px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.tier-requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(148, 192, 3, 0.1);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #94C003;
}

.tier-requirement .lock-icon {
    font-size: 16px;
}

/* Blurred File History for Free Users */
.file-history-section.locked {
    pointer-events: none;
}

.file-history-section.locked .file-history-content {
    filter: blur(5px);
    -webkit-filter: blur(5px);
    opacity: 0.4;
}

.file-history-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 12px;
    z-index: 10;
    pointer-events: auto;
}

.overlay-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
}

.lock-icon-large {
    font-size: 72px;
    margin-bottom: 20px;
}

.overlay-content h3 {
    font-size: 28px;
    color: #333;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.overlay-content p {
    font-size: 16px;
    color: #666;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    text-align: left;
}

.feature-list li {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    padding-left: 8px;
}

.upgrade-btn-large {
    display: inline-block;
    background: linear-gradient(135deg, #94C003 0%, #FF9A51 100%);
    color: white;
    padding: 16px 48px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(148, 192, 3, 0.3);
}

.upgrade-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(148, 192, 3, 0.4);
}

/* Files Table */
.files-table-container {
    overflow-x: auto;
}

.files-table {
    width: 100%;
    border-collapse: collapse;
}

.files-table thead {
    background: #f8f8f8;
}

.files-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.files-table td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #666;
}

.files-table tbody tr {
    transition: background 0.2s ease;
}

.files-table tbody tr:hover {
    background: #f8f8f8;
}

.mode-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.mode-badge.mode-bw {
    background: #333;
    color: white;
}

.mode-badge.mode-color {
    background: linear-gradient(135deg, #94C003 0%, #FF9A51 100%);
    color: white;
}

.mode-badge.mode-upscale {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-download {
    background: linear-gradient(135deg, #94C003 0%, #FF9A51 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(148, 192, 3, 0.3);
}

.btn-download:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Logout link */
#logout-link {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

#logout-link:hover {
    color: #94C003;
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #94C003;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .user-info {
        text-align: left;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .files-table {
        font-size: 12px;
    }

    .files-table th,
    .files-table td {
        padding: 8px;
    }

    .overlay-content {
        padding: 20px;
    }

    .overlay-content h3 {
        font-size: 22px;
    }

    .lock-icon-large {
        font-size: 48px;
    }
}
