/* === CSS Variables === */
:root {
    /* Light Theme Colors - based on app_color_schemes.dart */
    --color-primary: #8D4F28;
    --color-on-primary: #FFFFFF;
    --color-primary-container: #FFAE7F;
    --color-on-primary-container: #673C22;
    --color-secondary: #765948;
    --color-on-secondary: #FFFFFF;
    --color-secondary-container: #FDD5BF;
    --color-on-secondary-container: #5C4131;
    --color-tertiary: #636133;
    --color-on-tertiary: #FFFFFF;
    --color-tertiary-container: #E6E2A9;
    --color-on-tertiary-container: #494923;
    --color-surface: #FFF8F5;
    --color-on-surface: #221A15;
    --color-surface-variant: #52443C;
    --color-outline: #85746B;
    --color-outline-variant: #D7C2B8;
    --color-shadow: #000000;
    --color-inverse-surface: #312823;
    --color-inverse-on-surface: #FCEAE2;
    --color-inverse-primary: #FFB68C;
    --color-surface-tint: #8D4F28;
    --color-surface-dim: #E7D7CF;
    --color-surface-bright: #FFF8F5;
    --color-surface-container: #FCEAE2;
    --color-surface-container-high: #F6E5DD;
    --color-surface-container-highest: #F0DFD7;
    
    /* Additional colors */
    --color-error: #B3261E;
    --color-on-error: #FFFFFF;
    --color-success: #4CAF50;
    --color-warning: #FF9800;
    --color-info: #2196F3;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;
    --spacing-3xl: 3rem;
    --spacing-4xl: 4rem;
    --spacing-5xl: 6rem;
    --spacing-6xl: 8rem;
    
    /* Border Radius */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-2xl: 1.5rem;
    --border-radius-3xl: 2rem;
    --border-radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-indexes */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-tooltip: 1070;
}

/* Dark Theme Colors */
[data-theme="dark"] {
    --color-primary: #D4A574;
    --color-on-primary: #3D2914;
    --color-primary-container: #573F28;
    --color-on-primary-container: #F1C18F;
    --color-secondary: #CFB8A3;
    --color-on-secondary: #32271A;
    --color-secondary-container: #4A3C2F;
    --color-on-secondary-container: #ECD4BF;
    --color-tertiary: #B5A193;
    --color-on-tertiary: #2F251B;
    --color-tertiary-container: #463B30;
    --color-on-tertiary-container: #D2BDAF;
    --color-surface: #120F0B;
    --color-on-surface: #E6E1DC;
    --color-surface-variant: #C8C0B8;
    --color-outline: #918A82;
    --color-outline-variant: #45403A;
    --color-shadow: #000000;
    --color-inverse-surface: #E6E1DC;
    --color-inverse-on-surface: #322E29;
    --color-inverse-primary: #8B5A1F;
    --color-surface-tint: #D4A574;
    --color-surface-dim: #120F0B;
    --color-surface-bright: #3A342E;
    --color-surface-container: #1F1B17;
    --color-surface-container-high: #2A2520;
    --color-surface-container-highest: #35302A;
    
    --color-error: #FFB4AB;
    --color-on-error: #690005;
}

/* === Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--color-on-surface);
    background-color: var(--color-surface);
    transition: color var(--transition-normal), background-color var(--transition-normal);
}

/* === Utility Classes === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-2xl) 0;
}

.section-padding {
    padding: var(--spacing-2xl) 0;
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-4xl);
    color: var(--color-on-surface);
}

.section-subtitle {
    font-size: var(--font-size-lg);
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--spacing-4xl);
    color: var(--color-surface-variant);
}

/* === New Boxed Section Component === */
.section-boxed {
    background: var(--color-surface-container);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--border-radius-2xl);
    max-width: 1200px;
    margin: var(--spacing-2xl) auto;
    padding-top: var(--spacing-4xl);
    padding-bottom: var(--spacing-4xl);
}

/* === Theme Selector === */
/* Combined and corrected styles for theme/lang selectors container */
.mobile-controls {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-lg); /* Added side padding */
    max-width: 1200px;
    margin: 0 auto;
}

.theme-selector, .lang-selector {
    background: var(--color-surface-container);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--border-radius-full);
    padding: var(--spacing-sm) var(--spacing-md);
    box-shadow: var(--shadow-md);
}

