/* ============================================
   PDF Document Summarizer - Main Styles
   ============================================ */

/* 1. CSS Variables (Design Tokens) */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --accent: #06b6d4;
    --accent-dark: #0891b2;
    --success: #10b981;
    --success-light: #34d399;
    --error: #ef4444;
    --warning: #f59e0b;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-light: #e2e8f0;
    --border-lighter: #f1f5f9;
}

/* 2. Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* 3. Layout Components */

/* Animated Gradient Background */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #6B8DD6 50%, #8E37D7 75%, #667eea 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -2;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.95) 100%);
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header */
header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.8);
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.logo-text {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

.btn-cta {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
}

/* Hero Section */
.hero-section {
    max-width: 1000px;
    margin: 32px auto 24px;
    text-align: center;
    padding: 0 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
}

.hero-badge svg {
    width: 14px;
    height: 14px;
}

.hero-section h1 {
    font-size: clamp(36px, 7vw, 56px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
}

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

.hero-section p {
    color: var(--text-secondary);
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* Upload Section */
.upload-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px 32px;
    position: relative;
}

/* Drop Arrow */
.drop-arrow {
    position: absolute;
    top: -60px;
    right: -10px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 6px;
    color: #dc2626;
    z-index: 10;
    pointer-events: none;
    animation: arrow-wave 3s ease-in-out infinite;
}

.drop-arrow svg {
    width: 40px;
    height: 52px;
    filter: drop-shadow(0 2px 8px rgba(220, 38, 38, 0.3));
}

.drop-arrow span {
    font-size: 16px;
    font-weight: 600;
    font-style: italic;
    color: #374151;
    white-space: nowrap;
    margin-top: -12px;
}

@keyframes arrow-wave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(5px);
    }
}

@media (max-width: 900px) {
    .drop-arrow {
        display: none;
    }
}

/* Hide arrow when file is being processed or result shown */
.upload-section.has-file .drop-arrow,
.upload-section.processing .drop-arrow {
    display: none;
}

.dropzone {
    position: relative;
    border: 2px dashed var(--primary-light);
    background: linear-gradient(135deg,
        rgba(79, 70, 229, 0.03) 0%,
        rgba(6, 182, 212, 0.03) 100%);
    padding: 64px 48px;
    border-radius: 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.08);
}

.dropzone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(6, 182, 212, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dropzone:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 48px rgba(79, 70, 229, 0.15);
    transform: translateY(-2px);
}

.dropzone:hover::before {
    opacity: 1;
}

/* Pulse animation for dropzone icon */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.dropzone.dragover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
    transform: scale(1.01);
    box-shadow: 0 12px 40px rgba(79, 70, 229, 0.15);
}

.dropzone-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(6, 182, 212, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
    animation: pulse 2s ease-in-out infinite;
}

.dropzone-icon svg {
    width: 36px;
    height: 36px;
    stroke: var(--primary);
}

.dropzone h2 {
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.dropzone p {
    color: var(--text-muted);
    margin: 4px 0;
    position: relative;
    z-index: 1;
}

.dropzone .file-formats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.dropzone .file-formats svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-muted);
}

.browse-link {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    font-size: inherit;
    font-family: inherit;
    font-weight: 600;
    transition: color 0.2s;
}

.browse-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Language Selector */
.language-selector {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.language-selector-label {
    width: 100%;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-primary);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.lang-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.lang-btn.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(6, 182, 212, 0.1));
    color: var(--primary);
    font-weight: 500;
}

.lang-btn .lang-native {
    font-size: 12px;
    opacity: 0.7;
}

/* File Info */
.file-info {
    margin-top: 20px;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    display: none;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.file-info.visible {
    display: flex;
}

.file-info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-info-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.file-info-details {
    flex: 1;
    text-align: left;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    word-break: break-all;
}

.file-size {
    color: var(--text-muted);
    font-size: 13px;
}

/* Progress Bar */
.progress-container {
    margin-top: 24px;
    display: none;
    position: relative;
    z-index: 1;
}

.progress-container.visible {
    display: block;
}

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

.progress-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--border-light);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 5px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.4) 50%,
        transparent 100%
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

#progressPercent {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Status Message */
.status-message {
    margin-top: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.status-message.visible {
    display: flex;
}

.status-message.error {
    color: var(--error);
}

.status-message.error #statusIcon {
    stroke: var(--error);
}

.status-message.success {
    color: var(--success);
}

.status-message.success #statusIcon {
    stroke: var(--success);
}

#statusIcon {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
}

/* Privacy Note */
.privacy-note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.privacy-note svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-muted);
}

/* Sample Files */
.sample-files {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-lighter);
    position: relative;
    z-index: 1;
}

.sample-files-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.sample-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.sample-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.sample-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.sample-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.trust-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--success);
}

/* How-to Section */
.how-to-section {
    max-width: 1000px;
    margin: 48px auto;
    padding: 0 24px;
}

.how-to-header {
    text-align: center;
    margin-bottom: 40px;
}

