/* Veo 3 Script Generator - Enhanced Styles with RAOGY Branding */

:root {
    /* Colors */
    --primary: #6366f1;
    --secondary: #10b981;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --raogy-brand: #3b82f6;

    /* Light Theme */
    --bg-primary-light: #ffffff;
    --bg-secondary-light: #f8fafc;
    --bg-tertiary-light: #f1f5f9;
    --text-primary-light: #1e293b;
    --text-secondary-light: #64748b;
    --border-light: #e2e8f0;

    /* Dark Theme */
    --bg-primary-dark: #0f172a;
    --bg-secondary-dark: #1e293b;
    --bg-tertiary-dark: #334155;
    --text-primary-dark: #f8fafc;
    --text-secondary-dark: #cbd5e1;
    --border-dark: #475569;

    /* Base */
    --bg-primary: var(--bg-primary-light);
    --bg-secondary: var(--bg-secondary-light);
    --bg-tertiary: var(--bg-tertiary-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
    --border-color: var(--border-light);
    --bg-overlay: rgba(0, 0, 0, 0.6);
    --text-inverse: #ffffff;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: 0.2s ease-in-out;
}

[data-theme="dark"] {
    --bg-primary: var(--bg-primary-dark);
    --bg-secondary: var(--bg-secondary-dark);
    --bg-tertiary: var(--bg-tertiary-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --border-color: var(--border-dark);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* General Link Styles with Dark Mode Support */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--raogy-brand);
    text-decoration: underline;
}

/* Dark mode link improvements */
[data-theme="dark"] a {
    color: #60a5fa; /* Brighter blue for better visibility in dark mode */
}

[data-theme="dark"] a:hover {
    color: #93c5fd; /* Even brighter on hover */
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-md);
    padding-bottom: 120px; /* Space for footer */
}

/* Header */
.header {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    position: relative;
}

/* Logo link styles */
.logo a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Dark mode improvements for logo link */
[data-theme="dark"] .logo a {
    color: #f8fafc; /* Bright white for better visibility */
}

[data-theme="dark"] .logo a:hover {
    color: #60a5fa; /* Bright blue on hover */
}

/* Visual Header Section */
.visual-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    position: relative;
}

[data-theme="dark"] .visual-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.visual-header-content {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-xl);
    align-items: start;
}

.header-tag {
    display: inline-block;
    background: #e9d5ff;
    color: #7c3aed;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    grid-column: 1 / -1;
}

[data-theme="dark"] .header-tag {
    background: #581c87;
    color: #c084fc;
}

.main-heading {
    display: none;
    margin-bottom: var(--space-lg);
    grid-column: 1 / -1;
}

.heading-part {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    display: block;
}

[data-theme="dark"] .heading-part {
    color: #f1f5f9;
}

.heading-highlight {
    font-size: 2.5rem;
    font-weight: 700;
    color: #7c3aed;
    display: block;
}

[data-theme="dark"] .heading-highlight {
    color: #a855f7;
}

.heading-mobile {
    display: none;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
}

[data-theme="dark"] .heading-mobile {
    color: #f1f5f9;
}

.heading-mobile .highlight {
    color: #7c3aed;
}

[data-theme="dark"] .heading-mobile .highlight {
    color: #a855f7;
}

.compact-heading {
    display: block;
    grid-column: 1;
    grid-row: 2;
    text-align: center;
    margin-bottom: var(--space-md);
}

.compact-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

[data-theme="dark"] .compact-title {
    color: #f1f5f9;
}

.compact-highlight {
    color: #7c3aed;
}

[data-theme="dark"] .compact-highlight {
    color: #a855f7;
}

.info-box {
    background: rgba(147, 197, 253, 0.1);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    grid-column: 1;
}

[data-theme="dark"] .info-box {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.2);
}

.info-icon {
    color: #7c3aed;
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

[data-theme="dark"] .info-icon {
    color: #a855f7;
}

.info-content {
    flex: 1;
}

.info-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

[data-theme="dark"] .info-title {
    color: #f1f5f9;
}

.info-description {
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.95rem;
}

[data-theme="dark"] .info-description {
    color: #cbd5e1;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    grid-column: 2;
    grid-row: 2 / 4;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    animation: floatUpDown 3s ease-in-out infinite;
}

.feature-item:nth-child(1) {
    animation-delay: 0s;
}

.feature-item:nth-child(2) {
    animation-delay: 1s;
}

.feature-item:nth-child(3) {
    animation-delay: 2s;
}

@keyframes floatUpDown {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

[data-theme="dark"] .feature-item {
    background: #334155;
    border-color: #475569;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.1), transparent);
    transition: left 0.5s ease;
}

[data-theme="dark"] .feature-item::before {
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.2), transparent);
}

.feature-item:hover::before {
    left: 100%;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
    border-color: #7c3aed;
}

[data-theme="dark"] .feature-item:hover {
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
    border-color: #a855f7;
}

.feature-item i {
    color: #7c3aed;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .feature-item i {
    color: #a855f7;
}

.feature-item:hover i {
    transform: scale(1.1);
}

