: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);

    --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);

    --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;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Background Animation */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Header */
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-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--primary-btn-bg);
    color: var(--primary-btn-text);
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.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;
    }

    .features .container {
        grid-template-columns: 1fr;
    }
}