.how-to-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.how-to-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step-item {
    text-align: center;
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.step-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-item p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Arrows between steps */
.step-item:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -20px;
    top: 20px;
    font-size: 24px;
    color: var(--border-light);
}

/* CTA Section */
.cta-section {
    max-width: 1000px;
    margin: 64px auto;
    padding: 48px 24px;
    text-align: center;
    background: linear-gradient(135deg,
        rgba(79, 70, 229, 0.05) 0%,
        rgba(6, 182, 212, 0.05) 100%);
    border-radius: 24px;
}

.cta-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.cta-section p {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 24px;
}

.btn-cta-large {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 16px 32px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
    font-family: inherit;
}

.btn-cta-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.btn-cta-large svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Result Section */
.result-section {
    max-width: 1000px;
    margin: 32px auto;
    padding: 0 24px;
    display: none;
}

.result-section.visible {
    display: block;
}

.result-card {
    background: white;
    border-radius: 24px;
    padding: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--success));
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-lighter);
}

.result-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--success);
}

.result-header h2 {
    font-size: 22px;
    color: var(--text-primary);
    font-weight: 700;
}

.result-body {
    padding: 32px;
}

.result-content {
    line-height: 1.8;
    color: var(--text-secondary);
}

.result-content h1,
.result-content h2,
.result-content h3 {
    color: var(--text-primary);
    margin: 28px 0 14px;
}

.result-content h2 {
    font-size: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-light);
}

.result-content h3 {
    font-size: 17px;
}

.result-content ul,
.result-content ol {
    margin-left: 24px;
    margin-bottom: 18px;
}

.result-content li {
    margin-bottom: 10px;
}

.result-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    margin: 20px 0;
    color: var(--text-secondary);
    font-style: italic;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.03), rgba(6, 182, 212, 0.03));
    border-radius: 0 12px 12px 0;
}

.result-content p {
    margin-bottom: 14px;
}

.result-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.result-content code {
    background: var(--bg-tertiary);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* 4. UI Components */

/* Copy Button */
.btn-copy {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
}

.btn-copy svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.btn-copy:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.btn-copy.copied {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success-light);
    color: var(--success);
}

/* Features Section */
.features-section {
    max-width: 1000px;
    margin: 48px auto;
    padding: 0 24px;
}

.features-header {
    text-align: center;
    margin-bottom: 32px;
}

.features-header h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.features-header p {
    color: var(--text-secondary);
    font-size: 17px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-lighter);
    border-radius: 20px;
    padding: 28px 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.feature-card:nth-child(1) .feature-icon {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(129, 140, 248, 0.1));
}

.feature-card:nth-child(2) .feature-icon {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(34, 211, 238, 0.1));
}

.feature-card:nth-child(3) .feature-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.1));
}

.feature-icon svg {
    width: 28px;
    height: 28px;
}

.feature-card:nth-child(1) .feature-icon svg {
    stroke: var(--primary);
}

.feature-card:nth-child(2) .feature-icon svg {
    stroke: var(--accent);
}

.feature-card:nth-child(3) .feature-icon svg {
    stroke: var(--success);
}

.feature-card h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================
   Audience Section (Who It's For)
   ============================================ */
.audience-section {
    max-width: 1000px;
    margin: 48px auto;
    padding: 0 24px;
}

.audience-header {
    text-align: center;
    margin-bottom: 32px;
}

.audience-header h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.audience-header p {
    color: var(--text-secondary);
    font-size: 17px;
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.audience-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-lighter);
    border-radius: 20px;
    padding: 28px 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.audience-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.audience-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.audience-icon svg {
    width: 28px;
    height: 28px;
}

/* Audience icon colors */
.audience-card:nth-child(1) .audience-icon {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(129, 140, 248, 0.1));
}
.audience-card:nth-child(1) .audience-icon svg {
    stroke: var(--primary);
}

.audience-card:nth-child(2) .audience-icon {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(34, 211, 238, 0.1));
}
.audience-card:nth-child(2) .audience-icon svg {
    stroke: var(--accent);
}

.audience-card:nth-child(3) .audience-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.1));
}
.audience-card:nth-child(3) .audience-icon svg {
    stroke: var(--success);
}

.audience-card:nth-child(4) .audience-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
}
.audience-card:nth-child(4) .audience-icon svg {
    stroke: var(--warning);
}

.audience-card:nth-child(5) .audience-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.1));
}
.audience-card:nth-child(5) .audience-icon svg {
    stroke: #8b5cf6;
}

.audience-card:nth-child(6) .audience-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(244, 114, 182, 0.1));
}
.audience-card:nth-child(6) .audience-icon svg {
    stroke: #ec4899;
}

.audience-card h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.audience-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================
   Benefits Section (Advantages)
   ============================================ */
.benefits-section {
    max-width: 1000px;
    margin: 48px auto;
    padding: 0 24px;
}

.benefits-header {
    text-align: center;
    margin-bottom: 32px;
}

.benefits-header h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.benefits-header p {
    color: var(--text-secondary);
    font-size: 17px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.benefit-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-lighter);
    border-radius: 20px;
    padding: 28px 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.benefit-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.benefit-icon svg {
    width: 28px;
    height: 28px;
}