.feature-item span {
    color: #374151;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

[data-theme="dark"] .feature-item span {
    color: #e2e8f0;
}

.feature-item:hover span {
    color: #7c3aed;
}

[data-theme="dark"] .feature-item:hover span {
    color: #a855f7;
}

.stats-section {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    grid-column: 1;
    grid-row: 3;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #22c55e;
    line-height: 1;
}

[data-theme="dark"] .stat-number {
    color: #4ade80;
}

.stat-highlight {
    font-size: 1.2rem;
    font-weight: 600;
    color: #22c55e;
    line-height: 1;
}

[data-theme="dark"] .stat-highlight {
    color: #4ade80;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .stat-label {
    color: #cbd5e1;
}

/* Mobile responsive for visual header */
@media(max-width: 768px) {
    .visual-header {
        padding: var(--space-md);
        margin: var(--space-md) 0 var(--space-lg) 0;
    }
    
    .visual-header-content {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .header-tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
        margin-bottom: var(--space-sm);
    }
    
    .main-heading {
        display: block;
        margin-bottom: var(--space-md);
        grid-column: 1 / -1;
    }
    
    .heading-part {
        display: none;
    }
    
    .heading-highlight {
        display: none;
    }
    
    .heading-mobile {
        display: block;
        font-size: 1.5rem;
        text-align: center;
        margin-bottom: var(--space-md);
    }
    
    .compact-heading {
        display: none;
    }
    
    .info-box {
        padding: var(--space-sm);
        margin-bottom: var(--space-sm);
    }
    
    .info-title {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .info-description {
        font-size: 0.85rem;
    }
    
    .feature-list {
        grid-column: 1;
        grid-row: auto;
        order: 3;
        gap: 0.3rem;
    }
    
    .feature-item {
        min-width: auto;
        padding: 0.4rem 0.6rem;
        gap: 0.4rem;
    }
    
    .feature-item i {
        font-size: 0.8rem;
    }
    
    .feature-item span {
        font-size: 0.8rem;
    }
    
    .stats-section {
        display: none;
    }
    
    /* Add gap between visual header and main input section */
    .main-input-section {
        margin-top: var(--space-lg);
    }
}

@media(max-width: 480px) {
    .visual-header {
        padding: var(--space-sm);
        margin: var(--space-sm) 0 var(--space-md) 0;
    }
    
    .visual-header-content {
        gap: var(--space-sm);
    }
    
    .header-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
        margin-bottom: 0.5rem;
    }
    
    .heading-mobile {
        font-size: 1.3rem;
        margin-bottom: var(--space-sm);
    }
    
    .info-box {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .info-title {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
    }
    
    .info-description {
        font-size: 0.8rem;
    }
    
    .feature-item {
        padding: 0.3rem 0.5rem;
        gap: 0.3rem;
    }
    
    .feature-item i {
        font-size: 0.7rem;
    }
    
    .feature-item span {
        font-size: 0.75rem;
    }
    
    /* Add gap between visual header and main input section */
    .main-input-section {
        margin-top: var(--space-md);
    }
}

.logo {
    flex: 1;
    min-width: 0;
}

.logo h1 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    text-align: left;
}

.logo h1 i {
    color: var(--primary);
    font-size: 1rem;
}

.by-raogy {
    background: linear-gradient(135deg, var(--raogy-brand), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    background-origin: border-box;
    position: relative;
    font-size: 0.85rem;
}

.by-raogy::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, var(--raogy-brand), var(--secondary));
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: subtract;
    -webkit-mask-composite: xor;
    z-index: -1;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0.2rem 0 0 0;
    font-style: italic;
    line-height: 1.2;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.about-btn, .header-link {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.8rem;
    gap: 0.3rem;
    white-space: nowrap;
    min-height: 36px;
}

/* Dark mode improvements for header links */
[data-theme="dark"] .header-link {
    color: #e2e8f0; /* Brighter text for better visibility */
    border-color: #475569;
}

[data-theme="dark"] .header-link:hover {
    color: #ffffff; /* Pure white on hover */
    background: var(--primary);
}

.about-btn:hover, .header-link:hover {
    background: var(--primary);
    color: var(--text-inverse);
}

.about-btn.active {
    background: var(--primary);
    color: var(--text-inverse);
}

.about-btn i {
    font-size: 0.9rem;
}

/* Theme Toggle Button - Fresh Start */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-primary);
    font-family: inherit;
    width: 36px;
    height: 36px;
    padding: 0;
    flex-shrink: 0;
    min-height: 36px;
}

.theme-toggle:hover {
    background: var(--primary);
    color: var(--text-inverse);
    transform: scale(1.05);
}

.theme-toggle i {
    font-size: 0.9rem;
    transition: all var(--transition);
}

.theme-toggle:hover i {
    color: var(--text-inverse);
}

.api-status, .dialogue-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.75rem;
    min-height: 36px;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.api-status .status-dot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* About Section */
.about-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--raogy-brand);
    animation: slideDown 0.3s ease-out;
}

.about-content h2 {
    color: var(--raogy-brand);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-lg) 0;
}

