:root {
    /* Design Tokens extracted from Flutter App Theme */
    --primary-light: #6C63FF;
    --primary-dark: #8B83FF;
    --accent-mint: #4ECDC4;
    --accent-green: #45B7A0;
    --accent-purple: #BB86FC;
    --accent-orange: #FF8A65;

    /* Light Theme Defaults */
    --bg-color: #F5F7FA;
    --surface-color: #FFFFFF;
    --text-primary: #1A1D29;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --aurora-base:
        radial-gradient(circle at 8% 18%, rgba(78, 205, 196, 0.30), transparent 34%),
        radial-gradient(circle at 90% 10%, rgba(255, 138, 101, 0.22), transparent 32%),
        linear-gradient(135deg, #f7fbff 0%, #edf9f6 46%, #fff3e8 100%);
    --aurora-a: rgba(78, 205, 196, 0.62);
    --aurora-b: rgba(108, 99, 255, 0.42);
    --aurora-c: rgba(255, 138, 101, 0.38);
    --aurora-d: rgba(69, 183, 160, 0.34);

    --primary-btn-bg: var(--primary-light);
    --primary-btn-text: #FFFFFF;

    --iphone-mockup-bg: #FFFFFF;
    --iphone-mockup-border: #E5E7EB;
}

[data-theme="dark"] {
    --bg-color: #0F1117;
    --surface-color: #1A1D29;
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --border-color: #374151;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --aurora-base:
        radial-gradient(circle at 6% 14%, rgba(78, 205, 196, 0.24), transparent 36%),
        radial-gradient(circle at 82% 8%, rgba(187, 134, 252, 0.22), transparent 34%),
        radial-gradient(circle at 66% 86%, rgba(255, 138, 101, 0.14), transparent 30%),
        linear-gradient(135deg, #080a11 0%, #101827 44%, #171021 100%);
    --aurora-a: rgba(78, 205, 196, 0.52);
    --aurora-b: rgba(139, 131, 255, 0.54);
    --aurora-c: rgba(255, 138, 101, 0.34);
    --aurora-d: rgba(69, 183, 160, 0.32);

    --primary-btn-bg: var(--primary-dark);
    --iphone-mockup-bg: #1A1D29;
    --iphone-mockup-border: #374151;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.12) 36%, rgba(255, 255, 255, 0.22)),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.26), transparent 42%);
}

[data-theme="dark"] body::before {
    background:
        linear-gradient(180deg, rgba(8, 10, 17, 0.12), rgba(8, 10, 17, 0.54) 48%, rgba(8, 10, 17, 0.28)),
        radial-gradient(circle at 50% 0%, rgba(139, 131, 255, 0.08), transparent 44%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Background Animation */
#canvas-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: var(--aurora-base);
}

#canvas-container::before,
#canvas-container::after {
    content: "";
    position: absolute;
    inset: -28%;
    opacity: 0.9;
    filter: blur(34px) saturate(1.38);
    transform-origin: 50% 50%;
    will-change: transform;
}

#canvas-container::before {
    background:
        radial-gradient(ellipse at 22% 40%, var(--aurora-a), transparent 34%),
        radial-gradient(ellipse at 66% 28%, var(--aurora-b), transparent 34%),
        radial-gradient(ellipse at 78% 72%, var(--aurora-c), transparent 30%),
        radial-gradient(ellipse at 38% 82%, var(--aurora-d), transparent 32%);
    animation: auroraDrift 22s ease-in-out infinite alternate;
}

#canvas-container::after {
    background:
        conic-gradient(from 140deg at 50% 50%,
            transparent 0deg,
            var(--aurora-a) 52deg,
            transparent 116deg,
            var(--aurora-b) 184deg,
            transparent 252deg,
            var(--aurora-c) 310deg,
            transparent 360deg);
    opacity: 0.58;
    mix-blend-mode: screen;
    animation: auroraSweep 30s ease-in-out infinite alternate;
}

[data-theme="dark"] #canvas-container::after {
    opacity: 0.72;
}

@keyframes auroraDrift {
    0% {
        transform: translate3d(-4%, -3%, 0) rotate(-8deg) scale(1);
    }

    50% {
        transform: translate3d(3%, 2%, 0) rotate(7deg) scale(1.08);
    }

    100% {
        transform: translate3d(6%, -2%, 0) rotate(16deg) scale(1.04);
    }
}

@keyframes auroraSweep {
    0% {
        transform: translate3d(4%, 5%, 0) rotate(12deg) scale(1.08);
    }

    100% {
        transform: translate3d(-5%, -4%, 0) rotate(-18deg) scale(1.16);
    }
}

/* Header */
header,
main,
footer {
    position: relative;
    z-index: 1;
}

