/* ============================================
   ResumeAI Pro — Premium Styles
   ============================================ */

/* === CSS Variables === */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-elevated: #1e1e2a;
    --bg-input: #1a1a26;

    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;
    --text-accent: #c4b5fd;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #a78bfa;
    --accent-glow: rgba(99, 102, 241, 0.25);

    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.12);
    --danger: #f43f5e;
    --danger-bg: rgba(244, 63, 94, 0.12);
    --info: #38bdf8;
    --info-bg: rgba(56, 189, 248, 0.12);

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(99, 102, 241, 0.3);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* === Reset === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* === Animated Background === */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}

.bg-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #6366f1, transparent 70%);
    top: -200px;
    right: -100px;
    animation: float1 20s ease-in-out infinite;
}

.bg-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation: float2 25s ease-in-out infinite;
}

.bg-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #a78bfa, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float3 15s ease-in-out infinite;
    opacity: 0.15;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-30px, 40px); }
    66% { transform: translate(20px, -30px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(40px, -30px); }
    66% { transform: translate(-20px, 40px); }
}

@keyframes float3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    display: flex;
}

.logo-pro {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.nav-link.active {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.12);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 1px;
}

.nav-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* === Page System === */
.page {
    display: none;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-top: 64px;
}

.page.active {
    display: block;
}

/* === Upload Page === */
.upload-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.upload-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-tertiary);
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #6366f1, #a78bfa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Upload Zone */
.upload-zone-wrapper {
    position: relative;
}

.upload-zone {
    position: relative;
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: rgba(99, 102, 241, 0.03);
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.upload-zone:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.06);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.upload-zone:hover::before {
    opacity: 1;
}

.upload-zone.drag-over {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-4px);
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.2);
}

.upload-zone-inner {
    position: relative;
    z-index: 1;
}

.upload-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.upload-icon-ring {
    position: absolute;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.15);
    animation: ring-pulse 3s ease-in-out infinite;
}

@keyframes ring-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0; }
}

.upload-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.upload-formats {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Upload Divider */
.upload-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.divider-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Upload Sources */
.upload-sources {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.source-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 100px;
}

.source-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-2px);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.source-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.source-btn:hover .source-icon {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-tertiary);
}

.source-icon.gdrive { color: #4285f4; }
.source-icon.dropbox { color: #0061ff; }
.source-icon.onedrive { color: #0078d4; }
.source-icon.linkedin { color: #0a66c2; }

.source-btn:hover .source-icon.gdrive { background: rgba(66, 133, 244, 0.15); }
.source-btn:hover .source-icon.dropbox { background: rgba(0, 97, 255, 0.15); }
.source-btn:hover .source-icon.onedrive { background: rgba(0, 120, 212, 0.15); }
.source-btn:hover .source-icon.linkedin { background: rgba(10, 102, 194, 0.15); }

/* File Preview */
.file-preview {
    margin-top: 1.5rem;
    animation: slideUp 0.4s ease;
}

.file-preview.hidden {
    display: none;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.file-icon-wrapper {
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.file-remove:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

.analyze-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.analyze-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.analyze-btn:hover::before {
    transform: translateX(100%);
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
}

.analyze-btn:active {
    transform: translateY(0);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-tertiary);
}

.stat-label {
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-subtle);
}

/* === Loading Page === */
.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px);
    padding: 2rem;
}

.loading-card {
    text-align: center;
    max-width: 420px;
    width: 100%;
}

.loading-animation {
    margin-bottom: 2rem;
}

.scanner-doc {
    position: relative;
    width: 120px;
    height: 160px;
    margin: 0 auto;
}

.scanner-page {
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scanner-page > div {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
}

.scanner-line-1 { width: 70%; }
.scanner-line-2 { width: 100%; }
.scanner-line-3 { width: 85%; }
.scanner-line-4 { width: 60%; }
.scanner-line-5 { width: 90%; }

.scanner-beam {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
    border-radius: 2px;
    animation: scan 2s ease-in-out infinite;
    box-shadow: 0 0 20px var(--accent-glow), 0 2px 30px rgba(99, 102, 241, 0.3);
}

@keyframes scan {
    0%, 100% { top: 0; }
    50% { top: calc(100% - 3px); }
}

.loading-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.loading-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.loading-progress {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
    transition: width 0.3s ease;
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.loading-step.active {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
}

.loading-step.completed {
    color: var(--success);
}

.step-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    position: relative;
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.loading-step.active .step-indicator {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.2);
}

.loading-step.active .step-indicator::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.loading-step.completed .step-indicator {
    border-color: var(--success);
    background: var(--success);
}

.loading-step.completed .step-indicator::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: white;
    font-weight: 700;
    animation: none;
}

/* === Analysis Page === */
.analysis-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Score Sidebar */
.score-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.score-card-main {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
}

.score-card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.score-circle-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 1rem;
}

.score-circle {
    width: 100%;
    height: 100%;
}

.score-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.score-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.score-total {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.score-issues {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Score Categories */
.score-categories {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.score-category {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.score-category:last-child {
    border-bottom: none;
}

.score-category:hover {
    background: rgba(255,255,255,0.02);
}

.category-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.category-status.good { background: var(--success); box-shadow: 0 0 8px rgba(52, 211, 153, 0.4); }
.category-status.warning { background: var(--warning); box-shadow: 0 0 8px rgba(251, 191, 36, 0.4); }
.category-status.bad { background: var(--danger); box-shadow: 0 0 8px rgba(244, 63, 94, 0.4); }

.category-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.category-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-score {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
}

.category-score.good { background: var(--success-bg); color: var(--success); }
.category-score.warning { background: var(--warning-bg); color: var(--warning); }
.category-score.bad { background: var(--danger-bg); color: var(--danger); }

.category-chevron {
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: transform var(--transition-fast);
}

.improve-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-normal);
}

.improve-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
}

/* Analysis Main Content */
.analysis-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.analysis-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-icon { background: rgba(99, 102, 241, 0.12); color: var(--accent-primary); }
.roles-icon { background: rgba(139, 92, 246, 0.12); color: var(--accent-secondary); }
.tips-icon { background: rgba(251, 191, 36, 0.12); color: var(--warning); }
.ats-icon { background: rgba(52, 211, 153, 0.12); color: var(--success); }
.preview-icon { background: rgba(56, 189, 248, 0.12); color: var(--info); }

.section-header h2 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.section-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--info-bg);
    color: var(--info);
}