.about-card {
    background: var(--bg-tertiary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.about-card h3 {
    color: var(--primary);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.about-card ul, .about-card ol {
    padding-left: 1.5rem;
}

.about-card li {
    margin-bottom: 0.5rem;
}

.about-footer {
    text-align: center;
    padding: var(--space-lg);
    border-top: 1px solid var(--border-color);
    margin-top: var(--space-lg);
    color: var(--text-secondary);
}

/* How to Use Section */
.how-to-use-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--success);
    animation: slideDown 0.3s ease-out;
}

.how-to-use-content h2 {
    color: var(--success);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.steps-container {
    margin: var(--space-lg) 0;
}

.step-card {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: 2rem;
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.step-number {
    background: linear-gradient(135deg, var(--raogy-brand), var(--primary));
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h3 {
    color: var(--primary);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pro-tip, .warning-box {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border-left: 4px solid;
}

.pro-tip {
    background: rgba(34, 197, 94, 0.1);
    border-left-color: var(--success);
}

.warning-box {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--danger);
}

.example-box {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    font-family: monospace;
    border: 1px solid var(--border-color);
}

.feature-grid, .tips-grid, .faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.feature-item, .tip-card, .faq-item {
    background: var(--bg-secondary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.feature-item h4, .tip-card h4, .faq-item h4 {
    margin-top: 0;
    color: var(--primary);
}

.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.export-option {
    background: var(--bg-secondary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.export-option h4 {
    margin-top: 0;
    color: var(--secondary);
}

.tips-section, .troubleshooting-section, .next-steps-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.next-steps-content {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(59, 130, 246, 0.1));
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.how-to-use-footer {
    text-align: center;
    padding: var(--space-lg);
    margin-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.how-to-use-footer a {
    color: var(--raogy-brand);
    text-decoration: none;
}

.how-to-use-footer a:hover {
    text-decoration: underline;
}

/* Main Input Section */
.main-input-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.05));
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.main-input-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--raogy-brand), var(--primary), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Character & Environment Manager Dropdown */
.character-env-dropdown {
    margin-top: var(--space-lg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.dropdown-toggle {
    width: 100%;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    border: none;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-toggle:hover {
    background: linear-gradient(135deg, var(--primary), var(--raogy-brand));
    color: var(--text-inverse);
}

.dropdown-toggle.active {
    background: linear-gradient(135deg, var(--primary), var(--raogy-brand));
    color: var(--text-inverse);
}

.dropdown-toggle span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-arrow {
    transition: transform var(--transition);
    font-size: 0.9rem;
}

.dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    padding: var(--space-lg);
    background: var(--bg-primary);
    animation: slideDown 0.3s ease-out;
}

.dropdown-content.active {
    display: block;
}

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

/* Professional Note */
.professional-note {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(34, 197, 94, 0.1));
    border: 1px solid var(--secondary);
    border-left: 4px solid var(--secondary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    animation: fadeIn 0.3s ease-out;
}

.professional-note i {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.professional-note span {
    line-height: 1.5;
    font-weight: 500;
}

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

.dropdown-controls {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.dropdown-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-btn:hover {
    background: var(--primary);
    color: var(--text-inverse);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dropdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.dropdown-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dropdown-field label {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.dropdown-field label i {
    color: var(--primary);
    width: 16px;
}

.dropdown-field textarea,
.dropdown-field select {
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition);
    resize: vertical;
}

.dropdown-field textarea:focus,
.dropdown-field select:focus {
    outline: 2px solid var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dropdown-field select {
    min-height: 45px;
    cursor: pointer;
}

/* Unified Settings Dropdown - Mobile Optimized */
.unified-settings-dropdown {
    margin-top: var(--space-lg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.unified-settings-dropdown .dropdown-toggle {
    width: 100%;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    border: none;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.unified-settings-dropdown .dropdown-toggle:hover {
    background: linear-gradient(135deg, var(--primary), var(--raogy-brand));
    color: var(--text-inverse);
}

.unified-settings-dropdown .dropdown-toggle.active {
    background: linear-gradient(135deg, var(--primary), var(--raogy-brand));
    color: var(--text-inverse);
}

.unified-settings-dropdown .dropdown-content {
    display: none;
    padding: var(--space-md);
    background: var(--bg-primary);
    animation: slideDown 0.3s ease-out;
}

.unified-settings-dropdown .dropdown-content.active {
    display: block;
}

/* Mobile-Optimized Tabs */
.mobile-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.6rem 0.4rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 70px;
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--primary);
    color: var(--text-inverse);
    box-shadow: var(--shadow-md);
}

.tab-btn i {
    font-size: 1rem;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* Mobile Config Grid */
.mobile-config-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.mobile-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-field label {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.mobile-field label i {
    color: var(--primary);
    width: 16px;
    font-size: 0.9rem;
}

.mobile-field select,
.mobile-textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition);
    resize: vertical;
}

.mobile-field select:focus,
.mobile-textarea:focus {
    outline: 2px solid var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Mobile Character Management */
.mobile-field.characters-section .character-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
}

.mobile-remove-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    align-self: flex-end;
    min-width: 80px;
}

.mobile-remove-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.mobile-add-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    width: 100%;
}

.mobile-add-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Mobile Control Buttons */
.mobile-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.mobile-control-btn {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
}

.mobile-control-btn:hover {
    background: var(--primary);
    color: var(--text-inverse);
    transform: translateY(-1px);
}

/* Enhanced Characters Section */
.characters-section {
    grid-column: 1 / -1; /* Full width */
}

.characters-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.character-input-group {
    position: relative;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    animation: fadeInUp 0.3s ease-out;
}

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

.character-input-group:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.character-input {
    flex: 1;
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition);
    resize: vertical;
    min-height: 80px;
}

.character-input:focus {
    outline: 2px solid var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.remove-character-btn {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
    margin-top: var(--space-md);
}

.remove-character-btn:hover {
    background: linear-gradient(135deg, #dc2626, var(--danger));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.add-character-btn {
    background: linear-gradient(135deg, var(--secondary), #059669);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    width: 100%;
    box-shadow: var(--shadow-md);
}

.add-character-btn:hover {
    background: linear-gradient(135deg, #059669, var(--secondary));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.add-character-btn i {
    font-size: 1rem;
}

/* NEW: Generate Button Container */
.generate-button-container {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    padding: 1rem 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(59, 130, 246, 0.05));
    border-radius: var(--radius-lg);
}

.generate-button-container .generate-btn {
    background: linear-gradient(135deg, var(--raogy-brand), var(--primary));
    color: var(--text-inverse);
    font-size: 1rem;
    padding: 0.9rem 2rem;
    box-shadow: var(--shadow-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.generate-button-container .generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.generate-button-container .generate-btn:hover::before {
    left: 100%;
}

.generate-button-container .generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, var(--primary), var(--raogy-brand));
    scale: 1.05;
}

.generate-button-container .generate-btn i {
    font-size: 1.3rem;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-10deg) scale(1.1); }
    75% { transform: rotate(10deg) scale(1.1); }
}

/* Configuration Section (Updated) */
.config-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--secondary);
}

/* Config Section Full */
.config-section-full {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--secondary);
    animation: slideDown 0.3s ease-out;
}

.config-content h2 {
    color: var(--secondary);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-lg) 0;
}

.config-card {
    background: var(--bg-tertiary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.config-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.config-card h3 {
    color: var(--secondary);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
}

.config-field {
    margin-bottom: var(--space-md);
}

.config-field:last-child {
    margin-bottom: 0;
}

.config-field label {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.config-field label i {
    color: var(--secondary);
    width: 16px;
}

.config-field select {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition);
    cursor: pointer;
}

.config-field select:focus {
    outline: 2px solid var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.config-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.config-action-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
}

.config-action-btn:hover {
    background: var(--secondary);
    color: var(--text-inverse);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.config-area {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 400px;
}

.config-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-group label {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.config-group label i {
    color: var(--secondary);
    width: 16px;
}

/* Sections */
section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.section-header {
    margin-bottom: var(--space-lg);
}

.section-header h2, .section-header h3 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Input & Config */
.input-container {
    position: relative;
}

textarea, input[type="number"], select {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition);
    box-sizing: border-box;
}

textarea:focus, input:focus, select:focus {
    outline: 2px solid var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Buttons */
.control-btn {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    text-decoration: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.control-btn:hover {
    background: var(--primary);
    color: var(--text-inverse);
}

/* Scene Header with Copy Button */
.scene-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.scene-header h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.1));
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-md);
    border-left: 4px solid #60a5fa;
    font-weight: 700;
}

.scene-copy-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

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

/* Dialogue Length Indicator */
.dialogue-length {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    margin-left: 0.5rem;
    font-weight: 600;
}

.dialogue-length.perfect {
    background: var(--success);
    color: white;
}

.dialogue-length.short {
    background: var(--warning);
    color: white;
}

.dialogue-length.long {
    background: var(--danger);
    color: white;
}

/* Enhanced Results Controls */
.results-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.results-controls .control-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

/* Storyboard Results */
.storyboard-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.storyboard-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.scene-detail {
    margin-bottom: 1rem;
}

.scene-detail h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(147, 197, 253, 0.1));
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-md);
    border-left: 3px solid #60a5fa;
}

.scene-detail p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.dialogue-text {
    font-style: italic;
    background: var(--bg-tertiary);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--secondary);
}

.scene-meta {
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Consistent Prompts & Overview */
#storyboardOverview, #consistentPromptsContainer {
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    border: 1px solid var(--border-color);
}

#consistentPromptsContainer h4, #storyboardOverview h4 {
    margin-top: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Consistent Assets Header with Copy Button */
.consistent-assets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.consistent-assets-header h4 {
    margin: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.consistent-assets-content {
    margin-top: 0;
}

#consistentPromptsContainer h5 {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin: 1rem 0 0.5rem 0;
}

#consistentPromptsContainer div:not(:last-child) {
    margin-bottom: 1rem;
}

#consistentPromptsContainer p, #storyboardOverview p {
    margin: 0;
    line-height: 1.6;
}

/* Enhanced Results Scroll Animation */
#generatedStoryboardHeader {
    scroll-margin-top: 2rem;
    position: relative;
}

#generatedStoryboardHeader::before {
    content: '🎬';
    position: absolute;
    left: -2rem;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Footer Styles - Enhanced Design */
    .footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-xl) 0;
        margin-top: var(--space-xl);
    }

    .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
        margin: 0 auto;
    padding: 0 var(--space-xl);
    }

    .footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    }

    .footer-brand h3 {
    font-size: 1.4rem;
        font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    }

    .footer-brand p {
        color: var(--text-secondary);
        margin: 0;
    line-height: 1.4;
    font-size: 0.85rem;
    }

