:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #f8fafc;
    --text-color: #1e293b;
    --text-light: #475569;
    --border-color: #e2e8f0;
    --gradient-start: #3b82f6;
    --gradient-end: #8b5cf6;
    --dark-bg: #0f172a;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--secondary-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 64px;
}

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

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-color);
    letter-spacing: -0.025em;
}

/* Mobile Menu Button - Hidden on desktop, shown on mobile */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-color);
}

/* Desktop: hide mobile menu button, show nav-links */
@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }

    .nav-links {
        display: flex;
        gap: 2rem;
    }

    .nav-actions {
        display: flex;
    }
}

/* Mobile: show menu button, hide nav-links by default */
@media (max-width: 767px) {
    .nav-container {
        position: relative;
        justify-content: center;
        /* Center the logo */
    }

    .logo {
        margin: 0;
        z-index: 1002;
        /* Ensure logo is clickable */
    }

    .mobile-menu-btn {
        display: flex;
        position: absolute;
        left: 1rem;
        z-index: 1003;
        /* Ensure button is on top */
        top: 50%;
        transform: translateY(-50%);
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        z-index: 999;
        max-height: calc(100vh - 64px);
        /* Prevent overflow */
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 1rem;
        /* Larger touch target */
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
        /* Larger text */
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-actions {
        display: flex;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }

    .nav-actions .btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-switch {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    border-color: var(--text-color);
    background: white;
}

/* =========================================
   Preloader
   ========================================= */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(37, 99, 235, 0.2);
    /* Brand Blue faint */
    border-radius: 50%;
    border-top-color: #2563eb;
    /* Brand Blue */
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Home Page specific styles */
.hero-section {
    background-color: var(--dark-bg);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(139, 92, 246, 0.1) 50%, transparent 70%);
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    padding: 0 1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

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

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

.hero-subtitle {
    font-size: 1.125rem;
    color: #94a3b8;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    margin-bottom: 4rem;
    display: flex;
    justify-content: center;
}

.hero-form {
    display: flex;
    gap: 1rem;
    /* Increased gap for better separation */
    max-width: 700px;
    /* Slightly wider container */
    width: 100%;
    position: relative;
    align-items: center;
    /* Ensure vertical center alignment */
}

.hero-input {
    flex: 0 0 calc(50% - 0.5rem);
    width: calc(50% - 0.5rem);
    min-width: 0;
    /* Takes exactly half space minus gap */
    padding: 0 2rem;
    /* Comfortable horizontal padding */
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Slightly clearer border */
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(12px);
    /* smoother blur */
    font-size: 1.125rem;
    /* Larger text */
    height: 64px;
    /* Taller for better presence */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.hero-input:focus {
    border-color: #60a5fa;
    /* Light blue focus */
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(96, 165, 250, 0.3);
    outline: none;
}

.hero-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.hero-btn {
    flex: 0 0 calc(50% - 0.5rem);
    width: calc(50% - 0.5rem);
    min-width: 0;
    /* Takes exactly half space minus gap */
    white-space: nowrap;
    height: 64px;
    /* Match input height */
    padding: 0;
    /* Centered by flex */
    border-radius: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    /* Center text */
    align-items: center;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    /* Vivid gradient */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle border for popped look */
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Ensure strictly substantial width */
}

.hero-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    filter: brightness(1.1);
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background: white;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.125rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    padding: 2rem;
    border-radius: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-desc {
    color: var(--text-light);
    line-height: 1.6;
}

/* Page Headers (New for Blog/Cases) */
.page-header {
    background-color: var(--secondary-color);
    padding: 100px 0 60px;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Blog/Case Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Blog/Case Cards */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-image-wrapper {
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #e2e8f0;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #eff6ff;
    color: var(--primary-color);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    width: fit-content;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--text-color);
}

.card-desc {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #94a3b8;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
}

/* Featured Post (Blog) */
.featured-post {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .featured-post .card {
        flex-direction: row;
    }

    .featured-post .card-image-wrapper {
        width: 50%;
        aspect-ratio: auto;
    }

    .featured-post .card-content {
        width: 50%;
        justify-content: center;
        padding: 3rem;
    }

    .featured-post .card-title {
        font-size: 2rem;
    }

    .featured-post .card-desc {
        font-size: 1.125rem;
    }
}

/* Create Page Specifics */
.analysis-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 100px 1rem 2rem;
}

.analysis-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.3;
}

.analysis-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.analysis-header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

main {
    margin-bottom: 4rem;
}

.form-card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    max-width: 100%;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

/* Align Core + Competitor ASIN textareas when side-by-side */
@media (min-width: 768px) {
    .form-grid .form-group {
        display: flex;
        flex-direction: column;
    }
    .form-grid .form-group label {
        min-height: 2.25rem;
        display: flex;
        align-items: center;
    }
    .form-grid .form-group .helper-text {
        min-height: 2.5rem;
    }
    .form-grid .form-group textarea {
        flex: 1;
        min-height: 120px;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group .helper-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

textarea,
input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: #f8fafc;
    font-family: inherit;
    font-size: 0.875rem;
    transition: all 0.2s;
    color: var(--text-color);
}

select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    /* Extra right padding for icon */
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: #f8fafc;
    font-family: inherit;
    font-size: 0.875rem;
    transition: all 0.2s;
    color: var(--text-color);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    /* Distance from right border */
    background-size: 1rem;
    cursor: pointer;
}

textarea:focus,
select:focus,
input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Dark mode override for select icon */
body.dark-theme select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2e8f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Spinner Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.config-section {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    margin-top: 1rem;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .config-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
}

.config-grid .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.config-grid select {
    width: 100%;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 2rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    opacity: 0.95;
}

/* File Upload Area */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }
}

