* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   THEME COLORS - Edit here to change theme
   ======================================== */
:root {
    /* Primary Theme Colors */
    --primary-blue: #2563eb;
    /* Blue-600 - Main brand color */
    --primary-indigo: #4f46e5;
    /* Indigo-600 - Secondary brand color */
    --text-dark: #0f172a;
    /* Slate-900 - Primary text */

    /* Background Colors */
    --bg-primary: #f8fafc;
    /* Slate-50 - Fallback for gradient */
    --bg-gradient: linear-gradient(to right bottom,
            oklch(0.984 0.003 247.858) 0%,
            oklch(0.97 0.014 254.604) 50%,
            oklch(0.962 0.018 272.314) 100%);
    /* Page background gradient */
    --bg-card: #ffffff;
    /* White - Card background */

    /* Text Colors */
    --text-primary: #0f172a;
    /* Slate-900 - Primary text */
    --text-secondary: #475569;
    /* Slate-600 - Secondary text */
    --text-muted: #94a3b8;
    /* Slate-400 - Muted text */

    /* Accent Colors */
    --accent-red: #ef4444;
    /* Red-500 - Subtle red for remove actions */

    /* Shadows */
    --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 4px 16px rgba(15, 23, 42, 0.1);
    --shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.12);
    --shadow-blue: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Distraction-Free Engine Mode */
body.engine-active .hero,
body.engine-active .pricing-container,
body.engine-active .user-reviews,
body.engine-active .trust-metrics,
body.engine-active .final-cta,
body.engine-active .problem-solution-section,
body.engine-active .score-improvement-banner {
    display: none !important;
}

body.engine-active .container {
    padding-top: 2rem;
    padding-bottom: 5rem;
}

/* New User Flow Adjustments (Issue: Remove Pricing from Landing) */
body.new-user-flow .nav-link[href="/pricing"],
body.new-user-flow .nav-mobile-link[href="/pricing"],
body.new-user-flow .footer-link[href="/pricing"],
body.new-user-flow .cta-secondary,
body.new-user-flow .pricing-container {
    display: none !important;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-indigo));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: #ffffff;
}

.logo-text span {
    color: var(--primary-indigo);
    font-weight: 700;
}

/* Desktop Navigation */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Nav Buttons */
.nav-btn-ghost {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-btn-ghost:hover {
    background: rgba(0, 0, 0, 0.04);
}

.nav-btn-solid {
    background: var(--text-dark);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-btn-solid:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.nav-mobile-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.nav-mobile-buttons .nav-btn-ghost,
.nav-mobile-buttons .nav-btn-solid {
    text-align: center;
    padding: 0.875rem 1.25rem;
    width: 100%;
}

#logoutBtnMobile {
    margin-top: 1rem;
    color: #ef4444; /* Make logout distinctly red on mobile */
    border: 1px solid #fee2e2;
    background: #fef2f2;
}

/* Mobile Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
.nav-mobile {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: -4px 0 24px rgba(14, 13, 12, 0.1);
    padding: 4rem 1.5rem 2rem;
    transition: right 0.3s ease;
    z-index: 1001; /* Above header */
    overflow-y: auto; /* Enable scroll for mobile logout reachability */
    -webkit-overflow-scrolling: touch;
}

.nav-mobile.active {
    right: 0;
}

.nav-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-mobile-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    padding: 0.875rem 0;
    text-align: center;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.nav-mobile-link:hover {
    color: var(--primary-blue);
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 13, 12, 0.4);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Main Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 1rem;
}

.hero-title {
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-title .highlight {
    color: var(--primary-blue);
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 1.25rem auto 0;
    font-weight: 400;
    line-height: 1.7;
}

/* Main Content */
.main-wrapper {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 0;
    /* Remove default padding for footer bar */
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.3s ease;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    /* For fixed footer and header */
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 700px;
}

/* Stepper Progress Bar */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem 1rem;
    background: transparent;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f8fafc;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid #e2e8f0;
}

.step-item.active .step-icon {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
}

.step-item.completed .step-icon {
    background: #eff6ff;
    color: #2563eb;
    border-color: #dbeafe;
}

.step-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8;
    transition: color 0.3s ease;
}

.step-item.active .step-label {
    color: #2563eb;
}

.step-line {
    flex: 0 0 15%;
    height: 2px;
    background: #f1f5f9;
    margin: 0 0.5rem;
    position: relative;
    top: -10px;
}