/* Benefit icon colors */
.benefit-card:nth-child(1) .benefit-icon {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(129, 140, 248, 0.1));
}
.benefit-card:nth-child(1) .benefit-icon svg {
    stroke: var(--primary);
}

.benefit-card:nth-child(2) .benefit-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.1));
}
.benefit-card:nth-child(2) .benefit-icon svg {
    stroke: var(--success);
}

.benefit-card:nth-child(3) .benefit-icon {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(34, 211, 238, 0.1));
}
.benefit-card:nth-child(3) .benefit-icon svg {
    stroke: var(--accent);
}

.benefit-card:nth-child(4) .benefit-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.1));
}
.benefit-card:nth-child(4) .benefit-icon svg {
    stroke: #8b5cf6;
}

.benefit-card:nth-child(5) .benefit-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
}
.benefit-card:nth-child(5) .benefit-icon svg {
    stroke: var(--warning);
}

.benefit-card:nth-child(6) .benefit-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(244, 114, 182, 0.1));
}
.benefit-card:nth-child(6) .benefit-icon svg {
    stroke: #ec4899;
}

.benefit-card h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.benefit-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* FAQ Section */
.faq-section {
    max-width: 1000px;
    margin: 48px auto;
    padding: 0 24px;
}

.faq-header {
    text-align: center;
    margin-bottom: 32px;
}

.faq-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-lighter);
    border-radius: 16px;
    padding: 24px 28px;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}

.faq-question {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.faq-answer p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-lighter);
    margin-top: 64px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-lighter);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
    border-radius: 8px;
}

.footer-brand-text {
    font-weight: 600;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    color: var(--text-muted);
    transition: color 0.2s;
}

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

.footer-social svg {
    width: 20px;
    height: 20px;
}

/* 5. Language Switcher Dropdown */
.lang-switcher {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
}

.lang-current:hover {
    border-color: var(--primary-light);
    background: white;
}

.lang-globe {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
}

.lang-switcher .lang-code {
    color: var(--text-primary);
}

.lang-arrow {
    color: var(--text-muted);
    font-size: 10px;
    transition: transform 0.2s ease;
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s ease;
}

.lang-option:first-child {
    border-radius: 11px 11px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 11px 11px;
}

.lang-option:hover {
    background: var(--bg-tertiary);
}

.lang-option.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.lang-flag {
    font-size: 18px;
    line-height: 1;
}

.lang-name {
    font-size: 14px;
}

/* 6. Responsive */
@media (max-width: 768px) {
    .hero-section {
        margin-top: 40px;
    }

    .hero-section h1 {
        font-size: 32px;
    }

    .hero-section p {
        font-size: 17px;
    }

    .dropzone {
        padding: 40px 24px;
    }

    .dropzone-icon {
        width: 64px;
        height: 64px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .audience-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .how-to-steps {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .step-item:not(:last-child)::after {
        display: none;
    }

    .sample-grid {
        gap: 8px;
    }

    .sample-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .trust-badges {
        gap: 16px;
    }

    .cta-section {
        padding: 32px 20px;
        margin: 48px 16px;
    }

    .cta-section h2 {
        font-size: 24px;
    }

    .cta-section p {
        font-size: 16px;
    }

    .btn-cta-large {
        padding: 14px 24px;
        font-size: 16px;
    }

    .faq-item {
        padding: 20px;
    }

    .faq-question {
        font-size: 16px;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .result-body {
        padding: 24px;
    }

    .footer-top {
        flex-direction: column;
        gap: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .lang-switcher .lang-code {
        display: none;
    }

    .lang-current {
        padding: 8px 10px;
    }

    .lang-dropdown {
        min-width: 160px;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 12px 16px;
    }

    .logo-text {
        display: none;
    }

    .dropzone {
        padding: 32px 16px;
    }

    .file-info {
        flex-direction: column;
        text-align: center;
    }

    .file-info-details {
        text-align: center;
    }
}

/* 7. RTL Support for Arabic */
[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .lang-arrow {
    margin-left: 0;
    margin-right: 4px;
}

[dir="rtl"] .file-info-details {
    text-align: right;
}

[dir="rtl"] .result-content ul,
[dir="rtl"] .result-content ol {
    margin-left: 0;
    margin-right: 24px;
}

[dir="rtl"] .result-content blockquote {
    border-left: none;
    border-right: 4px solid var(--primary);
    border-radius: 12px 0 0 12px;
}

[dir="rtl"] .faq-item {
    text-align: right;
}

/* ============================================
   Cookie Consent Banner
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 24px;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.cookie-banner.visible {
    transform: translateY(0);
    opacity: 1;
}

.cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cookie-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: var(--primary);
    color: #fff;
}

.cookie-btn-accept:hover {
    background: var(--primary-dark);
}

.cookie-btn-decline {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.cookie-btn-decline:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

[dir="rtl"] .cookie-inner {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    .cookie-inner {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }
    .cookie-text {
        font-size: 13px;
    }
}