.theme-selector select, .lang-selector select {
    border: none;
    background: transparent;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-on-surface);
    cursor: pointer;
    outline: none;
    padding: var(--spacing-xs) var(--spacing-sm);
}

/* === Header === */
header {
    max-width: 1200px;
    margin: 0 auto var(--spacing-2xl); /* Removed top margin */
    border-radius: var(--border-radius-2xl);
    overflow: hidden;
    position: relative;
    color: var(--color-on-primary);
    border: 1px solid var(--color-outline-variant);
    box-shadow: var(--shadow-md);
}

.hero-background-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent 0%, transparent 60%, rgba(0, 0, 0, 0.7) 85%, rgba(0, 0, 0, 0.95) 100%);
    z-index: 2;
}

.header-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: var(--spacing-2xl) var(--spacing-4xl) var(--spacing-4xl);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
}

.hero-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: slideInUp 1s ease-out;
    max-width: 800px;
}

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

/* === Store Buttons General Styling === */
.header-cta-section {
    padding: var(--spacing-2xl) 0;
    background-color: var(--color-surface); /* Ensure consistent background */
}

.store-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.store-button {
    display: inline-block;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.store-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.store-button-image {
    height: 60px;
    width: auto;
    border-radius: var(--border-radius-md);
}

[data-theme="light"] .store-button-dark {
    display: none;
}

[data-theme="dark"] .store-button-light {
    display: none;
}


/* === Feature Cards === */
/* Remove custom title padding to rely on container */
/* DELETED .features-section .section-title rule */

/* Reintroduce container side padding for features section */
.features-section .container {
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-3xl);
}

.feature-card {
    background: var(--color-surface-container);
    border: 1px solid var(--color-outline-variant);
    padding: var(--spacing-2xl);
    border-radius: var(--border-radius-2xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
}

.feature-card:hover::before {
    opacity: 0.05;
}

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

.feature-card > * {
    position: relative;
    z-index: 2;
}

.feature-icon {
    width: 80px; /* Increased size for better visibility */
    height: 80px; /* Increased size for better visibility */
    margin: 0 auto var(--spacing-lg);
    background: none; /* Removed background gradient */
    border-radius: 0; /* Removed border-radius */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none; /* Removed box-shadow */
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure the image fits well */
    border-radius: var(--border-radius-lg); /* Added border-radius */
}

.feature-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--color-on-surface);
}

.feature-description {
    font-size: var(--font-size-base);
    color: var(--color-surface-variant);
    line-height: 1.6;
}



/* === Screenshots Carousel === */
/* Styling for .screenshots-section is now handled by .section-boxed */

.screenshots-carousel {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    position: relative;
    max-width: 100%;
    margin: var(--spacing-2xl) 0;
}

.carousel-content-wrapper {
    flex-grow: 1;
    overflow: hidden;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-on-primary);
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Prevent buttons from shrinking */
}

.carousel-btn:hover {
    background: var(--color-primary-container);
    color: var(--color-on-primary-container);
    transform: scale(1.1);
}

.carousel-container {
    overflow: hidden;
    border-radius: var(--border-radius-2xl);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    cursor: grab;
}

.carousel-track:active {
    cursor: grabbing;
}

.screenshot {
    flex: 0 0 calc(100% / 3);
    text-align: center;
    padding: var(--spacing-md);
    box-sizing: border-box;
}

.screenshot img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: var(--border-radius-2xl);
    box-shadow: var(--shadow-xl);
    transition: transform var(--transition-normal);
    border: 1px solid var(--color-outline-variant);
}

.screenshot img:hover {
    transform: scale(1.05);
}

.screenshot-title {
    margin-top: var(--spacing-lg);
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-on-surface);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: var(--color-outline-variant);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.indicator.active {
    background: var(--color-primary);
    transform: scale(1.2);
}

.indicator:hover {
    background: var(--color-primary-container);
}

/* === Stats Section === */
.stats-section-gradient {
    background: linear-gradient(135deg, var(--color-primary-container) 0%, var(--color-secondary-container) 100%);
    color: var(--color-on-primary-container);
}

.stats-section-gradient .section-title {
    color: var(--color-on-primary-container);
}