.file-upload-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.file-upload-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
}

.file-upload-btn:hover {
    background: var(--primary-hover);
}

.file-clear-btn {
    padding: 0.5rem 0.75rem;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.file-clear-btn:hover {
    background: #fecaca;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0 0;
}

.file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.file-list li:last-child {
    margin-bottom: 0;
}

.file-list .file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    min-width: 0;
}

.file-list .file-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-list .file-size {
    color: var(--text-light);
    font-size: 0.75rem;
}

.file-list .file-delete {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s;
}

.file-list .file-delete:hover {
    color: #b91c1c;
}

/* Config Title */
.config-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

/* Prompt Section */
.prompt-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.prompt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.prompt-chip {
    padding: 0.5rem 1rem;
    background: #eff6ff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.prompt-chip:hover,
.prompt-chip.active {
    background: var(--primary-color);
    color: white;
}

/* Modal */
/* Modal - Dark Theme */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #0f172a;
    /* Slate 900 */
    border-radius: 1.25rem;
    padding: 2.5rem;
    max-width: 480px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.25rem;
    color: #cbd5e1;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.modal-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: white;
}

.modal-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Modal Inputs Overrides */
.modal-content input,
.modal-content select {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background: #1e293b;
    /* Slate 800 */
    border: 1px solid #334155;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.modal-content input:focus,
.modal-content select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.modal-content label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.9rem;
}

.modal-content .form-group {
    margin-bottom: 1.25rem;
}

.modal-content .submit-btn {
    margin-top: 1rem;
    width: 100%;
}

/* Simple Footer */
.footer-simple {
    text-align: center;
    padding: 2rem 0;
}

.footer-simple p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.footer {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

/* Footer Top - Brand + Tagline */
.footer-top {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.footer-logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    color: var(--text-light);
    font-size: 0.9375rem;
}

/* Footer Middle - 3 Link Columns */
.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 3rem;
}

@media (max-width: 768px) {
    .footer-columns {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }
}

.footer-col h4 {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.footer-col a {
    display: block;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9375rem;
    margin-bottom: 0.625rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--primary-color);
}

/* Footer Bottom - Copyright + Contact */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

