        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            user-select: none;
        }

        body {
            min-height: 100vh;
            background: linear-gradient(135deg, #0b3b3f 0%, #1e6b5e 100%);
            font-family: 'Poppins', 'Comic Neue', 'Segoe UI', 'Comic Neue', 'Chalkboard SE', cursive, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .game-container {
            max-width: 950px;
            width: 100%;
            background: rgba(253, 253, 235, 0.97);
            border-radius: 80px 60px 80px 60px;
            box-shadow: 0 25px 40px rgba(0, 0, 0, 0.3);
            overflow: hidden;
        }

        .stats-panel {
            background: #ffb347;
            padding: 20px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
            border-bottom: 6px solid #e67e22;
            background-image: radial-gradient(circle at 20% 40%, rgba(255,220,100,0.3) 2%, transparent 2.5%);
            background-size: 25px 25px;
        }

        .score-box, .label-box {
            background: #2c2b1f;
            padding: 8px 18px;
            border-radius: 50px;
            color: #ffefb9;
            font-weight: bold;
            box-shadow: inset 0 -2px 0 #5e4a2a, 0 6px 12px rgba(0,0,0,0.2);
        }
        .score-box span, .label-box span {
            font-size: 1.7rem;
            font-weight: 800;
            color: #ffda88;
            margin-left: 10px;
            background: #3b2a1a;
            padding: 0 12px;
            border-radius: 40px;
        }

        .badge-area {
            background: #ffefcf;
            border-radius: 50px;
            padding: 6px 20px;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        .badge-icon { font-size: 2rem; filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.2));}
        .label-status {
            background: #ffb142;
            padding: 4px 14px;
            border-radius: 30px;
            color: #2e241a;
        }
        .name-row {
            background: #fff0d6;
            padding: 12px 25px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            border-bottom: 2px solid #ffc285;
        }
        .name-greeting {
            font-size: 1.2rem;
            font-weight: bold;
            background: #ffe3b5;
            padding: 6px 18px;
            border-radius: 40px;
            color: #a55217;
        }
        .name-control { display: flex; gap: 10px; flex-wrap: wrap; }
        .name-input {
            padding: 8px 15px;
            font-size: 1rem;
            border-radius: 60px;
            border: 2px solid #ffaa44;
            font-family: inherit;
        }
        .save-name-btn, .reset-btn {
            background: #ff914d;
            border: none;
            padding: 6px 18px;
            border-radius: 40px;
            color: white;
            font-weight: bold;
            cursor: pointer;
            transition: 0.1s;
        }
        .reset-btn { background: #c95a2c; }
        .save-name-btn:active, .reset-btn:active { transform: scale(0.96); }

        .quiz-card {
            padding: 35px 30px 25px;
        }
        .math-problem {
            background: #ffe5c4;
            border-radius: 65px;
            padding: 35px 20px;
            font-size: 2.4rem;
            font-weight: 700;
            text-align: center;
            color: #3b2a1f;
            border: 4px solid #ffb347;
            box-shadow: 0 12px 20px rgba(0,0,0,0.1);
            font-family: monospace;
            letter-spacing: 2px;
        }
        .input-area {
            margin: 35px 0 25px;
            display: flex;
            flex-wrap: wrap;
            gap: 18px;
            justify-content: center;
        }
        .answer-input {
            flex: 3;
            min-width: 200px;
            padding: 16px 20px;
            font-size: 1.4rem;
            border: 4px solid #ffb347;
            border-radius: 60px;
            background: white;
            font-family: inherit;
            font-weight: bold;
            text-align: center;
        }
        .submit-btn {
            flex: 1;
            background: #2ecc71;
            border: none;
            padding: 0 25px;
            font-size: 1.4rem;
            font-weight: bold;
            border-radius: 60px;
            color: white;
            cursor: pointer;
            box-shadow: 0 5px 0 #229954;
            transition: 0.05s linear;
        }
        .submit-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #229954; }
        .feedback {
            text-align: center;
            font-size: 1.3rem;
            font-weight: bold;
            padding: 12px;
            border-radius: 40px;
            background: #f2e8cf;
            margin-top: 10px;
        }
        .feedback.correct { background: #a3e4a3; color: #1a5a1a; }
        .feedback.wrong { background: #f8c6c6; color: #b33; }
        .puzzle-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            backdrop-filter: blur(8px);
        }
        .puzzle-card {
            background: #fff7e8;
            max-width: 500px;
            width: 90%;
            border-radius: 70px;
            padding: 30px;
            text-align: center;
            border: 5px solid #f39c12;
        }
        .puzzle-question {
            background: #ffefcf;
            padding: 20px;
            border-radius: 40px;
            font-size: 1.3rem;
            font-weight: bold;
            margin: 15px 0;
        }
        .puzzle-input {
            width: 100%;
            padding: 14px;
            font-size: 1.2rem;
            border-radius: 50px;
            border: 2px solid #ffb347;
            margin: 15px 0;
        }
        .puzzle-btn {
            background: #ff914d;
            padding: 12px 28px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 1.2rem;
            color: white;
            border: none;
            cursor: pointer;
        }
        footer {
            background: #ffe0b5;
            padding: 12px;
            text-align: center;
            font-weight: bold;
            color: #b45f2b;
        }
        @keyframes bounce {
            0% { transform: scale(1);}
            80% { transform: scale(1.02);}
        }
        .celebrate { animation: bounce 0.3s ease; }
        @media (max-width: 550px) {
            .math-problem { font-size: 1.6rem; }
        }
        .shake {
            animation: shakeAnim 0.2s ease-in-out 0s 2;
        }
        @keyframes shakeAnim {
            0% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
            100% { transform: translateX(0); }
        }