.section-badge.good { background: var(--success-bg); color: var(--success); }
.section-badge.warning { background: var(--warning-bg); color: var(--warning); }
.section-badge.bad { background: var(--danger-bg); color: var(--danger); }

/* Checklist */
.checklist {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}

.checklist-item:hover {
    background: rgba(255,255,255,0.04);
}

.check-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
}

.check-icon.pass {
    background: var(--success-bg);
    color: var(--success);
    border: 1.5px solid rgba(52, 211, 153, 0.3);
}

.check-icon.fail {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1.5px solid rgba(244, 63, 94, 0.3);
}

.check-icon.warn {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1.5px solid rgba(251, 191, 36, 0.3);
}

.check-label {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.check-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
    white-space: nowrap;
}

.check-tag.no-issues { background: var(--success-bg); color: var(--success); }
.check-tag.issues { background: var(--danger-bg); color: var(--danger); }
.check-tag.minor { background: var(--warning-bg); color: var(--warning); }

/* Job Roles Grid */
.job-roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.job-role-card {
    padding: 1.25rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.job-role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.job-role-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.job-role-card:hover::before {
    opacity: 1;
}

.job-role-match {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 0.75rem;
}

.job-role-match.high { background: var(--success-bg); color: var(--success); }
.job-role-match.medium { background: var(--warning-bg); color: var(--warning); }
.job-role-match.low { background: var(--info-bg); color: var(--info); }

.job-role-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.job-role-description {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.job-role-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0.75rem;
}

.job-role-skill {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

/* Improvements List */
.improvements-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.improvement-card {
    padding: 1.25rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent-primary);
    transition: all var(--transition-fast);
}

.improvement-card:hover {
    background: rgba(255,255,255,0.04);
}

.improvement-card.high-priority {
    border-left-color: var(--danger);
}

.improvement-card.medium-priority {
    border-left-color: var(--warning);
}

.improvement-card.low-priority {
    border-left-color: var(--success);
}

.improvement-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.improvement-title {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.improvement-priority {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
}

.improvement-priority.high { background: var(--danger-bg); color: var(--danger); }
.improvement-priority.medium { background: var(--warning-bg); color: var(--warning); }
.improvement-priority.low { background: var(--success-bg); color: var(--success); }

.improvement-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.improvement-example {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.06);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.1);
    font-size: 0.82rem;
    color: var(--text-accent);
}