.footer-copyright {
    color: var(--text-light);
    font-size: 0.875rem;
}

.footer-contact {
    color: var(--text-light);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact:hover {
    color: var(--primary-color);
}

/* TESTIMONIALS SECTION */
.testimonials-section {
    padding: 5rem 0;
    background-color: var(--secondary-color);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

.testimonial-author {
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.author-title {
    font-size: 0.875rem;
    color: var(--text-light);
}

.testimonial-rating {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: #fbbf24;
}

.testimonial-content {
    color: var(--text-light);
    line-height: 1.6;
    font-style: italic;
}

/* FAQ SECTION */
.faq-section {
    padding: 5rem 0;
    background: white;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    background: white;
    transition: background-color 0.2s;
    user-select: none;
}

.faq-question:hover {
    background-color: var(--secondary-color);
}

.faq-question h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 300;
    transition: transform 0.3s;
    line-height: 1;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background: var(--secondary-color);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* ===========================================
   BREADCRUMB NAVIGATION
   =========================================== */
.breadcrumb-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8125rem;
}

.breadcrumb-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.breadcrumb-back:hover {
    background-color: var(--primary-light, #eff6ff);
    color: var(--primary-hover);
}

.breadcrumb-back svg {
    flex-shrink: 0;
}

.breadcrumb-path {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--text-light);
}

.breadcrumb-path a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-path a:hover {
    color: var(--primary-color);
}

.breadcrumb-path .separator {
    color: #cbd5e1;
    user-select: none;
}

.breadcrumb-path .current {
    color: var(--text-color);
    font-weight: 500;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 600px) {
    .breadcrumb-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .breadcrumb-path .current {
        max-width: 100%;
    }
}

/* Report Page Specifics */
.report-main {
    padding-top: 80px;
    min-height: 100vh;
    background-color: #fff;
    padding-bottom: 4rem;
}

.report-header {
    text-align: center;
    padding: 3rem 1rem;
    margin: 0 auto;
    width: 100%;
}

.report-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #eff6ff;
    color: var(--primary-color);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.report-date {
    display: inline-block;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.report-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.3;
    word-wrap: break-word;
    max-width: 900px;
    margin: 0 auto;
}

.report-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    position: relative;
    align-items: start;
}

@media (max-width: 1024px) {
    .report-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.report-sidebar {
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 1rem;
}

@media (max-width: 1024px) {
    .report-sidebar {
        display: none;
    }
}

.toc-container h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-nav li {
    margin-bottom: 0.5rem;
}

.toc-nav a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9375rem;
    display: block;
    padding: 0.25rem 0;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    line-height: 1.4;
}

.toc-nav a:hover {
    color: var(--primary-color);
    border-left-color: var(--border-color);
}

.toc-nav a.active {
    color: var(--primary-color);
    font-weight: 600;
    border-left-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

.toc-nav .toc-h1 {
    font-weight: 600;
    font-size: 0.9375rem;
}

.toc-nav .toc-h2 {
    padding-left: 1.5rem;
    font-size: 0.875rem;
}

.toc-nav .toc-h3 {
    padding-left: 2.5rem;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.toc-nav .toc-h4 {
    padding-left: 3.5rem;
    font-size: 0.75rem;
    color: #cbd5e1;
}

.report-content {
    max-width: 800px;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-color);
}

.report-content h1,
.report-content h2,
.report-content h3 {
    color: var(--text-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    scroll-margin-top: 100px;
}

.report-content h1 {
    font-size: 2.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.report-content h2 {
    font-size: 1.75rem;
}

.report-content h3 {
    font-size: 1.375rem;
}

.report-content p {
    margin-bottom: 1.5rem;
    color: #334155;
}

.report-content ul,
.report-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.report-content li {
    margin-bottom: 0.5rem;
}

.report-content blockquote {
    border-left: 4px solid var(--primary-color);
    background-color: #f8fafc;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #475569;
}

.report-content code {
    background-color: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.875rem;
    color: #e11d48;
}

.report-content pre {
    background-color: #1e293b;
    color: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.report-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

.report-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.report-content th,
.report-content td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

.report-content th {
    background-color: #f8fafc;
    font-weight: 600;
}

/* Processing Page Styles */
.processing-page {
    padding-top: 100px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.processing-card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 3rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
}

.spinner {
    width: 100%;
    height: 100%;
    border: 4px solid #eff6ff;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    opacity: 0;
    animation: pulse 2s ease-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.processing-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.processing-subtitle {
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
}

.status-box {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.status-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-icon {
    font-size: 1.5rem;
    background: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.status-text strong {
    display: block;
    color: var(--text-color);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.status-text span {
    color: var(--text-light);
    font-size: 0.9375rem;
}

.email-highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.processing-steps {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
    opacity: 0.5;
}

.step.active {
    opacity: 1;
    color: var(--primary-color);
    font-weight: 600;
}

.step.blink {
    opacity: 1;
    color: var(--text-color);

    animation: blink 1.5s infinite;
}

/* Terminal Styles */
.terminal-window {
    background: #1e1e2e;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid #313244;
    display: flex;
    flex-direction: column;
    height: 300px;
    overflow: hidden;
    font-family: 'Courier New', monospace;
}

.terminal-header {
    background: #1e1e2e;
    padding: 15px 20px 10px;
    border-bottom: 1px solid #313244;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    z-index: 10;
}

.terminal-body {
    padding: 10px 20px 20px;
    overflow-y: auto;
    flex: 1;
    color: #a6accd;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Custom Scrollbar for Terminal */
.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: #1e1e2e;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: #313244;
    border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #45475a;
}

.step-dot {
    width: 10px;
    height: 10px;
    background: currentColor;
    border-radius: 50%;
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}

.output-btn {
    min-width: 200px;
}

@media (max-width: 768px) {
    .processing-card {
        padding: 1.5rem;
    }

    .status-box {
        padding: 1rem;
    }

    .processing-steps {
        gap: 0.75rem;
    }

    .step span {
        display: none;
    }
}

/* Custom Prompt Textarea Auto-Expand */
#custom-prompt {
    min-height: 120px;
    max-height: 360px;
    /* 3x base height */
    overflow-y: auto;
    resize: none;
    transition: height 0.2s ease;
}

/* ===========================================
   OPTIMIZED PROCESSING PAGE STYLES (New)
   =========================================== */
.processing-wrapper {
    padding-top: 100px;
    padding-bottom: 5rem;
    min-height: 80vh;
    background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 100%);
}

.small-container {
    max-width: 960px;
    /* Same width as success/failed pages for consistency */
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 1. Status Card */
.proc-status-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.proc-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.status-icon-check {
    width: 64px;
    height: 64px;
    background: #ecfdf5;
    color: #10b981;
    font-size: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.header-content p {
    color: var(--text-light);
    font-size: 1rem;
}

.order-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-item .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.meta-item .value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.order-id {
    font-family: monospace;
    background: #f1f5f9;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    display: inline-block;
    width: fit-content;
}

.proc-alert {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 1rem;
    border-radius: 0.75rem;
    color: #1e40af;
    font-size: 0.9375rem;
    display: flex;
    gap: 0.75rem;
    align-items: start;
}

.proc-alert .icon {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .proc-header {
        flex-direction: column;
        text-align: center;
    }

    .order-meta-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 2. Progress Tracker (Refined) */
.proc-section {
    margin-bottom: 3rem;
}

.progress-tracker {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.progress-tracker::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}

.progress-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    /* Fixed width for alignment */
}

.progress-step .dot {
    width: 22px;
    height: 22px;
    background: white;
    border: 3px solid #cbd5e1;
    border-radius: 50%;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
    position: relative;
}

.progress-step span {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
}

.progress-step.completed .dot {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.progress-step.active .dot {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px #eff6ff;
}

.progress-step.active span {
    color: var(--primary-color);
    font-weight: 700;
}

/* Pulse animation for active step */
.dot .pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
}

@media (max-width: 600px) {
    .progress-tracker {
        overflow-x: auto;
        padding-bottom: 1rem;
        justify-content: flex-start;
        gap: 2rem;
    }

    .progress-tracker::before {
        width: 600px;
        /* Ensure line covers scroll width */
    }
}

/* 3. Next Steps Grid */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.next-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.next-step-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    position: relative;
}

.next-step-card.highlight {
    border-color: var(--primary-color);
    background: #f8fafc;
}

.step-num {
    font-size: 2rem;
    font-weight: 800;
    color: #e2e8f0;
    line-height: 1;
    margin-bottom: 1rem;
}

.next-step-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.next-step-card p {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .next-steps-grid {
        grid-template-columns: 1fr;
    }
}

.action-row {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* 4. FAQ */
.proc-faq {
    background: white;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq-row {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.faq-row:last-child {
    border-bottom: none;
}

.faq-row h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.faq-row p {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* ===========================================
   ORDER / UNLOCK PAGE STYLES (Restored)
   =========================================== */
.order-page-wrapper {
    padding-top: 80px;
    padding-bottom: 4rem;
    min-height: 100vh;
    background-color: #fff;
}

.order-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    margin-top: 2rem;
    position: relative;
}

@media (max-width: 1024px) {
    .order-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Left: Preview Section */
.preview-section {
    min-width: 0;
    /* Prevent grid blowout */
}

.preview-header {
    margin-bottom: 2rem;
}

/* Report Framework/TOC Section */
.report-framework {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid #bae6fd;
}

.report-framework h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.framework-intro {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.framework-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.625rem 1.5rem;
}

.framework-list li {
    font-size: 0.9375rem;
    color: var(--text-color);
    position: relative;
    padding-left: 1.5rem;
    font-weight: 500;
}

.framework-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #0ea5e9;
    font-weight: bold;
}

.preview-outline {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.preview-outline h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.preview-outline ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem 1rem;
}

.preview-outline li {
    font-size: 0.9375rem;
    color: var(--text-light);
    position: relative;
    padding-left: 1.25rem;
}

.delivery-text {
    font-size: 0.8125rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0;
}

.preview-outline li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Adjusted for more reading - scrollable preview */
.preview-content-wrapper {
    position: relative;
    margin-top: 2rem;
}

.preview-card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    padding: 2rem;
    /* Make content scrollable */
    max-height: 800px;
    overflow-y: auto;
}

.report-content {
    /* Ensure text is readable */
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
}

/* Make headers stick out */
.report-content h1,
.report-content h2,
.report-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    color: #1e293b;
}

.report-content h2 {
    color: #1e293b;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
}

.report-content h3 {
    color: #334155;
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.report-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.report-content li {
    margin-bottom: 0.5rem;
}

.report-content blockquote {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    color: #1e40af;
}

/* Logic: Blur Overlay covers the bottom, fixed absolute to the card */
.blur-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    /* Taller blur */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9) 40%, rgba(255, 255, 255, 1));
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 3rem;
    z-index: 10;
    border-radius: 0 0 16px 16px;
    pointer-events: none;
    /* Let clicks pass through if needed, but CTA box catches them */
}

.cta-box {
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    max-width: 400px;
    width: 90%;
}

.cta-box h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.cta-box p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.cta-box .small-text {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Right: Order Summary Sidebar */
.order-sidebar {
    position: relative;
}

.order-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    position: sticky;
    top: 100px;
}

.price-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.price-header .label {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.5rem;
}

.price-header .price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.price-header .currency {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

.price-subtitle {
    font-size: 0.875rem;
    color: var(--text-light);
}

.divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.features-list li:last-child {
    margin-bottom: 0;
}

.btn-payment {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.875rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-payment.stripe {
    background-color: #635bff;
    color: white;
}

.btn-payment.stripe:hover {
    background-color: #5346e0;
}

.btn-payment.paypal {
    background-color: #ffc439;
    color: #2c2e2f;
}

.btn-payment.paypal:hover {
    background-color: #efb730;
}

.btn-payment.paypal.disabled,
.btn-payment.paypal[disabled] {
    background-color: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    border-color: #e5e7eb !important;
    opacity: 0.7;
}

.payment-label {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.secure-text {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 0.5rem;
}

.payment-redirect-note {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    margin: 0.5rem 0;
    font-style: italic;
}

.btn.disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.support-info {
    font-size: 0.8125rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 1.5rem;
}

.support-info p {
    margin-bottom: 0.25rem;
}

.support-info a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Success State */
.success-header {
    text-align: center;
    color: #10b981;
}

.success-header .icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.btn-full {
    width: 100%;
    display: block;
    text-align: center;
    margin-bottom: 1rem;
}

/* ===========================================
   SUCCESS PAGE STYLES
   =========================================== */
.success-page-wrapper {
    padding-top: 100px;
    padding-bottom: 4rem;
    min-height: 80vh;
    background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 100%);
}

.success-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .success-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Success Hero */
.success-hero {
    text-align: center;
    padding: 2.5rem 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.success-icon {
    margin-bottom: 1.5rem;
}

.success-title {
    font-size: 2rem;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 0.5rem;
}

.success-hero .hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    /* Increased margin for form */
    max-width: 600px;
}

#hero-asin-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.success-subtitle {
    font-size: 1.125rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.success-email-note {
    font-size: 0.9375rem;
    color: var(--text-light);
}

.success-email-note strong {
    color: var(--primary-color);
}

/* Next Steps Card */
.next-steps-card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

.next-steps-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.steps-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.steps-list li {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.steps-list li:last-child {
    border-bottom: none;
}

.step-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.steps-list li strong {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.steps-list li p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

.delivery-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #0369a1;
}

/* Success Actions */
.success-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.success-actions .btn {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

@media (max-width: 600px) {
    .success-actions {
        flex-direction: column;
    }
}

.success-links {
    text-align: center;
    font-size: 0.875rem;
}

.success-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.success-links a:hover {
    color: var(--primary-color);
}

.success-links .separator {
    margin: 0 0.75rem;
    color: var(--border-color);
}

/* Summary Cards (Sidebar) */
.success-sidebar {
    position: sticky;
    top: 100px;
}

.summary-card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.summary-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.summary-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.summary-row .label {
    color: var(--text-light);
}

.summary-row .value {
    font-weight: 600;
    color: var(--text-color);
}

.summary-row .value.amount {
    color: #10b981;
    font-size: 1rem;
}

.help-note {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-light);
    padding: 1rem;
}

.help-note a {
    color: var(--primary-color);
    text-decoration: none;
}

.help-note a:hover {
    text-decoration: underline;
}

/* ===========================================
   FAILED PAGE STYLES
   =========================================== */
.failed-page-wrapper {
    padding-top: 100px;
    padding-bottom: 4rem;
    min-height: 80vh;
    background: linear-gradient(180deg, #fef2f2 0%, #f8fafc 100%);
}

.failed-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .failed-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Failed Hero */
.failed-hero {
    text-align: center;
    padding: 2.5rem 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.failed-icon {
    margin-bottom: 1.5rem;
}

.failed-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.failed-subtitle {
    font-size: 1.125rem;
    color: var(--text-color);
}

/* Error Message Card */
.error-message-card {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.error-text {
    color: #b91c1c;
    font-size: 0.9375rem;
    margin: 0;
}

.error-code {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.8125rem;
    color: #991b1b;
    font-family: monospace;
}

/* Retry Payment Card */
.retry-payment-card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.retry-payment-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.retry-intro {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.retry-payment-card .payment-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.payment-tip {
    font-size: 0.8125rem;
    color: var(--text-light);
    text-align: center;
}

/* Failed Links */
.failed-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.failed-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9375rem;
}

.failed-links a:hover {
    color: var(--primary-color);
}

.failed-links .btn {
    color: var(--primary-color);
}

/* Failed Sidebar */
.failed-sidebar {
    position: sticky;
    top: 100px;
}

/* Help Card */
.help-card p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.help-card .btn {
    width: 100%;
    margin-bottom: 0.75rem;
}

.help-card .help-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Markdown Content Styling */
.report-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.report-content th,
.report-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.report-content th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-color);
}

.report-content tr:nth-child(even) {
    background-color: #fcfcfd;
}

.report-content tr:hover {
    background-color: #f1f5f9;
}

.report-content blockquote {
    border-left: 4px solid var(--primary-color);
    background: #eff6ff;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #334155;
}

.report-content ul,
.report-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.report-content li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.report-content h1,
.report-content h2,
.report-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.3;
}

.report-content h1 {
    font-size: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.report-content h2 {
    font-size: 1.5rem;
}

.report-content h3 {
    font-size: 1.25rem;
}

.report-content code {
    background-color: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.875rem;
    color: #e11d48;
}

.report-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--border-color);
}

.report-content p {
    margin-bottom: 1.5rem;
}

.report-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.report-content a:hover {
    text-decoration: underline;
}

/* Dark Theme Overrides */
body.dark-theme {
    background-color: var(--dark-bg);
    color: #e2e8f0;
}

body.dark-theme .navbar {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .logo-text,
body.dark-theme .nav-links a,
body.dark-theme .analysis-header h1,
body.dark-theme .analysis-header h2 {
    color: white;
}

body.dark-theme .nav-links a:hover,
body.dark-theme .nav-links a.active {
    color: var(--primary-color);
}

body.dark-theme .analysis-header p,
body.dark-theme .form-group .helper-text {
    color: #94a3b8;
}

body.dark-theme .form-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .form-group label {
    color: #e2e8f0;
}

body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select,
body.dark-theme .file-list li {
    background-color: #0f172a;
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

body.dark-theme input:focus,
body.dark-theme textarea:focus,
body.dark-theme select:focus {
    border-color: var(--primary-color);
    background-color: #0f172a;
}

body.dark-theme .config-section {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.pro-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(2px);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

body.dark-theme .pro-overlay {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Marketplace Fix */
#marketplace {
    max-width: 200px;
}

/* PRO Badge Style */
.badge-pro-gradient {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Global Hover Enhancements */
.nav-links a {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    /* Required for transform */
}

.nav-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn:hover,
.submit-btn:hover,
.file-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
}

/* === MOBILE RESPONSIVENESS FIXES === */
@media (max-width: 768px) {

    /* 1. Navigation Padding */
    .nav-container {
        padding: 0 1.25rem;
    }

    /* 2. Hero Title Sizing */
    .hero-title {
        font-size: 2.25rem !important;
        line-height: 1.2;
    }

    /* 3. Hero Search Form Stacking */
    .hero-search-form {
        flex-direction: column;
        gap: 10px;
        height: auto !important;
    }

    .hero-input {
        width: 100% !important;
        border-radius: 9999px !important;
        margin-right: 0 !important;
    }

    #hero-submit-btn {
        width: 100% !important;
        border-radius: 9999px !important;
        margin-top: 5px;
    }

    /* 4. Form Container Spacing (create.html) */
    .form-card {
        padding: 1.5rem !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* 5. Pro Options Toggle Spacing */
    details summary {
        padding: 1.25rem 0 !important;
        line-height: 1.5;
    }

    /* 6. Footer Background Fix */
    footer,
    .footer {
        background-color: #0f172a !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* 7. Mobile Navigation (Hamburger) */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: var(--text-color);
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1001;
    }

    .nav-links {
        display: none;
        /* Default hidden on mobile */
        position: absolute;
        top: 64px;
        /* Height of navbar */
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex !important;
        animation: slideDown 0.3s ease-out forwards;
    }

    .nav-links a {
        padding: 1rem 2rem;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--secondary-color);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    /* Hide the desktop 'Start Analysis' button in the header if it takes too much space,
       or keep it if it fits. For now, let's keep it but ensure nav-actions doesn't conflict */
    .nav-actions {
        margin-right: 0.5rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Note: Mobile menu visibility is controlled by media queries at line 67-148 */

/* Mobile Hero Form - Vertical Stack */
@media (max-width: 600px) {
    .hero-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-input,
    .hero-btn {
        flex: none;
        width: 100%;
    }

    .hero-btn {
        height: 56px;
    }
}

/* =========================================
   OPTIMIZATION ENHANCEMENTS
   ========================================= */

/* 1. Mobile Header Optimization - Prevent Crowding */
@media (max-width: 400px) {
    .logo-text {
        display: none;
    }

    .nav-actions .btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
}

/* 2. Enhanced Micro-interactions for Cards */
.feature-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.2);
}

.card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* 3. FAQ Smooth Accordion Animation */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out, padding 0.35s ease-out;
    padding: 0 1rem;
}

.faq-item.active .faq-answer {
    max-height: 600px;
    padding: 1rem;
}

.faq-question {
    transition: color 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.faq-question:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* 4. Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 64px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    width: 0%;
    z-index: 999;
    transition: width 0.1s linear;
}

/* 5. Social Share Buttons */
.social-share {
    display: flex;
    gap: 0.75rem;
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.social-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-share-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.social-share-btn.linkedin {
    background: #0077B5;
    color: white;
}

.social-share-btn.facebook {
    background: #4267B2;
    color: white;
}

.social-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 6. Related Posts Section */
.related-posts {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.related-posts h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.related-posts-grid {
    display: grid;
    /* Container is ~750px wide. 3 cols needs < 234px per col. Set to 200px to be safe. */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* =========================================
   SCROLL REVEAL ANIMATIONS
   ========================================= */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grids */
.fade-up-delay-1 {
    transition-delay: 0.1s;
}

.fade-up-delay-2 {
    transition-delay: 0.2s;
}

.fade-up-delay-3 {
    transition-delay: 0.3s;
}

.related-post-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.related-post-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.related-post-card .content {
    padding: 1rem;
}

.related-post-card .title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.related-post-card .date {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* 7. Form Validation Feedback */
.asin-counter {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.asin-counter.warning {
    color: #f59e0b;
}

.asin-counter.success {
    color: #10b981;
}

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* 8. Enhanced Button States */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* 9. Testimonial Avatar Styling */
.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.testimonial-initials {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

/* Keep navbar CTA consistent on analysis pages */
body.create-page .nav-actions .btn-primary {
    display: inline-flex;
}

/* Discovery Page Mobile Fixes */
.analysis-focus-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 0.75rem;
}

@media (max-width: 768px) {
    .analysis-focus-cards {
        grid-template-columns: 1fr;
    }
}

/* Mobile Bug Fixes */
@media (max-width: 768px) {

    /* Fix Pricing Page Visibility: Force fade-up elements to show */
    .fade-up {
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
    }

    /* Fix Discovery Page Category Select Squeeze */
    .category-select-container {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .category-select-container select {
        width: 100% !important;
        margin-right: 0 !important;
    }

    /* Additional Nav Fix for Index */
    .nav-container {
        justify-content: center !important;
    }

    .mobile-menu-btn {
        left: 1rem !important;
        right: auto !important;
    }

    .logo {
        margin: 0 !important;
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 1002;
    }
}

/* Desktop Layout for Category Selects */
@media (min-width: 768px) {
    .category-select-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        margin-top: 0.5rem;
    }
}

/* Mobile Layout for Category Selects */
@media (max-width: 767px) {
    .category-select-container {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Discovery category disabled state helper */
.category-select-container select:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.category-step-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.625rem 0.875rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.45;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary-color);
}
.category-step-hint-icon {
    flex-shrink: 0;
    font-size: 1rem;
    opacity: 0.9;
}
.category-step-hint-text {
    flex: 1;
}