.stats-section-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.05) 25%, transparent 50%, rgba(255, 255, 255, 0.05) 75%, transparent 100%);
    z-index: 1;
}

.stats-section-gradient .container {
    position: relative;
    z-index: 2;
}

.stats-showcase {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-3xl);
    margin-top: var(--spacing-4xl);
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--border-radius-2xl);
    padding: var(--spacing-3xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
}

.stat-card:hover::before {
    opacity: 0.05;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-card > * {
    position: relative;
    z-index: 2;
}

.stat-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-sm);
    animation: float 3s ease-in-out infinite;
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.stat-number {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1;
}

.stat-text {
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--color-on-surface);
    opacity: 0.9;
    text-align: center;
}

/* === Final CTA === */
.final-cta-gradient {
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-on-primary);
}

.final-cta-gradient .final-cta-title,
.final-cta-gradient .final-cta-subtitle {
    color: var(--color-on-primary);
}

.final-cta-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-bottom: var(--spacing-2xl);
}

.final-cta-subtitle {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-3xl);
    opacity: 0.9;
}

/* === Footer === */
.footer {
    text-align: center;
    padding: var(--spacing-3xl) 0;
    color: var(--color-surface-variant);
    background: var(--color-surface-container);
    border-top: 1px solid var(--color-outline-variant);
}

/* === Animations === */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* === Responsive Design === */
@media (max-width: 1024px) and (min-width: 769px) {
    .screenshot {
        flex: 0 0 50%;
    }
}

@media (max-width: 768px) {
    header,
    .screenshots-section,
    .stats-section,
    .final-cta {
        margin-left: var(--spacing-lg);
        margin-right: var(--spacing-lg);
    }

    .section {
        padding: var(--spacing-lg) 0;
    }
    
    .hero-background-image {
        border-radius: var(--border-radius-xl);
    }
    
    .header::after {
        border-radius: var(--border-radius-xl);
    }
    
    .header-content {
        padding: var(--spacing-lg);
    }

    .hero-title {
        font-size: var(--font-size-xl); /* smaller font */
        line-height: 1.2; /* tighter line height */
    }
    
    .stats-showcase {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }

    .stat-card {
        padding: var(--spacing-lg);
    }

    .stat-icon {
        font-size: 32px;
    }

    .stat-number {
        font-size: var(--font-size-3xl);
    }
    
    .stat-text {
        font-size: var(--font-size-sm);
    }
    
    /* DELETED old theme-selector, lang-selector, and mobile-controls rules from this media query */
}

@media (max-width: 480px) {
    header,
    .screenshots-section,
    .stats-section,
    .final-cta {
        margin-left: var(--spacing-lg);
        margin-right: var(--spacing-lg);
    }

    .hero-title {
        font-size: var(--font-size-base);
        line-height: 1.1;
    }
    .header-content {
        padding-bottom: var(--spacing-3xl);
    }
    
    .header::before {
        background-size: cover;
        background-position: center center;
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .features-grid {
        gap: var(--spacing-lg);
    }
    
    .stats-showcase {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .stat-card {
        padding: var(--spacing-md);
    }
    
    .stat-icon {
        font-size: 24px;
    }

    .stat-number {
        font-size: var(--font-size-2xl);
    }

    .stat-text {
        font-size: var(--font-size-xs); /* Use xs font size */
    }
    
    .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
    
    .carousel-indicators {
        margin-top: var(--spacing-sm);
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
    
    .screenshots-section,
    .stats-section,
    .final-cta {
        margin-left: var(--spacing-sm);
        margin-right: var(--spacing-sm);
    }

    .section-boxed {
        margin-left: var(--spacing-lg);
        margin-right: var(--spacing-lg);
    }
}

@media (max-width: 1200px) {
    .section-boxed {
        margin-left: var(--spacing-lg);
        margin-right: var(--spacing-lg);
    }
}

/* === Print Styles === */
@media print {
    .theme-selector,
    .lang-selector,
    .store-buttons {
        display: none;
    }
    
    .header {
        background: none;
        color: #000;
    }
    
    .section {
        page-break-inside: avoid;
    }
} 

/* Ensure gradient overlays don't block clicks */
header::after, .stats-section-gradient::before, .final-cta-gradient::before { pointer-events: none; } 