.improvement-example strong {
    color: var(--accent-tertiary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ATS Detail */
.ats-detail-card {
    padding: 0.5rem 0;
}

.ats-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.ats-description strong {
    color: var(--text-primary);
}

.ats-parse-visual {
    margin-top: 1.5rem;
    text-align: center;
}

.ats-progress-track {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 5px;
    position: relative;
    margin-bottom: 1rem;
    overflow: visible;
}

.ats-progress-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--danger), var(--warning), var(--success));
    transition: width 1.5s ease;
    width: 0%;
}

.ats-progress-marker {
    position: absolute;
    top: -6px;
    transition: left 1.5s ease;
    left: 0%;
}

.ats-parse-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.ats-parse-text strong {
    color: var(--text-primary);
}

/* Resume Preview */
.preview-toggle {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
}

.toggle-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-primary);
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toggle-btn.active {
    background: var(--accent-primary);
    color: white;
}

.toggle-btn:hover:not(.active) {
    color: var(--text-primary);
}

.resume-preview-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    color: #1a1a2e;
    min-height: 400px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.resume-preview-card h3 {
    font-family: var(--font-display);
    color: #1a1a2e;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.resume-preview-card .resume-subtitle {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.resume-preview-card .resume-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.78rem;
    color: #666;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-primary);
}

.resume-section-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1a1a2e;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #e0e0e0;
    margin: 1.25rem 0 0.75rem;
}

.resume-preview-card p {
    color: #444;
    margin-bottom: 0.5rem;
}

.resume-preview-card ul {
    padding-left: 1.25rem;
    color: #444;
}

.resume-preview-card li {
    margin-bottom: 0.3rem;
}

.resume-skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.resume-skill-tag {
    padding: 3px 10px;
    background: #f0f0ff;
    border-radius: 4px;
    font-size: 0.78rem;
    color: var(--accent-primary);
    font-weight: 500;
}

/* === Builder Page === */
.builder-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.builder-header {
    text-align: center;
    margin-bottom: 2rem;
}

.builder-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.builder-header p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.builder-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
}

.download-btn.secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
}

.download-btn.secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-sm);
}

.builder-content {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.resume-document {
    background: white;
    border-radius: var(--radius-md);
    padding: 2.5rem 3rem;
    color: #1a1a2e;
    min-height: 800px;
    font-size: 0.88rem;
    line-height: 1.65;
    box-shadow: var(--shadow-md);
}

.resume-document h2 {
    font-family: var(--font-display);
    color: #1a1a2e;
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.resume-document .res-title {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.resume-document .res-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.82rem;
    color: #666;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2.5px solid var(--accent-primary);
}

.resume-document .res-section-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-primary);
    padding-bottom: 0.4rem;
    border-bottom: 1.5px solid #e0e0e0;
    margin: 1.5rem 0 0.75rem;
}

.resume-document .res-entry {
    margin-bottom: 1rem;
}

.resume-document .res-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.3rem;
}

.resume-document .res-entry-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #1a1a2e;
}

.resume-document .res-entry-date {
    font-size: 0.78rem;
    color: #888;
}

.resume-document .res-entry-subtitle {
    font-size: 0.82rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.resume-document p {
    color: #444;
    margin-bottom: 0.5rem;
}

.resume-document ul {
    padding-left: 1.25rem;
    color: #444;
}

.resume-document li {
    margin-bottom: 0.35rem;
}

.resume-document .res-skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.5rem;
}

.resume-document .res-skill-tag {
    padding: 4px 12px;
    background: #f0f0ff;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 500;
}

/* === Toast Notifications === */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

.toast-icon {
    font-size: 1.1rem;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* === Score Color Classes === */
.score-good { color: var(--success); }
.score-warning { color: var(--warning); }
.score-bad { color: var(--danger); }

/* === Responsive === */
@media (max-width: 1024px) {
    .analysis-container {
        grid-template-columns: 1fr;
    }

    .score-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .score-card-main {
        grid-column: 1 / -1;
    }

    .improve-btn {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .upload-sources {
        flex-wrap: wrap;
    }

    .source-btn {
        min-width: 80px;
        padding: 0.75rem;
    }

    .stats-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .score-sidebar {
        grid-template-columns: 1fr;
    }

    .job-roles-grid {
        grid-template-columns: 1fr;
    }

    .builder-actions {
        flex-direction: column;
    }

    .resume-document {
        padding: 1.5rem;
    }

    .navbar {
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
    }
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* === Selection === */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}

/* === Highlight animation for enhanced sections === */
.highlight-new {
    animation: highlightPulse 2s ease;
}

@keyframes highlightPulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 0 20px 4px rgba(99, 102, 241, 0.2); }
    100% { box-shadow: none; }
}