@media (max-width: 600px) {
    .stepper {
        padding: 1rem 1rem 0.5rem;
    }
    
    .step-icon {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .step-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .step-line {
        flex: 1;
        margin: 0 0.25rem;
        top: -6px; /* Adjust for smaller icons */
    }
}

@media (max-width: 480px) {
    .step-label {
        display: none; /* Hide labels on very small phones to avoid overlap */
    }
    
    .step-item {
        gap: 0;
    }
}

/* Content Area */
.step-content-wrapper {
    flex: 1;
    padding: 0.5rem 3rem 2rem;
    width: 100%;
}

.step-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.step-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.step-header p {
    font-size: 1.0625rem;
    color: #64748b;
}

/* Upload Zone - Premium Style */
.upload-zone {
    background: #ffffff;
    border: 1.5px dashed #cbd5e1;
    border-radius: 20px;
    padding: 1.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.upload-zone:hover {
    border-color: #3b82f6;
    background: #f8faff;
    transform: translateY(-2px);
}

.upload-icon-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 1.75rem;
}

.upload-icon-bg {
    width: 100%;
    height: 100%;
    background: #eff6ff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.upload-badge {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 28px;
    height: 28px;
    background: #2563eb;
    border: 2.5px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.upload-text {
    font-size: 1.1875rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.upload-text span {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.upload-subtext {
    color: #64748b;
}

/* Job Description & Strategy Step */
.strategy-wrapper {
    margin-top: 0;
    margin-bottom: 2rem;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.strategy-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.strategy-col {
    flex: 1 1 calc(33.33% - 1rem); /* 3 columns on desktop */
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.strategy-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #1e293b;
}

.strategy-select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #334155;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    cursor: pointer;
}

.strategy-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

@media (max-width: 767px) {
    .strategy-flex {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Job Description Textarea */
.textarea-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.job-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1.25rem;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    resize: none;
    transition: all 0.2s ease;
}

.job-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.char-count {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    pointer-events: none;
}

/* Status Banner */
.status-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    margin: 0 3rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    animation: slideUp 0.3s ease-out;
}

.status-banner-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.status-banner-text strong {
    font-size: 0.875rem;
    color: #0f172a;
    font-weight: 600;
}

.status-banner-text span {
    font-size: 0.75rem;
    color: #64748b;
}

.status-banner-sparkle {
    color: #fbbf24;
    animation: pulse 2s infinite;
}

/* Paste Divider Link */




/* Paste Resume Area Styles */




.sample-link {
    display: none;
}

/* File Upload Card */
.file-upload-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    max-width: 400px;
    margin: 0 auto;
    gap: 1rem;
    animation: fadeIn 0.3s ease;
}

.file-card-icon {
    width: 40px;
    height: 40px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-card-details {
    flex: 1;
    overflow: hidden;
    text-align: left;
}

.file-card-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-card-size {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

.file-remove-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.file-remove-btn:hover {
    background: #f1f5f9;
    color: #ef4444;
}

/* Action Footer Refinement */
.main-footer {
    padding: 1rem 3rem;
    background: #fcfdfe;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.security-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.security-info .lock-icon {
    font-size: 1rem;
}

.security-info .highlight {
    color: #2563eb;
    font-weight: 600;
}

.footer-actions {
    display: flex;
    gap: 1.25rem;
}

.generate-button {
    padding: 0.875rem 2.25rem;
    background: #4f46e5;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
    min-width: 260px;
    justify-content: center;
}

.generate-button:hover:not(:disabled) {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.25);
}

.generate-button:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

.sparkle-icon {
    font-size: 1.25rem;
}

.back-button {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* Results Placeholder */
.results-placeholder {
    text-align: center;
    padding: 2rem 0;
}

.results-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Sticky / Specific UI elements removal */
.cta-section,
.cta-meta,
.status-indicator {
    display: none;
}

.status-dot.ready {
    background: #22c55e;
    animation: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Features Banner */
.features-banner {
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 16px;
    padding: 1rem 2rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 880px;
    margin: 0 auto 1.25rem;
    animation: fadeIn 0.5s ease;
}

.features-banner .feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.features-banner .feature-item svg {
    color: var(--primary-blue);
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .features-banner {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 0.875rem 1.5rem;
    }

    .features-banner .feature-item {
        font-size: 0.8125rem;
    }
}

/* Security Message */
.security-message {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.security-message svg {
    color: #22c55e;
    flex-shrink: 0;
}


/* Hidden input - Force hide */
#fileInput {
    display: none !important;
    visibility: hidden;
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-wrapper {
    animation: fadeIn 0.6s ease;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--text-primary);
}

/* Mobile Responsive */
@media (max-width: 899px) {
    .nav-desktop {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-mobile {
        display: block;
    }

    .overlay {
        display: block;
    }

    .container {
        padding: 1.5rem 1rem; /* Reduced horizontal padding */
    }

    .main-wrapper {
        padding: 1rem 1rem; /* Crucial: Reduce side padding to avoid cramped UI */
    }

    .step-content-wrapper {
        padding: 0.5rem 0.5rem 1.5rem; /* Drastically reduce side padding for more JD room */
    }

    .step-header h2 {
        font-size: 1.5rem; /* Smaller header for mobile */
    }

    .step-header p {
        font-size: 0.9375rem;
    }

    .hero {
        margin-bottom: 1.5rem;
    }

    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }

    .grid {
        gap: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .upload-zone {
        padding: 1.5rem 1rem;
    }

    .job-textarea {
        resize: none;
        max-height: 400px;
        font-size: 0.9375rem;
        padding: 1rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .main-footer {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }

    .footer-actions {
        width: 100%;
        flex-direction: column-reverse; /* Put Back button below Generate on mobile */
    }

    .generate-button {
        width: 100%;
        min-width: unset;
    }

    .back-button {
        width: 100%;
    }

    .header {
        padding: 0.75rem 0; /* Slimmer header for better vertical space */
    }
}


/* ───────────────────────────────────────────
   PROCESSING OVERLAY (Layer 2 UX)
   Theme: Indigo (#4f46e5) & Slate (#f8fafc)
   ─────────────────────────────────────────── */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.processing-overlay.active {
    display: flex;
    opacity: 1;
}

.processing-card {
    background: #ffffff;
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
    max-width: 440px;
    width: 90%;
    border: 1px solid #e2e8f0;
    animation: slideUp 0.4s ease-out;
}

@media (max-width: 600px) {
    .processing-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .processing-title {
        font-size: 1.25rem;
    }
    
    .processing-subtitle {
        font-size: 0.875rem;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Icon & Spinner Wrapper */
.processing-icon-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.processing-icon {
    color: #4f46e5;
    z-index: 2;
}

.processing-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid #e0e7ff;
    /* Light indigo */
    border-top-color: #4f46e5;
    /* Primary indigo */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Typography */
.processing-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    /* Slate 800 */
    margin-bottom: 0.5rem;
}

.processing-subtitle {
    color: #64748b;
    /* Slate 500 */
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Progress Steps */
.processing-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.step-dot {
    width: 12px;
    height: 12px;
    background: #e2e8f0;
    border-radius: 50%;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.step-item.active .step-dot {
    background: #4f46e5;
    box-shadow: 0 0 0 4px #e0e7ff;
}

/* CHANGED: Use Indigo/Slate instead of Green for completed steps */
.step-item.completed .step-dot {
    background: #4f46e5;
    /* Indigo */
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.step-item.active .step-label {
    color: #4f46e5;
}

.step-item.completed .step-label {
    color: #1e293b;
    /* Slate 800 for completed */
}

.step-line {
    height: 2px;
    flex-grow: 1;
    background: #e2e8f0;
    width: 40px;
    /* Fixed width for connecting lines */
    transition: background 0.3s ease;
}

.step-item.completed+.step-line {
    background: #4f46e5;
    /* Indigo */
}

/* Master CV Selection Pills */
.master-cv-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 1.25rem 0.5rem 0.5rem;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 2px solid transparent;
    width: fit-content;
}

.master-cv-pill:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.master-cv-pill.selected {
    background: #6366f1;
    color: white;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.25);
}

.master-cv-pill.unselected {
    background: #f1f5f9;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
    .master-cv-pill {
        width: 100% !important;
        justify-content: flex-start;
    }
}

#masterCvCardsContainer,
#tailoredCvCardsContainer {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* ========================================
   NEW ENHANCEMENTS: HERO, METRICS, SCORE, REVIEWS
   ======================================== */

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.cta-primary {
    background: var(--primary-indigo);
    color: #ffffff;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.3);
}

.cta-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.4);
}

.cta-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border: 1.5px solid #e2e8f0;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cta-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.trust-metrics {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 3.5rem auto 4.5rem;
    flex-wrap: wrap;
    max-width: 1100px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    padding: 1.5rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.05); /* Very subtle brand tint */
    min-width: 200px;
    transition: all 0.3s ease;
}

.metric-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    border-color: rgba(37, 99, 235, 0.15);
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-indigo); /* Use brand color for values to pop */
    line-height: 1;
}

.metric-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-divider {
    display: none;
}

/* Score Improvement Visual */
.score-improvement-banner {
    margin-bottom: 5rem;
    display: flex;
    justify-content: center;
    padding: 0 1.5rem;
}

.score-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.08);
    max-width: 650px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.score-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 1.5rem;
}

.score-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.score-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.score-value {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
}

.score-box.original .score-value {
    color: #ef4444;
}

.score-box.optimized .score-value {
    color: #10b981;
}

.score-arrow {
    color: var(--primary-indigo);
}

.score-badge {
    background: #ecfdf5;
    color: #059669;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.score-caption {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* User Reviews Section */
.user-reviews {
    margin-top: 5rem;
    margin-bottom: 5rem;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.review-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    text-align: left;
    box-shadow: none;
    border: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.review-card:hover {
    transform: translateY(-2px);
}

.stars {
    color: #fbbf24;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

.review-text {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
    flex: 1;
}

.reviewer {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.reviewer strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.reviewer span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Final CTA Section */
.final-cta {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-indigo));
    border-radius: 30px;
    padding: 6rem 2rem;
    margin: 8rem 0;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.3);
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.cta-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.final-cta .cta-primary {
    background: #ffffff;
    color: var(--primary-indigo);
    box-shadow: 0 10px 20px -5px rgba(255, 255, 255, 0.2);
}

.final-cta .cta-primary:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(255, 255, 255, 0.3);
}

/* Consolidated Mobile Optimization (768px and below) */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }

    .container {
        padding: 1rem 0.75rem;
    }

    .main-wrapper {
        padding: 1.25rem 1rem !important;
        height: auto !important;
        min-height: 400px;
    }

    .hero {
        margin-bottom: 1rem;
    }

    .hero-title {
        font-size: 1.35rem !important;
        margin-bottom: 0.5rem;
        letter-spacing: -0.01em;
    }

    .hero-subtitle {
        font-size: 0.825rem !important;
        line-height: 1.4;
        margin-top: 0.4rem;
    }

    .hero-ctas {
        margin-top: 1.5rem;
        margin-bottom: 2rem;
        gap: 0.75rem;
        flex-direction: row;
    }

    .cta-primary, .cta-secondary {
        flex: 1;
        padding: 0.75rem 0.85rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .hero-tools-section {
        padding: 1.25rem !important;
        border-radius: 24px !important;
    }

    .score-improvement-banner {
        display: flex !important;
        gap: 1.25rem !important;
        align-items: center !important;
        justify-content: center !important;
        margin-bottom: 1.5rem !important;
        padding-bottom: 1.25rem !important;
        border-bottom: 1px solid rgba(226, 232, 240, 0.5) !important;
    }

    .score-box .score-label {
        font-size: 0.55rem !important;
    }

    .score-box .score-value {
        font-size: 1.15rem !important;
    }

    .stepper {
        padding: 0.5rem 0 1rem !important;
    }

    .step-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.75rem !important;
    }

    .step-icon svg {
        width: 14px !important;
        height: 14px !important;
    }

    .step-label {
        font-size: 0.55rem !important;
    }

    .step-line {
        top: -10px;
    }

    .step-header h2 {
        font-size: 1.15rem;
        margin-bottom: 0.5rem;
    }

    /* Trust Metrics - Robust 2 Column Flex Strategy */
    .trust-metrics {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.75rem !important;
        margin: 0 auto 3rem !important;
        padding: 0 0.5rem !important;
        width: 100% !important;
    }

    .metric-item {
        flex: 1 1 calc(50% - 0.75rem) !important;
        min-width: 0 !important;
        max-width: calc(50% - 0.375rem) !important;
        padding: 1.25rem 0.5rem !important;
        border-radius: 16px !important;
        background: #ffffff !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.03) !important;
        border: 1px solid rgba(37, 99, 235, 0.05) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .metric-value {
        font-size: 1.25rem !important;
    }

    .metric-label {
        font-size: 0.55rem !important;
        margin-top: 0.3rem;
    }

    .final-cta {
        padding: 4rem 2rem !important;
        margin: 5rem 1rem !important;
        border-radius: 28px !important;
    }

    .final-cta h2 {
        font-size: 1.4rem !important;
        margin-bottom: 0.75rem !important;
    }

    .final-cta p {
        font-size: 0.825rem !important;
        margin-bottom: 2rem !important;
    }

    .main-footer {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem !important;
    }

    .generate-button {
        width: 100%;
        min-width: 100%;
        padding: 0.9rem !important;
    }

    /* Reviews - Side-by-Side Flex Strategy */
    .reviews-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 1.25rem !important;
        padding: 1.5rem 1rem !important;
        margin-left: -1rem !important;
        margin-right: -1rem !important;
        width: 100vw !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x mandatory !important;
    }

    .review-card {
        flex: 0 0 280px !important;
        width: 280px !important;
        scroll-snap-align: center !important;
        margin: 0 !important;
        background: #ffffff !important;
        border-radius: 20px !important;
        padding: 1.5rem !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.03) !important;
        border: 1px solid rgba(0,0,0,0.03) !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .stars {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
    }

    .review-text {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1rem !important;
    }

    .reviewer strong {
        font-size: 0.8rem !important;
        display: block !important;
    }

    .reviewer span {
        font-size: 0.65rem !important;
    }

    .status-banner {
        display: none !important;
    }
}

/* New User Flow - Hide extra sections when ?new=true (Issue 1) */
body.new-user-flow .hero,
body.new-user-flow .trust-metrics,
body.new-user-flow .score-improvement-banner,
body.new-user-flow .pricing-container,
body.new-user-flow .user-reviews,
body.new-user-flow .final-cta,
body.new-user-flow footer,
body.new-user-flow #footer-placeholder {
    display: none !important;
}

