* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sunny-yellow: #ffc107;
    --warm-orange: #ff9800;
    --barn-red: #d84315;
    --grass-green: #4caf50;
    --sky-blue: #03a9f4;
    --bg-cream: #fff8e1;
    --bg-light: #fffef5;
    --bg-warm: #fff3e0;
    --text-dark: #3e2723;
    --text-medium: #5d4037;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.8;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

a {
    color: var(--barn-red);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--warm-orange);
}

/* Welcome Gate */
.welcome-gate {
    position: fixed;
    inset: 0;
    background: rgba(62, 39, 35, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
}

.welcome-gate.show {
    opacity: 1;
    visibility: visible;
}

.gate-content {
    background: linear-gradient(145deg, var(--bg-light), var(--bg-warm));
    border: 4px solid var(--sunny-yellow);
    border-radius: 24px;
    padding: 3rem;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.gate-emoji {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.gate-content h2 {
    color: var(--barn-red);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.gate-content p {
    color: var(--text-medium);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.gate-choices {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.gate-choice {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.gate-choice.yes {
    background: linear-gradient(135deg, var(--sunny-yellow), var(--warm-orange));
    color: var(--text-dark);
}

.gate-choice.yes:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 193, 7, 0.5);
}

.gate-choice.no {
    background: var(--bg-light);
    color: var(--text-medium);
    border: 2px solid var(--text-medium);
}

.gate-choice.no:hover {
    border-color: var(--text-dark);
    color: var(--text-dark);
}

/* Header */
.fun-header {
    background: linear-gradient(135deg, var(--sunny-yellow), var(--warm-orange));
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(255, 152, 0, 0.3);
}

.header-box {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-badge {
    width: 50px;
    height: 50px;
    background: var(--barn-red);
    color: white;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(216, 67, 21, 0.4);
}

.logo-name {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.burger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.burger-btn span {
    width: 28px;
    height: 4px;
    background: var(--text-dark);
    border-radius: 4px;
    transition: all 0.3s;
}

.fun-nav {
    display: flex;
    gap: 2rem;
}

.fun-nav a {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s;
}

.fun-nav a:hover,
.fun-nav a.selected {
    background: var(--barn-red);
    color: white;
}

/* Splash Area */
.splash-area {
    background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg-cream) 100%);
    padding: 5rem 2rem;
    text-align: center;
}

.splash-area h1 {
    font-size: 3.5rem;
    color: var(--barn-red);
    margin-bottom: 1.5rem;
}

.splash-text {
    font-size: 1.2rem;
    color: var(--text-medium);
    max-width: 750px;
    margin: 0 auto;
}

/* Page Top */
.page-top {
    background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg-cream) 100%);
    padding: 4rem 2rem;
    text-align: center;
}

.page-top h1 {
    font-size: 2.8rem;
    color: var(--barn-red);
    margin-bottom: 0.75rem;
}

.page-top p {
    color: var(--text-medium);
    font-size: 1.15rem;
}

/* Fun Boxes */
.fun-boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.fun-box {
    background: white;
    border: 3px solid var(--sunny-yellow);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.fun-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(255, 193, 7, 0.3);
}

.box-emoji {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
}

.fun-box h3 {
    color: var(--barn-red);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.fun-box p {
    color: var(--text-medium);
    font-size: 1rem;
}

/* Game Area */
.game-area {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.game-area.full {
    padding-top: 2rem;
}

.game-title {
    text-align: center;
    margin-bottom: 2rem;
}

.game-title h2 {
    color: var(--barn-red);
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
}

.game-title p {
    color: var(--text-medium);
    font-size: 1.1rem;
}

.game-box {
    background: white;
    border: 4px solid var(--sunny-yellow);
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: 0 10px 40px rgba(255, 152, 0, 0.2);
}

.game-box.big {
    aspect-ratio: 16 / 10;
    max-width: 1150px;
    margin: 0 auto;
}

.game-view {
    width: 100%;
    height: 100%;
    border: none;
}

/* Content Blocks */
.content-block {
    padding: 3rem 2rem;
    max-width: 950px;
    margin: 0 auto;
    border-bottom: 2px dashed var(--sunny-yellow);
}

.content-block:last-of-type {
    border-bottom: none;
}

.content-block h2 {
    color: var(--barn-red);
    font-size: 1.9rem;
    margin-bottom: 1.2rem;
}

.content-block p {
    color: var(--text-medium);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.content-block p:last-child {
    margin-bottom: 0;
}

.content-block.important {
    background: white;
    border: 3px solid var(--warm-orange);
    border-radius: 20px;
    padding: 2.5rem !important;
    margin: 2rem auto;
}

/* Perks List */
.perks-list {
    display: grid;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.perk {
    color: var(--text-medium);
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 15px;
    font-size: 1rem;
    border-left: 4px solid var(--grass-green);
}

/* Footer */
.fun-footer {
    background: linear-gradient(135deg, var(--sunny-yellow), var(--warm-orange));
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-box {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.help-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.help-label {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
}

.help-links a {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.footer-text {
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 1024px) {
    .fun-boxes {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .splash-area h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .burger-btn {
        display: flex;
    }

    .fun-nav {
        position: fixed;
        top: 82px;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, var(--sunny-yellow), var(--warm-orange));
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.35s;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

    .fun-nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .header-box {
        padding: 1rem 1.5rem;
    }

    .splash-area {
        padding: 3rem 1.5rem;
    }

    .splash-area h1 {
        font-size: 2.2rem;
    }

    .splash-text {
        font-size: 1rem;
    }

    .page-top {
        padding: 3rem 1.5rem;
    }

    .page-top h1 {
        font-size: 2.2rem;
    }

    .fun-boxes {
        padding: 2rem 1.5rem;
    }

    .fun-box {
        padding: 2rem 1.5rem;
    }

    .game-area {
        padding: 2rem 1rem;
    }

    .game-box {
        aspect-ratio: 4 / 3;
    }

    .content-block {
        padding: 2rem 1.5rem;
    }

    .content-block h2 {
        font-size: 1.6rem;
    }

    .help-links {
        flex-direction: column;
        gap: 0.8rem;
    }

    .fun-footer {
        padding: 2rem 1.5rem;
    }

    .gate-content {
        margin: 1.5rem;
        padding: 2rem;
    }

    .gate-choices {
        flex-direction: column;
    }
}
