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

/* Default light theme */
:root {
    --color-bg: #FAFAFA;
    --color-surface: #FFFFFF;
    --color-border: #E8E8E8;
    --color-text-primary: #1A1A1A;
    --color-text-secondary: #757575;
    --color-accent: #5B9BD5;
}

/* Dark theme via system preference */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-bg: #0A0A0A;
        --color-surface: #1E1E1E;
        --color-border: #2A2A2A;
        --color-text-primary: #F5F5F5;
        --color-text-secondary: #9E9E9E;
        --color-accent: #E8B563;
    }
}

/* Dark theme via manual toggle */
:root[data-theme="dark"] {
    --color-bg: #0A0A0A;
    --color-surface: #1E1E1E;
    --color-border: #2A2A2A;
    --color-text-primary: #F5F5F5;
    --color-text-secondary: #9E9E9E;
    --color-accent: #E8B563;
}

/* Light theme via manual toggle */
:root[data-theme="light"] {
    --color-bg: #FAFAFA;
    --color-surface: #FFFFFF;
    --color-border: #E8E8E8;
    --color-text-primary: #1A1A1A;
    --color-text-secondary: #757575;
    --color-accent: #5B9BD5;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--color-border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    background: var(--color-bg);
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.header-left {
    flex-shrink: 0;
}

.logo-link {
    display: block;
    line-height: 0;
}

.logo {
    height: 48px;
    width: auto;
    display: block;
}

/* Show/hide logo based on theme */
.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

:root[data-theme="dark"] .logo-light,
html[data-theme="dark"] .logo-light {
    display: none;
}

:root[data-theme="dark"] .logo-dark,
html[data-theme="dark"] .logo-dark {
    display: block;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .logo-light {
        display: none;
    }
    
    :root:not([data-theme="light"]) .logo-dark {
        display: block;
    }
}

.header-nav {
    display: flex;
    gap: 24px;
    flex: 1;
}

.header-nav a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.header-nav a:hover {
    color: var(--color-text-primary);
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}

.theme-toggle:hover {
    border-color: var(--color-text-secondary);
}

.theme-icon {
    font-size: 20px;
    color: var(--color-text-primary);
}

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

.store-badge-small {
    display: block;
    width: 120px;
    transition: opacity 0.2s;
}

.store-badge-small:hover {
    opacity: 0.8;
}

.store-badge-small img {
    width: 100%;
    height: auto;
    display: block;
}

/* Apple badge - 82% width with 9% margin to match Google's visual size */
.store-badge-small.store-badge-apple img {
    width: 82%;
    margin: 9%;
}

/* Google badge - full width */
.store-badge-small.store-badge-google img {
    width: 100%;
    margin: 0;
}

.btn-primary {
    background: var(--color-text-primary);
    color: var(--color-bg);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: 6px;
    transition: opacity 0.2s;
    display: inline-block;
}

.btn-primary:hover {
    opacity: 0.8;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Hero */
.hero {
    padding: 80px 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-text {
    max-width: 500px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-badges {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.store-badge {
    display: block;
    width: 165px;
    transition: opacity 0.2s;
}

.store-badge:hover {
    opacity: 0.8;
}

.store-badge img {
    width: 100%;
    height: auto;
    display: block;
}

/* Apple badge - 82% width with 9% margin to match Google's visual size */
.store-badge-apple img {
    width: 82%;
    margin: 9%;
}

/* Google badge - full width */
.store-badge-google img {
    width: 100%;
    margin: 0;
}

.hero-note {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Phone Frame Demo */
.hero-demo {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Realistic phone mockup */
.mock-phone {
    --w: 340px;
    --outer-r: 44px;
    --bezel: 14px;
    --inner-r: 34px;

    width: var(--w);
    aspect-ratio: 9 / 19.5;
    position: relative;
    filter: drop-shadow(0 8px 22px rgba(0,0,0,.18));
}

.mock-phone__body {
    position: absolute;
    inset: 0;
    border-radius: var(--outer-r);
    background:
        radial-gradient(140% 120% at 20% 10%, rgba(255,255,255,.16), rgba(255,255,255,0) 45%),
        radial-gradient(140% 140% at 80% 90%, rgba(255,255,255,.06), rgba(255,255,255,0) 55%),
        linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0) 22%),
        linear-gradient(180deg, #0b0d12, #05060a);
    box-shadow:
        0 26px 70px rgba(0,0,0,.38),
        0 8px 18px rgba(0,0,0,.22);
    border: 1px solid rgba(255,255,255,.10);
    overflow: visible;
}

.mock-phone__body::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: calc(var(--outer-r) - 6px);
    border: 1px solid rgba(255,255,255,.10);
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,.55),
        inset 0 0 18px rgba(255,255,255,.05);
    pointer-events: none;
}

.mock-phone__screen {
    position: absolute;
    inset: var(--bezel);
    border-radius: var(--inner-r);
    overflow: hidden;
    background: var(--color-bg);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.07),
        inset 0 -20px 50px rgba(255,255,255,.03);
}

.mock-phone__screen::after {
    content: "";
    position: absolute;
    inset: -30%;
    transform: rotate(18deg);
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,.07) 35%,
        rgba(255,255,255,0) 60%
    );
    opacity: .55;
    pointer-events: none;
}

.phone-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

/* Sensor bar */
.mock-phone__sensorbar {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 46%;
    height: 28px;
    border-radius: 0 0 18px 18px;
    background: rgba(0,0,0,.78);
    box-shadow:
        0 2px 0 rgba(255,255,255,.06),
        inset 0 0 0 1px rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: none;
    z-index: 10;
}

.mock-phone__cam {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, #5fb5ff, #0c1d33 55%, #000 72%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}

.mock-phone__earpiece {
    width: 52px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
}

.mock-phone__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
}

/* Side buttons */
.mock-phone__btn {
    position: absolute;
    width: 3px;
    background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
    border-radius: 999px;
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,.55),
        0 2px 8px rgba(0,0,0,.25);
    opacity: .95;
}