.footer-links {
    display: flex;
    flex-direction: row;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    margin: 0;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    min-width: fit-content;
    flex-shrink: 0;
}

/* Dark mode improvements for footer links */
[data-theme="dark"] .footer-links a {
    color: #e2e8f0; /* Brighter text for better visibility */
    border-color: #475569;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .footer-links a:hover {
    color: #ffffff; /* Pure white on hover */
    background: var(--primary);
    border-color: var(--primary);
}

.footer-links a:hover {
    color: var(--primary);
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
}

.footer-links a i {
    width: 12px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

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

.footer-info {
    display: none;
}

/* Footer Copyright Styles */
.footer-copyright {
    text-align: center;
    padding: var(--space-md) 0;
    border-top: 1px solid var(--border-color);
    margin-top: var(--space-md);
}

.footer-copyright p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.4;
}

[data-theme="dark"] .footer-copyright p {
    color: var(--text-secondary);
}

/* Mobile Footer Copyright Styles */
@media(max-width: 768px) {
    .footer-copyright {
        padding: var(--space-md) 0;
        margin-top: var(--space-md);
    }
    
    .footer-copyright p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
}

@media(max-width: 480px) {
    .footer-copyright {
        padding: var(--space-xs) 0;
        margin-top: var(--space-xs);
        margin-bottom: 0;
    }
    
    .footer-copyright p {
        font-size: 0.8rem;
        line-height: 1.6;
        padding: 0 var(--space-sm);
        margin-bottom: 0;
    }
}

/* Fixed Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--raogy-brand), var(--primary));
    color: var(--text-inverse);
    border: none;
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-width: 110px;
    justify-content: center;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, var(--primary), var(--raogy-brand));
    scale: 1.05;
}

.scroll-to-top i {
    font-size: 1rem;
    animation: bounceUp 2s infinite;
}

.scroll-to-top span {
    font-family: inherit;
    font-weight: 600;
}

@keyframes bounceUp {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* Loading & Toast */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading-content {
    background: var(--bg-primary);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-color);
}

.loading-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--primary);
}

.loading-content p {
    margin: 0;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

#toastContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
}

.toast {
    background: var(--bg-primary);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid;
    animation: slideIn 0.3s;
    margin-bottom: 0.5rem;
    max-width: 220px;
    font-size: 0.8rem;
}

.toast.compact-toast {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    max-width: 180px;
}

.toast.success {
    border-color: var(--success);
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: white;
    font-weight: 600;
}

.toast.error {
    border-color: var(--danger);
}

