:root {
    --primary: #8b5cf6;
    /* Violet */
    --primary-dark: #7c3aed;
    --accent: #fbbf24;
    /* Amber/Gold */
    --bg-dark: #2e0249;
    /* Deep Purple */
    --bg-card: #581c87;
    /* Purple 900-ish */
    --bg-card-hover: #6b21a8;
    --text-main: #ffffff;
    --text-muted: #d8b4fe;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    /* Mobile-like layout centering */
    display: flex;
    justify-content: center;
    min-height: 100vh;
    color: var(--text-main);
    animation: gradientBG 15s ease infinite;
    background-size: 400% 400%;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.container {
    width: 100%;
    max-width: 480px;
    /* Mobile width */
    position: relative;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* --- STEP 1: Age Gate (Themed to match) --- */
.age-gate-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80vh;
    /*Center vertically */
    text-align: center;
}

.lock-icon-circle {
    width: 96px;
    height: 96px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--text-main);
}

.age-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.age-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 48px;
}

.age-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-age {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 18px;
    border-radius: 12px;
    /* Smoother corner */
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-age:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.98);
}

.btn-age.primary {
    background: var(--text-main);
    color: var(--bg-dark);
}

/* --- STEP 2: Playful Rewards Implementation --- */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 8px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f97316, #db2777);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-count {
    color: #fca5a5;
    /* Light red/pink */
    font-weight: 700;
    font-size: 14px;
}

.hero-text {
    text-align: center;
    margin-bottom: 24px;
}

.hero-text h1 {
    font-size: 26px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.hero-text h1 span {
    color: var(--accent);
}

.hero-text p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Redeem Card */
.redeem-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.redeem-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.redeem-value {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dollar-icon {
    color: var(--accent);
}

/* Steps List */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    /* Space for footer */
    padding-bottom: 100px;
    /* Scroll space */
}

.step-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.step-number {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.step-info {
    flex: 1;
}

.step-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.step-desc {
    color: var(--text-muted);
    font-size: 13px;
}

/* Specific styling for Step 2 (Active/Required) */
.step-item.active {
    border: 1px solid var(--primary);
    /* Or Accent */
    background: rgba(139, 92, 246, 0.15);
    position: relative;
    /* Inner glow effect */
    box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.2);
}

.required-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sticky Bottom Footer */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    background: linear-gradient(to top, var(--bg-dark) 80%, transparent);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.btn-continue {
    width: 100%;
    max-width: 440px;
    background: #2e1065;
    /* Darker purple button */
    color: white;
    font-size: 18px;
    font-weight: 700;
    padding: 18px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* Shimmer Effect */
.btn-continue::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

/* Live Activity Toast */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 90%;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 12px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 13px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    margin-bottom: 8px;
}

.toast.fade-out {
    animation: slideUp 0.5s ease forwards;
}

.toast-avatar {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.footer-note {
    font-size: 11px;
    color: #6b7280;
}