.mock-phone__btn--vol1 { left: -2px; top: 112px; height: 36px; }
.mock-phone__btn--vol2 { left: -2px; top: 156px; height: 36px; }
.mock-phone__btn--power { right: -2px; top: 132px; height: 54px; }

.app-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--color-border);
}

.app-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Countdown Card (exact Flutter specs) */
.countdown-card {
    margin: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
}

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

.card-title {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-text-primary);
}

.card-chevron {
    font-size: 24px;
    color: var(--color-text-secondary);
    line-height: 1;
}

.card-days {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.0;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.card-label {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

/* Progress Bar (exact Flutter specs) */
.progress-bar {
    height: 8px;
    background: var(--color-bg);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Sections */
.section {
    padding: 80px 0;
    border-top: 1px solid var(--color-border);
}

.section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 32px;
    letter-spacing: 0.01em;
}

.section-description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    max-width: 700px;
}

.section-note {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.section-dark {
    background: var(--color-surface);
    margin: 0 -24px;
    padding: 80px 24px;
}

/* Features */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
    max-width: 900px;
}

.feature-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-item p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 800px;
}

.step {
    text-align: center;
}

.step-number {
    display: inline-block;
    width: 48px;
    height: 48px;
    line-height: 48px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-bg);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.step p {
    color: var(--color-text-secondary);
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 700px;
}

.pricing-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 32px;
}

.pricing-card-pro {
    border-color: var(--color-accent);
    position: relative;
}

.pricing-tier {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-features {
    list-style: none;
    margin-bottom: 24px;
}

.pricing-features li {
    padding: 8px 0;
    color: var(--color-text-secondary);
}

.pricing-price {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-trial {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.pricing-note {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

/* FAQ */
.faq-list {
    max-width: 800px;
}

.faq-item {
    padding: 32px 0;
    border-bottom: 1px solid var(--color-border);
}

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

.faq-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

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

/* Footer */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 40px 24px;
    text-align: center;
    margin-top: 80px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

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

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

.footer-links span {
    color: var(--color-text-secondary);
}

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

/* Legal Pages */
.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
}

.legal-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}

.legal-container .last-updated {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 48px;
}

.legal-container h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 48px;
    margin-bottom: 16px;
}

.legal-container h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal-container p,
.legal-container li {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.legal-container ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.legal-container a {
    color: var(--color-accent);
    text-decoration: none;
}

.legal-container a:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-bottom: 32px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--color-text-primary);
}

/* Support Page */
.support-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 80px 24px;
    text-align: center;
}

.support-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: 0.01em;
}

.support-email {
    font-size: 1.3rem;
    color: var(--color-accent);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 48px;
}

.support-email:hover {
    opacity: 0.8;
}

.support-info {
    text-align: left;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 24px;
}

.support-info p {
    margin-bottom: 16px;
    color: var(--color-text-secondary);
}

.support-info ul {
    margin-left: 24px;
    margin-bottom: 0;
}

.support-info li {
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.support-note {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .hero-text {
        max-width: 100%;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-demo {
        order: -1;
    }

    .mock-phone {
        --w: 300px;
    }

    .card-days {
        font-size: 52px;
    }
}

@media (max-width: 900px) {
    .header-container {
        flex-wrap: wrap;
    }

    .header-badges {
        order: 3;
        width: 100%;
        margin-top: 16px;
        justify-content: center;
    }

    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 640px) {
    .logo {
        height: 40px;
    }

    .header-nav {
        gap: 16px;
    }

    .header-nav a {
        font-size: 0.85rem;
    }

    .hero {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-badges {
        justify-content: center;
    }

    .store-badge {
        width: 140px;
    }
    
    .store-badge-small {
        width: 100px;
    }

    .mock-phone {
        --w: 280px;
    }

    .countdown-card {
        margin: 12px;
        padding: 16px;
    }

    .card-days {
        font-size: 48px;
    }

    .section {
        padding: 60px 0;
    }

    .section h2 {
        font-size: 1.5rem;
    }

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

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