.toast.warning {
    border-color: var(--warning);
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Mobile responsive fixes */
/* Responsive Text Changes */
.generate-text-mobile,
.download-text-mobile {
    display: none;
}

.generate-text-desktop,
.download-text-desktop {
    display: inline;
}

@media(max-width: 768px) {
    body {
        font-size: 14px;
    }

    .generate-text-desktop,
    .download-text-desktop {
        display: none;
    }

    .generate-text-mobile,
    .download-text-mobile {
        display: inline;
    }

    .container {
        padding: 0.5rem;
        padding-bottom: 20px;
        max-width: 100%;
        margin: 0;
    }

    /* Mobile-specific textarea sizing */
    #userInput {
        min-height: 120px;
        max-height: 200px;
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }

    /* Fix header layout on mobile */
    .header {
        padding: 0.75rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .logo {
        flex: none;
        text-align: center;
    }

    .logo h1 {
        font-size: 1rem;
        gap: 0.3rem;
        line-height: 1.2;
        justify-content: center;
    }

    .by-raogy {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
    }

    .brand-tagline {
        font-size: 0.65rem;
        margin: 0.1rem 0 0 0;
        display: none; /* Hide tagline on mobile for space */
    }

    .header-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .about-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
        min-height: 32px;
    }
    
    .theme-toggle {
        width: 32px;
        height: 32px;
        min-height: 32px;
    }
    
    .theme-toggle i {
        font-size: 0.8rem;
    }



    .api-status {
        padding: 0.3rem 0.5rem;
        font-size: 0.65rem;
        min-height: 32px;
        gap: 0.3rem;
    }

    .api-status .status-text {
        display: inline; /* Show status text on mobile */
        font-size: 0.6rem;
    }

    .api-status::after {
        display: none; /* Remove the "Ready" text */
    }

    /* Fix main input section spacing */
    .main-input-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .section-header {
        margin-bottom: 1rem;
    }

    .section-header h2 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .section-subtitle {
        font-size: 0.8rem;
    }

    /* NEW: Reorganized mobile layout order */
    /* 1. Dialogue status - smaller and first */
    .dialogue-status {
        order: 1;
        justify-content: center;
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        min-height: 28px;
        margin-bottom: 0.5rem;
        background: var(--bg-tertiary);
        border-radius: var(--radius-md);
        border: 1px solid var(--border-color);
    }

    .dialogue-status .status-text {
        font-size: 0.7rem;
    }

    /* 2. Settings dropdown - second */
    .unified-settings-dropdown {
        order: 2;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }

    /* 3. Template button - third */


    /* 4. Generate button - last */
    .generate-button-container {
        order: 4;
        margin-top: 1rem;
        margin-bottom: 1rem;
        padding: 0.75rem 0;
        border-radius: var(--radius-md);
    }

    /* Fix input controls layout for new order */
    .input-controls {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .control-btn {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1rem;
    }

    .generate-button-container .generate-btn {
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
        width: 100%;
        max-width: 300px;
    }

    /* Fix unified settings dropdown */
    .unified-settings-dropdown .dropdown-toggle {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .unified-settings-dropdown .dropdown-toggle span {
        font-size: 0.85rem;
    }

    .unified-settings-dropdown .dropdown-content {
        padding: 0.75rem;
    }

    .mobile-tabs {
        gap: 1px;
        padding: 2px;
    }

    .tab-btn {
        padding: 0.5rem 0.3rem;
        font-size: 0.7rem;
        min-width: 60px;
    }

    .tab-btn i {
        font-size: 0.9rem;
    }

    .mobile-field label {
        font-size: 0.85rem;
    }

    .mobile-field select,
    .mobile-textarea {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .mobile-control-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    .mobile-add-btn {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .mobile-field.characters-section .character-input-group {
        padding: 0.75rem;
    }

    .mobile-remove-btn {
        padding: 0.4rem;
        font-size: 0.8rem;
        min-width: 70px;
    }

    /* Fix sections spacing */
    section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    /* Fix results section */
    .results-controls {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .results-controls .control-btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }

    /* Fix storyboard cards */
    .storyboard-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .scene-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .scene-copy-btn {
        align-self: flex-end;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    /* Fix footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-lg);
        padding: 0 1rem;
    }

    .footer-brand h3 {
        font-size: 1.5rem;
    }

    .footer-links {
        align-items: center;
    }

    .footer-links a {
        min-width: 180px;
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    /* Fix scroll to top button */
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        padding: 8px 14px;
        font-size: 0.75rem;
        min-width: 100px;
    }

    .scroll-to-top span {
        font-size: 0.75rem;
    }

    /* Fix about and how-to-use sections */
    .about-grid {
        grid-template-columns: 1fr;
    }

    .step-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .feature-grid, .tips-grid, .faq-grid {
        grid-template-columns: 1fr;
    }

    .export-options {
        grid-template-columns: 1fr;
    }

    /* Fix toast positioning */
    #toastContainer {
        top: 20px;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }

    .toast {
        max-width: 280px;
        font-size: 0.9rem;
        padding: 0.8rem 1.2rem;
    }

    .toast.compact-toast {
        max-width: 250px;
        font-size: 0.85rem;
        padding: 0.7rem 1rem;
    }

    /* Fix character management */
    .characters-container {
        gap: 0.75rem;
    }

    .character-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .remove-character-btn {
        margin-top: 0;
        width: 100%;
        height: auto;
        padding: 0.5rem 1rem;
    }

    .professional-note {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .professional-note i {
        align-self: center;
        margin-top: 0;
    }
}

@media(max-width: 480px) {
    /* Extra small mobile screens - further reduce textarea */
    #userInput {
        min-height: 100px;
        max-height: 160px;
        font-size: 13px;
        padding: 0.75rem;
    }

    .header {
        padding: 0.5rem;
        border-radius: var(--radius-md);
    }

    .logo h1 {
        font-size: 0.85rem;
        gap: 0.25rem;
        line-height: 1.1;
    }

    .logo h1 i {
        font-size: 0.8rem;
    }

    .by-raogy {
        font-size: 0.6rem;
        padding: 0.1rem 0.25rem;
    }

    .brand-tagline {
        display: none;
    }

    .header-controls {
        gap: 0.25rem;
    }

    .about-btn {
        font-size: 0.65rem;
        padding: 0.25rem 0.4rem;
        min-height: 28px;
        gap: 0.2rem;
    }

    .about-btn span {
        display: none; /* Hide text, show only icons on very small screens */
    }
    
    .theme-toggle {
        width: 28px;
        height: 28px;
        min-height: 28px;
    }
    
    .theme-toggle i {
        font-size: 0.75rem;
    }



    .api-status {
        padding: 0.25rem 0.4rem;
        min-height: 28px;
    }

    .api-status .status-dot {
        width: 6px;
        height: 6px;
    }

    /* Fix main input section for very small screens */
    .main-input-section {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .section-header h2 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .section-subtitle {
        font-size: 0.75rem;
    }

    /* Even smaller dialogue status for very small screens */
    .dialogue-status {
        padding: 0.3rem 0.5rem;
        font-size: 0.65rem;
        min-height: 24px;
    }

    .dialogue-status .status-text {
        font-size: 0.65rem;
    }

    /* Smaller template button */


    /* Fix results controls for very small screens */
    .results-controls {
        flex-direction: column;
    }

    .results-controls .control-btn {
        width: 100%;
        flex: none;
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    /* Fix scene header for very small screens */
    .scene-header {
        gap: 0.75rem;
    }

    .scene-copy-btn {
        width: 100%;
        justify-content: center;
        font-size: 0.75rem;
    }

    /* Hide decorative elements on very small screens */
    #generatedStoryboardHeader::before {
        display: none;
    }

    /* Fix footer for very small screens */
    .footer-content {
        padding: 0 1rem;
    }

    .footer-brand h3 {
        font-size: 1.3rem;
    }

    .footer-links a {
        min-width: 160px;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Fix scroll to top button for very small screens */
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        padding: 6px 10px;
        border-radius: 50%;
        width: 45px;
        height: 45px;
        min-width: unset;
        justify-content: center;
    }

    .scroll-to-top span {
        display: none;
    }

    .scroll-to-top i {
        font-size: 1.1rem;
    }

    /* Fix dropdown controls for very small screens */
    .dropdown-controls {
        gap: 0.5rem;
    }

    .dropdown-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Fix generate button for very small screens */
    .generate-button-container .generate-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    /* Fix character management for very small screens */
    .characters-section {
        grid-column: auto;
    }

    .character-input {
        min-height: 60px;
    }

    .professional-note {
        font-size: 0.85rem;
        padding: var(--space-md);
    }

    /* Configuration section mobile styles */
    .config-section {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .config-area {
        max-width: 100%;
    }

    .config-group {
        gap: 0.3rem;
    }

    .config-group label {
        font-size: 0.85rem;
    }

    .config-group select {
        padding: 0.5rem;
        font-size: 0.85rem;
        min-height: 40px;
    }

    .section-header {
        margin-bottom: 1rem;
    }

    .section-header h3 {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }

    .section-subtitle {
        font-size: 0.75rem;
    }
}

/* Additional mobile fixes for overlapping elements */
@media(max-width: 768px) {
    /* Ensure proper spacing between sections */
    .main-input-section,
    .about-section,
    .how-to-use-section,
    .config-section-full,
    #resultsSection {
        margin-bottom: 1.5rem;
    }

    /* Fix any potential z-index issues */
    .header {
        z-index: 100;
        position: relative;
    }

    .generate-button-container {
        position: relative;
        z-index: 10;
    }

    /* Ensure proper button visibility */
    .generate-btn {
        position: relative;
        z-index: 5;
    }

    /* Fix any floating elements */
    .scroll-to-top {
        z-index: 1000;
    }

    #toastContainer {
        z-index: 1001;
    }

    /* Ensure modals appear above everything */

    .analytics-modal,
    .collaboration-modal {
        z-index: 2000;
    }
}

/* Prevent horizontal scrolling on mobile */
@media(max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .container {
        overflow-x: hidden;
    }

    /* Ensure all content fits within viewport */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
}



/* Analytics Modal Styles */
.analytics-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.analytics-modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease-out;
}

.analytics-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.analytics-modal-header h3 {
    margin: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analytics-close-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-primary);
}

.analytics-close-btn:hover {
    background: var(--danger);
    color: white;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.analytics-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

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

.analytics-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.analytics-card h4 {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.analytics-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.analytics-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.analytics-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.chart-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.chart-section h4 {
    margin: 0 0 1rem 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.activity-timeline {
    max-height: 200px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: var(--space-md);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
    min-width: 80px;
    font-weight: 600;
}

.activity-desc {
    color: var(--text-primary);
    font-size: 0.9rem;
    flex: 1;
}

.export-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.export-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.export-stat span:first-child {
    color: var(--text-secondary);
}

.export-stat span:last-child {
    color: var(--primary);
    font-weight: 600;
}

.analytics-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.analytics-action-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
}

.analytics-action-btn:hover {
    background: var(--primary);
    color: var(--text-inverse);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Collaboration Modal Styles */
.collaboration-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.collaboration-modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease-out;
}

.collaboration-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.collaboration-modal-header h3 {
    margin: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collaboration-close-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-primary);
}

.collaboration-close-btn:hover {
    background: var(--danger);
    color: white;
}

/* Collaboration Tabs */
.collaboration-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.collab-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    min-width: 120px;
}

.collab-tab-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.collab-tab-btn.active {
    background: var(--primary);
    color: var(--text-inverse);
    box-shadow: var(--shadow-md);
}

/* Collaboration Content */
.collaboration-content {
    min-height: 400px;
}

.collab-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.collab-tab-content.active {
    display: block;
}

/* Share Section */
.share-section {
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.share-section h4 {
    margin: 0 0 1rem 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.share-link-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.share-link-container input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.85rem;
}

.copy-link-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    white-space: nowrap;
}

.copy-link-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.share-note {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

/* QR Code Section */
.qr-code-container {
    margin-bottom: 1rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
}

.qr-placeholder {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.qr-code {
    text-align: center;
}

.qr-pattern {
    width: 100px;
    height: 100px;
    background: repeating-linear-gradient(
        0deg,
        var(--text-primary) 0px,
        var(--text-primary) 2px,
        transparent 2px,
        transparent 8px
    ),
    repeating-linear-gradient(
        90deg,
        var(--text-primary) 0px,
        var(--text-primary) 2px,
        transparent 2px,
        transparent 8px
    );
    margin: 0 auto 0.5rem;
    border-radius: var(--radius-md);
}

.qr-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.generate-qr-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    width: 100%;
    justify-content: center;
}

.generate-qr-btn:hover {
    background: var(--raogy-brand);
    transform: translateY(-1px);
}

/* Comments Section */
.comments-section {
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.comments-section h4 {
    margin: 0 0 1rem 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.comments-container {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.no-comments {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: var(--space-lg);
}

.comment-item {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

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

.comment-scene {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.comment-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.add-comment-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.add-comment-section select,
.add-comment-section textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
}

.add-comment-section textarea {
    resize: vertical;
    min-height: 80px;
}

.add-comment-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
}

.add-comment-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Version History Section */
.history-section {
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.history-section h4 {
    margin: 0 0 1rem 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.version-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.no-versions {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: var(--space-lg);
}

.version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--secondary);
}

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

.version-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.version-name {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.version-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.version-actions {
    display: flex;
    gap: 0.5rem;
}

.version-btn {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
}

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

.version-btn:last-child:hover {
    background: var(--danger);
}

.save-version-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    width: 100%;
}

.save-version-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Mobile responsive for modals */
@media(max-width: 768px) {
    .analytics-modal-content,
    .collaboration-modal-content {
        width: 95%;
        padding: var(--space-lg);
        max-height: 90vh;
    }

    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .analytics-charts {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .analytics-number {
        font-size: 2rem;
    }

    .analytics-card {
        padding: var(--space-md);
    }

    .chart-section {
        padding: var(--space-md);
    }

    .analytics-actions {
        flex-direction: column;
        align-items: center;
    }

    .analytics-action-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }

    .collaboration-tabs {
        gap: 1px;
        padding: 2px;
    }

    .collab-tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        min-width: 100px;
    }

    .share-link-container {
        flex-direction: column;
    }

    .copy-link-btn {
        width: 100%;
        justify-content: center;
    }

    .version-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .version-actions {
        width: 100%;
        justify-content: space-between;
    }

    .version-btn {
        flex: 1;
        justify-content: center;
    }
}

@media(max-width: 480px) {
    .analytics-modal-content,
    .collaboration-modal-content {
        padding: var(--space-md);
    }

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

    .analytics-number {
        font-size: 1.8rem;
    }

    .analytics-card h4 {
        font-size: 0.85rem;
    }

    .activity-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .activity-time {
        min-width: auto;
        font-size: 0.75rem;
    }

    .activity-desc {
        font-size: 0.85rem;
    }

    .collaboration-tabs {
        flex-direction: column;
        gap: 1px;
    }

    .collab-tab-btn {
        min-width: auto;
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .share-section,
    .comments-section,
    .history-section {
        padding: var(--space-md);
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .add-comment-section textarea {
        min-height: 60px;
    }
}

/* Consistency Scene Styles */
.consistency-scene {
    border-left: 4px solid var(--secondary) !important;
    background: linear-gradient(135deg, var(--bg-secondary), rgba(16, 185, 129, 0.05)) !important;
    position: relative;
}

.consistency-scene::before {
    content: '🎬 Veo 3 Consistency';
    position: absolute;
    top: -10px;
    left: 10px;
    background: var(--secondary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 10;
}

.consistency-header h4 {
    color: var(--secondary) !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(34, 197, 94, 0.1)) !important;
    border-left: 4px solid var(--secondary) !important;
}

.consistency-badge {
    background: var(--secondary);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-md);
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
    display: inline-block;
}

.consistency-note {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.consistency-note i {
    color: var(--secondary);
}

/* Enhanced scene detail styling for consistency scenes */
.consistency-scene .scene-detail h5 {
    color: var(--secondary) !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(34, 197, 94, 0.1)) !important;
    border-left: 3px solid var(--secondary) !important;
}

.consistency-scene .dialogue-text {
    background: rgba(16, 185, 129, 0.1) !important;
    border-left: 3px solid var(--secondary) !important;
    font-style: italic;
    color: var(--text-primary);
}

/* Mobile responsive for consistency scenes */
@media(max-width: 768px) {
    .consistency-scene::before {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        top: -8px;
        left: 8px;
    }

    .consistency-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }

    .consistency-note {
        font-size: 0.7rem;
    }
}

@media(max-width: 480px) {
    .consistency-scene::before {
        font-size: 0.55rem;
        padding: 0.15rem 0.3rem;
        top: -6px;
        left: 6px;
    }

    .consistency-badge {
        font-size: 0.55rem;
        padding: 0.1rem 0.25rem;
    }

    .consistency-note {
        font-size: 0.65rem;
    }
}



/* Guide Section */
.guide-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.guide-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.guide-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.guide-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.guide-step {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
}

.step-number {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.example-box {
    background: rgba(147, 197, 253, 0.1);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin: var(--space-md) 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

[data-theme="dark"] .example-box {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.2);
}

.pro-tip {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    margin: var(--space-sm) 0;
    font-size: 0.9rem;
}

[data-theme="dark"] .pro-tip {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.2);
}

.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    margin: var(--space-sm) 0;
    font-size: 0.9rem;
}

[data-theme="dark"] .warning-box {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
}

.step-features {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0;
}

.step-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.step-features li i {
    color: #22c55e;
    font-size: 0.9rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.setting-item i {
    color: #7c3aed;
    font-size: 1rem;
}

.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

.export-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.export-option:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.export-option i {
    color: #7c3aed;
    font-size: 1rem;
}

.guide-tips {
    margin: var(--space-xl) 0;
}

.guide-tips h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.tip-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tip-card i {
    font-size: 2rem;
    color: #7c3aed;
    margin-bottom: var(--space-sm);
}

.tip-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.tip-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.guide-troubleshooting {
    margin: var(--space-xl) 0 0 0;
}

.guide-troubleshooting h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.troubleshooting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.trouble-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all 0.3s ease;
}

.trouble-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.trouble-item i {
    font-size: 1.5rem;
    color: #f59e0b;
    margin-bottom: var(--space-sm);
}

.trouble-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.trouble-item p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Mobile responsive for guide section */
@media(max-width: 768px) {
    .guide-section {
        padding: var(--space-lg);
        margin: var(--space-lg) 0;
    }
    
    .guide-header h2 {
        font-size: 1.5rem;
    }
    
    .guide-header p {
        font-size: 1rem;
    }
    
    .guide-steps {
        gap: var(--space-lg);
    }
    
    .guide-step {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .step-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .step-content h3 {
        font-size: 1.2rem;
    }
    
    .settings-grid,
    .export-options,
    .tips-grid,
    .troubleshooting-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .guide-tips h3,
    .guide-troubleshooting h3 {
        font-size: 1.3rem;
    }
}

@media(max-width: 480px) {
    .guide-section {
        padding: var(--space-md);
        margin: var(--space-md) 0;
    }
    
    .guide-header h2 {
        font-size: 1.3rem;
    }
    
    .guide-header p {
        font-size: 0.9rem;
    }
    
    .step-content h3 {
        font-size: 1.1rem;
    }
    
    .example-box {
        font-size: 0.8rem;
        padding: var(--space-sm);
    }
    
    .tip-card,
    .trouble-item {
        padding: var(--space-md);
    }
    
    .tip-card i {
        font-size: 1.5rem;
    }
    
    .trouble-item i {
        font-size: 1.2rem;
    }
}

/* Policy Pages Styles (Privacy Policy, Terms of Service, Disclaimer) */
.policy-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.policy-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.policy-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.policy-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

.policy-content {
    max-width: 800px;
    margin: 0 auto;
}

.policy-section-block {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.policy-section-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.policy-section-block h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.policy-section-block p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.policy-section-block ul {
    margin: var(--space-md) 0;
    padding-left: var(--space-lg);
}

.policy-section-block li {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

.contact-info {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-top: var(--space-md);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.contact-info p:last-child {
    margin-bottom: 0;
}

.contact-info i {
    color: var(--primary);
    width: 20px;
}

/* About Page Styles */
.about-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.about-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.about-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.about-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-section-block {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.about-section-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.about-section-block h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.about-section-block p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-lg) 0;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: var(--space-md);
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.target-audience {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-lg) 0;
}

.audience-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.audience-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.audience-item i {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: var(--space-sm);
}

.audience-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.audience-item p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-lg) 0;
}

.value-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.value-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.value-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.value-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.value-item p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.timeline {
    margin: var(--space-lg) 0;
}

.timeline-item {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    position: relative;
}

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

.timeline-date {
    background: var(--primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    min-width: 80px;
    text-align: center;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.timeline-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-lg) 0;
}

.contact-method {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-method i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.contact-method h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.contact-method p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Contact Page Styles */
.contact-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.contact-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.contact-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.contact-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

.contact-content {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info-section {
    margin-bottom: var(--space-xl);
}

.contact-info-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.contact-info-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.contact-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.contact-method-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.contact-method-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-method-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.contact-method-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.contact-method-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-sm);
}

.contact-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--raogy-brand);
}

/* Dark mode improvements for contact links */
[data-theme="dark"] .contact-link {
    color: #60a5fa; /* Brighter blue for better visibility */
}

[data-theme="dark"] .contact-link:hover {
    color: #93c5fd; /* Even brighter on hover */
}

.contact-form-section {
    margin-bottom: var(--space-xl);
}

.contact-form-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.contact-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 600px;
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Dark mode improvements for checkbox label links */
[data-theme="dark"] .checkbox-label a {
    color: #60a5fa; /* Brighter blue for better visibility */
}

[data-theme="dark"] .checkbox-label a:hover {
    color: #93c5fd; /* Even brighter on hover */
}

.submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
}

.submit-btn:hover {
    background: var(--raogy-brand);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.faq-section {
    margin-bottom: var(--space-xl);
}

.faq-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-lg);
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.faq-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.response-time-section {
    margin-bottom: var(--space-xl);
}

.response-time-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.response-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.response-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.response-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.response-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.response-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.response-item p {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.response-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Mobile responsive for all new pages */
@media(max-width: 768px) {
    .policy-section,
    .about-section,
    .contact-section {
        padding: var(--space-lg);
        margin: var(--space-lg) 0;
    }
    
    .policy-header h1,
    .about-header h1,
    .contact-header h1 {
        font-size: 2rem;
    }
    
    .policy-header p,
    .about-header p,
    .contact-header p {
        font-size: 1rem;
    }
    
    .policy-section-block h2,
    .about-section-block h2,
    .contact-info-section h2,
    .contact-form-section h2,
    .faq-section h2,
    .response-time-section h2 {
        font-size: 1.3rem;
    }
    
    .features-grid,
    .target-audience,
    .values-grid,
    .contact-methods-grid,
    .faq-grid,
    .response-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .timeline-item {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .timeline-date {
        align-self: flex-start;
    }
    
    .contact-form {
        padding: var(--space-lg);
    }
}

@media(max-width: 480px) {
    .policy-section,
    .about-section,
    .contact-section {
        padding: var(--space-md);
        margin: var(--space-md) 0;
    }
    
    .policy-header h1,
    .about-header h1,
    .contact-header h1 {
        font-size: 1.8rem;
    }
    
    .policy-header p,
    .about-header p,
    .contact-header p {
        font-size: 0.9rem;
    }
    
    .policy-section-block h2,
    .about-section-block h2,
    .contact-info-section h2,
    .contact-form-section h2,
    .faq-section h2,
    .response-time-section h2 {
        font-size: 1.2rem;
    }
    
    .feature-card,
    .audience-item,
    .value-item,
    .contact-method-card,
    .faq-item,
    .response-item {
        padding: var(--space-md);
    }
    
    .feature-card i,
    .audience-item i,
    .value-item i,
    .contact-method-card i,
    .response-item i {
        font-size: 1.5rem;
    }
    
    .contact-form {
        padding: var(--space-md);
    }
    
    .submit-btn {
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.9rem;
    }
}

/* Mobile responsive for footer */
@media(max-width: 768px) {
    .footer {
        padding: var(--space-md) 0;
        margin-top: var(--space-md);
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-md);
        padding: 0 var(--space-lg);
        text-align: center;
        max-width: 100%;
        align-items: center;
    }
    
    .footer-links {
        justify-content: center;
        gap: var(--space-sm);
    }
    
    .footer-brand {
        margin-bottom: var(--space-sm);
        text-align: center;
    }
    
    .footer-brand h3 {
        font-size: 1.3rem;
        margin-bottom: var(--space-xs);
    }
    
    .footer-brand p {
        font-size: 0.85rem;
    }
    
    .footer-links {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-xs);
        row-gap: var(--space-xs);
        max-width: 100%;
        width: 100%;
        align-items: center;
        justify-content: center;
    }
    
    .footer-links a {
        padding: var(--space-xs) var(--space-sm);
        margin: 0;
        font-size: 0.75rem;
        border-radius: 6px;
        flex: 0 0 auto;
        white-space: nowrap;
        justify-content: center;
        background: var(--bg-tertiary);
        border: 1px solid var(--border-color);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }
    
    .footer-links a:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(99, 102, 241, 0.1);
        background: var(--bg-secondary);
    }
    
    .footer-links a i {
        font-size: 0.7rem;
        width: 10px;
        margin-right: var(--space-xs);
    }
}

