:root {
    --bg: #FFF5E6;
    --ink: #2D2D2D;
    --green: #4ADE80;
    --purple: #B37AED;
    --orange: #FF9F43;
    --white: #FFFFFF;
    --magenta: #FF3B8B;
}

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

body {
    background-color: var(--bg);
    color: var(--ink);
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Stickers */
.sticker {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    width: 36px;
    height: 36px;
}

.sticker-1 { top: 15vh; left: 8vw; transform: rotate(15deg); }
.sticker-2 { top: 45vh; right: 15vw; transform: rotate(-10deg); }
.sticker-3 { top: 250vh; left: 5vw; transform: rotate(20deg); }
.sticker-4 { top: 400vh; right: 10vw; transform: rotate(-5deg); }
.sticker-5 { top: 550vh; left: 12vw; transform: rotate(8deg); }

/* Ghost Lane */
.ghost-lane {
    position: fixed;
    right: 0;
    top: 0;
    width: 80px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    pointer-events: none;
}

.ghost-small {
    width: 40px;
    height: 48px;
    animation: ghost-float 8s ease-in-out infinite;
    cursor: pointer;
    pointer-events: all;
}

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

/* Sections */
.section {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

/* Section 1: The Arcade */
.section-arcade {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arcade-content {
    text-align: center;
}

.ghost-hero {
    width: 160px;
    height: 192px;
    margin: 0 auto 24px;
    transform: translateY(100px);
    opacity: 0;
    animation: bounce-in 0.8s ease 0.3s forwards;
}

@keyframes bounce-in {
    0% { transform: translateY(100px); opacity: 0; }
    60% { transform: translateY(-15px); opacity: 1; }
    80% { transform: translateY(8px); }
    100% { transform: translateY(0); opacity: 1; }
}

.arcade-title {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: clamp(1.75rem, 4vw, 3rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--ink);
    margin-bottom: 12px;
}

.arcade-title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: letter-enter 0.4s ease forwards;
}

.arcade-subtitle {
    font-family: 'Permanent Marker', cursive;
    font-weight: 400;
    font-size: 18px;
    color: var(--purple);
    opacity: 0;
    animation: fade-in 0.6s ease 1.5s forwards;
}

@keyframes letter-enter {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    to { opacity: 1; }
}

/* Lucky Cards */
.lucky-card {
    max-width: 340px;
    margin: 40px auto;
    padding: 28px;
    border: 3px solid var(--ink);
    border-radius: 12px;
    transform: rotate(var(--rotate, 0deg));
    box-shadow: 4px 4px 0 rgba(45,45,45,0.08);
    position: relative;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.5s ease;
}

.lucky-card.visible {
    opacity: 1;
}

.lucky-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.card-green { background-color: var(--green); }
.card-purple { background-color: var(--purple); color: var(--white); }
.card-orange { background-color: var(--orange); }
.card-white { background-color: var(--white); }

.card-large {
    max-width: 400px;
}

.card-sticker {
    position: absolute;
    top: -12px;
    right: -8px;
    width: 30px;
    height: 30px;
    transform: rotate(15deg);
}

.card-title {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
}

.card-text {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
}

/* Wiggle on hover */
.lucky-card:hover {
    animation: wiggle 0.3s ease;
}

@keyframes wiggle {
    0% { border-radius: 12px; }
    25% { border-radius: 14px 10px 14px 10px; }
    50% { border-radius: 10px 14px 10px 14px; }
    75% { border-radius: 14px 10px 14px 10px; }
    100% { border-radius: 12px; }
}

/* Section layouts */
.section-cards-1 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-left: 8vw;
}

.section-cards-2 {
    min-height: 160vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.section-cards-2 .lucky-card:nth-child(1) {
    margin-left: 15vw;
}

.section-cards-2 .lucky-card:nth-child(2) {
    margin-left: 40vw;
    margin-top: -40px;
}

.section-cards-3 {
    min-height: 140vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-cards-3 .lucky-card:nth-child(1) {
    margin-left: 25vw;
}

.section-cards-3 .lucky-card:nth-child(2) {
    margin-left: 10vw;
    margin-top: -20px;
}

/* Fortune Section */
.section-fortune {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fortune-cookie {
    width: 320px;
    padding: 32px 40px;
    background-color: var(--bg);
    border: 3px solid var(--ink);
    border-radius: 50% / 40%;
    text-align: center;
    box-shadow: 4px 4px 0 rgba(45,45,45,0.08);
}

.fortune-container {
    position: relative;
}

.fortune-text {
    font-family: 'Permanent Marker', cursive;
    font-weight: 400;
    font-size: 20px;
    color: var(--ink);
    display: none;
}

.fortune-1 { display: block; }

/* Jackpot */
.section-jackpot {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.color-burst {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.burst-square {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: block;
    transition: transform 0.6s ease;
}

.color-burst.burst .burst-square:nth-child(1) { transform: translate(-40px, -30px) rotate(45deg) scale(1.3); }
.color-burst.burst .burst-square:nth-child(2) { transform: translate(-20px, -50px) rotate(-30deg) scale(1.2); }
.color-burst.burst .burst-square:nth-child(3) { transform: translate(0, -40px) rotate(15deg) scale(1.4); }
.color-burst.burst .burst-square:nth-child(4) { transform: translate(20px, -50px) rotate(-45deg) scale(1.2); }
.color-burst.burst .burst-square:nth-child(5) { transform: translate(40px, -30px) rotate(30deg) scale(1.3); }

.jackpot-title {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2rem);
    text-transform: uppercase;
    color: var(--ink);
    text-align: center;
}

/* Confetti container */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.confetti-piece {
    position: absolute;
    width: 6px;
    height: 12px;
    opacity: 0;
    animation: confetti-fall 1.2s ease forwards;
}

@keyframes confetti-fall {
    0% { opacity: 1; transform: translateY(0) rotate(0deg); }
    100% { opacity: 0; transform: translateY(200px) rotate(720deg); }
}

/* Fade-in */
[data-fade] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-fade].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile */
@media (max-width: 768px) {
    .ghost-lane {
        width: 50px;
    }

    .ghost-small {
        width: 28px;
        height: 34px;
    }

    .section-cards-1 {
        padding-left: 20px;
    }

    .section-cards-2 .lucky-card:nth-child(1),
    .section-cards-2 .lucky-card:nth-child(2),
    .section-cards-3 .lucky-card:nth-child(1),
    .section-cards-3 .lucky-card:nth-child(2) {
        margin-left: auto;
        margin-right: auto;
        margin-top: 20px;
    }

    .lucky-card {
        max-width: calc(100% - 40px);
    }

    .card-large {
        max-width: calc(100% - 40px);
    }

    .sticker {
        display: none;
    }
}