body.new-user-flow .container {
    padding-top: 2rem;
}

body.new-user-flow .hero-tools-section {
    margin-top: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
}

/* Dashboard Card Inline Editing */
.resume-card .job-title[contenteditable="true"],
.resume-card .company-name[contenteditable="true"] {
    outline: none;
    border-bottom: 2px dashed var(--primary-blue);
    background: rgba(37, 99, 235, 0.05);
    border-radius: 4px;
    padding: 2px 4px;
    margin-left: -4px;
    cursor: text;
}

.resume-card .job-title[contenteditable="true"]:focus,
.resume-card .company-name[contenteditable="true"]:focus {
    background: rgba(37, 99, 235, 0.1);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.edit-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save-inline {
    background: #dcfce7;
    color: #15803d;
}

.btn-save-inline:hover {
    background: #bbf7d0;
}

.btn-cancel-inline {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-cancel-inline:hover {
    background: #fecaca;
}

/* Loading State for Buttons (Issue 4) */
.generate-btn.loading-state {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.generate-btn.loading-state::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin-loader 0.8s linear infinite;
}

@keyframes spin-loader {
    to { transform: rotate(360deg); }
}

@keyframes pulse-soft {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.verifying-text {
    animation: pulse-soft 1.5s infinite ease-in-out;
}

/* ========================================
   PROBLEM VS SOLUTION SECTION (BESPOKE)
   ======================================== */
.problem-solution-section {
    padding: 10rem 2rem;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.problem-solution-container {
    max-width: 1200px;
    margin: 0 auto;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
}

.comparison-card {
    background: #ffffff;
    border-radius: 32px;
    padding: 4rem 3.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
}

.comparison-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08);
}

.card-status-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    border-radius: 99px;
}

/* Problem Card (The Old Way) */
.problem-card {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border-color: #e2e8f0;
}

.problem-badge {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.problem-card .comparison-title {
    color: #1e293b;
}

.problem-icon {
    background: #fee2e2;
    color: #ef4444;
}

/* Solution Card (The CVGlide Way) */
.solution-card {
    background: #ffffff;
    border: 2px solid #4f46e5;
    box-shadow: 0 20px 40px -15px rgba(79, 70, 229, 0.15);
}

.solution-card:hover {
    box-shadow: 0 30px 60px -15px rgba(79, 70, 229, 0.25);
}

.solution-badge {
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.solution-card .comparison-title {
    color: #4f46e5;
}

.solution-icon {
    background: #d1fae5;
    color: #059669;
}

.comparison-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.comparison-desc {
    font-size: 1.0625rem;
    color: #64748b;
    margin-bottom: 3rem;
    line-height: 1.6;
    max-width: 400px;
}

.comparison-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.comparison-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.comparison-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.comparison-item:hover .comparison-icon-box {
    transform: scale(1.1) rotate(-5deg);
}

.comparison-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.comparison-text strong {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
}

.comparison-text span {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.5;
}

/* Solution Specific Enhancements */
.solution-card .comparison-text strong {
    color: #0f172a;
}

.brand-glow {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .comparison-grid {
        gap: 2rem;
    }
    
    .comparison-card {
        padding: 3.5rem 2.5rem;
    }
}

@media (max-width: 850px) {
    .problem-solution-section {
        padding: 4rem 1rem;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .comparison-card {
        padding: 2rem 1rem;
        border-radius: 20px;
    }
    
    .comparison-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .comparison-desc {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
        display: none; /* Hide desc on tablet already to save space */
    }
    
    .comparison-list {
        gap: 1.25rem;
    }
    
    .comparison-item {
        gap: 0.5rem;
        flex-direction: column; /* Vertical on mobile for more text room */
        align-items: flex-start;
    }
    
    .comparison-icon-box {
        width: 28px;
        height: 28px;
        border-radius: 6px;
    }
    
    .comparison-icon-box svg {
        width: 12px;
        height: 12px;
    }
    
    .comparison-text strong {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .comparison-text span {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .card-status-badge {
        display: none;
    }
}

@media (max-width: 600px) {
    .problem-solution-section {
        padding: 2rem 0.75rem;
    }

    .comparison-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        align-items: stretch;
    }

    .comparison-card {
        padding: 1.25rem 0.65rem;
        border-radius: 16px;
        overflow: hidden;
    }

    .comparison-title {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
        line-height: 1.2;
        letter-spacing: -0.01em;
    }

    .comparison-text strong {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .comparison-text span {
        font-size: 0.65rem;
        line-height: 1.3;
        opacity: 0.8;
    }

    .comparison-icon-box {
        width: 20px;
        height: 20px;
        border-radius: 5px;
    }

    .comparison-icon-box svg {
        width: 10px;
        height: 10px;
    }

    .comparison-list {
        gap: 0.75rem;
    }

    .comparison-desc {
        display: none;
    }
}

/* ========================================
   FEATURE DEEP DIVE (3-COLUMN MOAT)
   ======================================== */
.features-deep-dive {
    padding: 8rem 2rem;
    background: #ffffff;
}

.features-grid-container {
    max-width: 1200px;
    margin: 0 auto;
}

.features-header {
    text-align: center;
    margin-bottom: 5rem;
}

.features-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.features-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.features-three-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.deep-feature-card {
    padding: 3rem 2.5rem;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.deep-feature-card:hover {
    transform: translateY(-8px);
    border-color: #4f46e5;
    box-shadow: 0 20px 40px -15px rgba(79, 70, 229, 0.1);
}

.deep-feature-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    color: #4f46e5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.deep-feature-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
}

.deep-feature-card p {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
}


/* Engine Mode Integration */
body.engine-active .features-deep-dive {
    display: none !important;
}

/* Mobile Adjustments for New Sections */
@media (max-width: 991px) {
    .features-deep-dive {
        padding: 5rem 1rem;
    }

    .features-header {
        margin-bottom: 3.5rem;
    }

    .features-three-col {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 1.5rem;
        padding: 1rem 1.5rem 2rem;
        margin-left: -1rem;
        margin-right: -1rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        /* Removed scrollbar hiding logic to allow default browser indicators */
    }

    .deep-feature-card {
        flex: 0 0 300px;
        width: 300px;
        scroll-snap-align: center;
        padding: 2.5rem 2rem;
        border-radius: 24px;
        text-align: left;
    }

    .deep-feature-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 1.5rem;
        border-radius: 10px;
    }

    .deep-feature-icon svg {
        width: 20px;
        height: 20px;
    }

    .deep-feature-card h3 {
        font-size: 1.15rem;
        margin-bottom: 0.75rem;
    }

    .deep-feature-card p {
        font-size: 0.9375rem;
        line-height: 1.6;
    }

    .features-title {
        font-size: 1.75rem;
    }

    .features-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .deep-feature-card {
        flex: 0 0 280px;
        width: 280px;
    }

    .features-title {
        font-size: 1.5rem;
    }
}

/* Engine Preview & Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: clamp(1.15rem, 4vw, 2rem);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.hero-tools-section {
    max-width: 850px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.4);
    padding: 2.5rem;
    border-radius: 32px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.score-improvement-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    padding-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .hero-tools-section {
        padding: 1.5rem 1rem;
        border-radius: 24px;
    }
    
    .score-improvement-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .score-improvement-banner > div:nth-child(2) {
        display: none; /* Hide the vertical divider on mobile */
    }
}