header {
    padding: 24px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.logo-img {
    height: 40px;
    width: 40px;
    object-fit: contain;
    transition: transform 0.1s ease-out;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--text-primary);
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

.light-icon {
    display: block;
}

.dark-icon {
    display: none;
}

[data-theme="dark"] .light-icon {
    display: none;
}

[data-theme="dark"] .dark-icon {
    display: block;
}

/* Hero Section */
.hero {
    padding: 60px 0;
    flex: 1;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 480px;
}

.cta-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.download-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: min(100%, 620px);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: var(--primary-btn-bg);
    color: var(--primary-btn-text);
    min-height: 64px;
    width: 100%;
    padding: 16px 22px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.download-btn .btn-content {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
}

.download-btn-secondary {
    background-color: rgba(255, 255, 255, 0.72);
    color: var(--text-primary);
    border: 1px solid rgba(108, 99, 255, 0.22);
    box-shadow: 0 4px 16px rgba(15, 17, 23, 0.08);
    backdrop-filter: blur(14px);
}

[data-theme="dark"] .download-btn-secondary {
    background-color: rgba(26, 29, 41, 0.78);
    color: var(--text-primary);
    border-color: rgba(139, 131, 255, 0.24);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.24);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108, 99, 255, 0.4);
}

.download-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.version-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-left: 4px;
}

/* Realistic Phone Mockup */
.phone-mockup {
    width: 320px;
    height: 650px;
    margin: 0 auto;
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
    transform: rotateY(-15deg) rotateX(10deg);
    transition: transform 0.5s ease;
}

.hero-image:hover .phone-mockup {
    transform: rotateY(-5deg) rotateX(5deg) scale(1.02);
}

.phone-frame {
    width: 100%;
    height: 100%;
    background: #1c1c1e;
    border-radius: 50px;
    padding: 12px;
    box-shadow:
        0 0 0 4px #3a3a3c,
        0 0 0 5px #1c1c1e,
        20px 20px 50px rgba(0, 0, 0, 0.3),
        -5px -5px 20px rgba(255, 255, 255, 0.05) inset;
    position: relative;
    overflow: hidden;
}

/* Notch */
.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    height: 30px;
    width: 100px;
    background: #000;
    border-radius: 0 0 16px 16px;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.camera {
    width: 8px;
    height: 8px;
    background: #1a1a1a;
    border-radius: 50%;
    box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.2);
}

.speaker {
    width: 40px;
    height: 4px;
    background: #2a2a2a;
    border-radius: 2px;
}

/* Buttons */
.power-btn,
.volume-btn,
.mute-switch {
    position: absolute;
    background: #2a2a2a;
    border-radius: 4px;
}

.power-btn {
    top: 180px;
    right: -6px;
    width: 6px;
    height: 80px;
}

.volume-btn {
    left: -6px;
    width: 6px;
    height: 50px;
}

.vol-up {
    top: 150px;
}

.vol-down {
    top: 215px;
}

.mute-switch {
    top: 100px;
    left: -6px;
    width: 6px;
    height: 30px;
}

/* Screen */
.screen-content {
    background-color: var(--iphone-mockup-bg);
    width: 100%;
    height: 100%;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.status-bar {
    height: 44px;
    padding: 0 24px 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-icons {
    display: flex;
    gap: 6px;
}

.app-ui {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

/* Original UI Cards - slightly adjusted for new frame */
.app-card {
    background-color: rgba(78, 205, 196, 0.1);
    color: var(--accent-mint);
    padding: 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    width: fit-content;
    margin: 0 auto;
    font-size: 0.9rem;
}

.stats-card {
    background: linear-gradient(135deg, #6C63FF, #4ECDC4);
    border-radius: 24px;
    padding: 24px;
    color: white;
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.2);
}

.stats-card span {
    font-size: 0.9rem;
    opacity: 0.9;
}

.stats-card h2 {
    font-size: 2.2rem;
    margin-top: 4px;
}

.voucher-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex: 1;
}

.voucher-item {
    height: 100px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.p5 {
    background: linear-gradient(135deg, #6C63FF, #8B83FF);
}

.p10 {
    background: linear-gradient(135deg, #4ECDC4, #45B7A0);
}

.p15 {
    background: linear-gradient(135deg, #FF8A65, #FF6B6B);
}

.p20 {
    background: linear-gradient(135deg, #BB86FC, #9C6ADE);
}


/* Features Section */
.features {
    padding: 80px 0;
}

.features .container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background-color: var(--surface-color);
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
}

.icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.icon-box .material-icons-round {
    font-size: 28px;
    color: white;
}

.icon-box.mint {
    background-color: var(--accent-mint);
}

.icon-box.purple {
    background-color: var(--accent-purple);
}

.icon-box.orange {
    background-color: var(--accent-orange);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer */
footer {
    padding: 40px 0;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        margin: 0 auto 32px auto;
    }

    .cta-group {
        align-items: center;
    }

    .download-actions {
        justify-content: center;
    }

    .features .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .download-actions {
        grid-template-columns: 1fr;
        width: min(100%, 360px);
    }

    .download-btn {
        min-height: 58px;
    }
}
