:root {
    --purple: #6c4df6;
    --pink: #ff6fae;
    --yellow: #ffd84d;
    --mint: #67e8c3;
    --blue: #63c7ff;
    --ink: #2f2a45;
    --paper: #fffdf8;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Trebuchet MS", Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 20% 10%, rgba(255,255,255,.9), transparent 25%),
        linear-gradient(180deg, #a9e6ff 0%, #eefcff 45%, #fff8da 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.topbar {
    width: min(1150px, 92%);
    margin: 18px auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,.85);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(47,42,69,.12);
    position: relative;
    z-index: 5;
}

.topbar div { display: flex; gap: 16px; align-items: center; }
.brand { font-size: 1.35rem; font-weight: 900; }
.small-btn { background: var(--yellow); padding: 9px 14px; border-radius: 14px; }

main { width: min(1150px, 92%); margin: 0 auto; }

.hero {
    min-height: 560px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 30px;
}

.hero h1, .dashboard-header h1 {
    font-size: clamp(2.7rem, 6vw, 5.5rem);
    line-height: .95;
    margin: 18px 0;
}

.hero p { font-size: 1.2rem; max-width: 650px; line-height: 1.6; }

.badge {
    display: inline-block;
    background: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(47,42,69,.1);
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.primary-btn, .music-btn {
    border: 0;
    border-radius: 18px;
    padding: 14px 22px;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 0 rgba(47,42,69,.18);
    transition: .18s;
}

.primary-btn { background: var(--purple); color: white; }
.music-btn { background: var(--yellow); color: var(--ink); }
.primary-btn:hover, .music-btn:hover { transform: translateY(-3px); }

.mascot-stage {
    position: relative;
    min-height: 420px;
    display: grid;
    place-items: center;
}

.mascot {
    font-size: 10rem;
    cursor: pointer;
    animation: bounce 2s infinite;
    filter: drop-shadow(0 18px 10px rgba(47,42,69,.15));
}

.speech-bubble {
    position: absolute;
    top: 30px;
    right: 20px;
    background: white;
    padding: 14px 20px;
    border-radius: 20px;
    font-weight: 900;
}

.floating-candy {
    position: absolute;
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}
.candy-a { left: 15px; top: 80px; }
.candy-b { right: 20px; bottom: 90px; animation-delay: .5s; }
.candy-c { left: 60px; bottom: 35px; animation-delay: 1s; }

.feature-grid, .activity-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin: 30px 0 70px;
}

.feature-card, .activity-card, .form-card, .game-card {
    background: rgba(255,255,255,.92);
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 14px 35px rgba(47,42,69,.12);
}

.feature-card { text-align: center; }
.feature-card span, .activity-icon { font-size: 3.4rem; }

.activity-grid { grid-template-columns: repeat(3, 1fr); }
.activity-card { transition: .2s; }
.activity-card:hover { transform: translateY(-8px) rotate(-1deg); }

.progress-track {
    height: 12px;
    border-radius: 10px;
    background: #ece8ff;
    overflow: hidden;
    margin: 15px 0 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pink), var(--yellow));
}

.form-page { min-height: 75vh; display: grid; place-items: center; }
.form-card { width: min(520px, 100%); }
.form-card h1 { text-align: center; }
.form-character { text-align: center; font-size: 5rem; }
.form-card form { display: grid; gap: 10px; }
label { font-weight: 900; margin-top: 10px; }
input {
    padding: 14px 16px;
    border: 3px solid #e6e0ff;
    border-radius: 15px;
    font-size: 1rem;
}
input:focus { outline: none; border-color: var(--purple); }
.full-width { width: 100%; margin-top: 15px; }
.privacy-note { background: #fff8d9; padding: 13px; border-radius: 14px; font-size: .9rem; }

.flash-box {
    background: #fff;
    border-left: 6px solid var(--pink);
    border-radius: 14px;
    padding: 8px 16px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 65px 0 20px;
}
.dashboard-header h1 { font-size: clamp(2.3rem, 5vw, 4.3rem); }
.dashboard-mascot { font-size: 8rem; cursor: pointer; }

.game-shell { padding: 40px 0 70px; }
.game-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.score-box { background: white; padding: 12px 18px; border-radius: 18px; font-weight: 900; }
.back-link { font-weight: 900; }
.game-card { text-align: center; min-height: 520px; }
.game-character { font-size: 5rem; }
.visual-area { min-height: 120px; display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 4rem; }
.answer-area { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 25px 0; }

.answer-btn {
    border: 0;
    background: #fff1a8;
    border-radius: 18px;
    padding: 18px 24px;
    min-width: 90px;
    font-size: 1.4rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 7px 0 rgba(47,42,69,.15);
}
.answer-btn:hover { transform: translateY(-3px); }
.feedback { min-height: 34px; font-size: 1.35rem; font-weight: 900; }

.color-swatch {
    width: 90px;
    height: 90px;
    border-radius: 25px;
    border: 5px solid white;
    box-shadow: 0 8px 20px rgba(47,42,69,.15);
}

.shape {
    width: 100px;
    height: 100px;
    background: var(--pink);
    display: inline-block;
}
.circle { border-radius: 50%; }
.square { border-radius: 15px; }
.triangle {
    width: 0; height: 0; background: transparent;
    border-left: 55px solid transparent;
    border-right: 55px solid transparent;
    border-bottom: 100px solid var(--blue);
}

footer { text-align: center; padding: 30px; font-weight: 800; }

.cloud {
    position: fixed;
    opacity: .65;
    font-size: 5rem;
    z-index: -1;
}
.cloud-one { top: 100px; left: 2%; }
.cloud-two { top: 260px; right: 2%; }

@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-18px) rotate(2deg); }
}
@keyframes float {
    0%,100% { transform: translateY(0) rotate(-8deg); }
    50% { transform: translateY(-22px) rotate(8deg); }
}

@media (max-width: 850px) {
    .hero { grid-template-columns: 1fr; }
    .feature-grid, .activity-grid { grid-template-columns: repeat(2,1fr); }
    .mascot-stage { min-height: 300px; }
}

@media (max-width: 560px) {
    .topbar { align-items: flex-start; gap: 12px; }
    .topbar div { flex-direction: column; gap: 6px; align-items: flex-end; }
    .feature-grid, .activity-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3rem; }
    .dashboard-header { align-items: flex-start; }
    .dashboard-mascot { font-size: 4rem; }
}