@media(max-width: 480px) {
    .footer {
        padding: var(--space-sm) 0;
        margin-top: var(--space-sm);
        margin-bottom: 0;
    }
    
    .footer-content {
        padding: 0 var(--space-sm);
        gap: var(--space-sm);
        max-width: 100%;
        align-items: center;
    }
    
    .footer-brand h3 {
        font-size: 1.2rem;
        margin-bottom: var(--space-xs);
    }
    
    .footer-brand p {
        font-size: 0.8rem;
    }
    
    .footer-links {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-xs);
        row-gap: var(--space-xs);
        max-width: 100%;
        width: 100%;
        align-items: center;
        justify-content: center;
    }
    
    .footer-links a {
        padding: var(--space-xs);
        margin: 0;
        font-size: 0.7rem;
        border-radius: 4px;
        flex: 0 0 auto;
        white-space: nowrap;
        justify-content: center;
        background: var(--bg-tertiary);
        border: 1px solid var(--border-color);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }
    
    .footer-links a:hover {
        transform: translateY(-1px);
        box-shadow: 0 1px 4px rgba(99, 102, 241, 0.1);
        background: var(--bg-secondary);
    }
    
    .footer-links a i {
        font-size: 0.65rem;
        width: 8px;
        margin-right: var(--space-xs);
    }
}

/* Fix mobile blank space issue and ensure consistent footer container size */
@media(max-width: 768px) {
    body {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        width: 100%;
        overflow-x: hidden;
    }
    
    .container {
        flex: 1;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }
    
    main {
        flex: 1;
        width: 100%;
    }
    
    .footer {
        margin-top: auto;
        width: 100%;
        max-width: 100%;
        margin-bottom: 0;
    }
}

/* Ensure consistent footer container size across all pages */
.footer {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

/* Container */