        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            min-height: 100vh;
            background: linear-gradient(145deg, #4a2f6d 0%, #2e1a4a 100%);
            font-family: 'Poppins', 'Comic Neue', 'Segoe UI', 'Comic Neue', 'Chalkboard SE', cursive, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 16px;
        }

        /* main container - fully responsive */
        .game-container {
            max-width: 1000px;
            width: 100%;
            background: #fffaf2;
            border-radius: min(10vw, 80px) min(8vw, 60px) min(10vw, 80px) min(8vw, 60px);
            box-shadow: 0 25px 40px rgba(0, 0, 0, 0.3);
            overflow: hidden;
        }

        /* stats panel */
        .stats-panel {
            background: #ff9f4a;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 12px;
            border-bottom: 6px solid #d2691e;
            background-image: radial-gradient(circle at 30% 20%, rgba(255,235,150,0.3) 2%, transparent 2.5%);
            background-size: 22px 22px;
        }

        .score-box, .label-box {
            background: #241f2c;
            padding: 6px 15px;
            border-radius: 50px;
            color: #ffdd99;
            font-weight: bold;
            box-shadow: inset 0 -2px 0 #5a3e1f, 0 6px 12px rgba(0,0,0,0.2);
            font-size: clamp(0.9rem, 4vw, 1.2rem);
        }
        .score-box span, .label-box span {
            font-size: clamp(1.2rem, 6vw, 1.7rem);
            font-weight: 800;
            color: #ffc285;
            margin-left: 8px;
            background: #3a2a1a;
            padding: 0 10px;
            border-radius: 40px;
            display: inline-block;
        }

        .badge-area {
            background: #fae6c3;
            border-radius: 50px;
            padding: 5px 16px;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            font-size: clamp(0.8rem, 3.5vw, 1rem);
        }
        .badge-icon { font-size: clamp(1.5rem, 6vw, 2rem); }
        .label-status {
            background: #ffb347;
            padding: 4px 12px;
            border-radius: 30px;
            color: #2e2a1f;
        }

        /* name row */
        .name-row {
            background: #fbebcd;
            padding: 12px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            border-bottom: 2px solid #ffcb8a;
        }
        .name-greeting {
            font-size: clamp(0.85rem, 4vw, 1.2rem);
            font-weight: bold;
            background: #ffddb0;
            padding: 5px 15px;
            border-radius: 40px;
            color: #7b3f00;
        }
        .name-control {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }
        .name-input {
            padding: 8px 12px;
            font-size: clamp(0.8rem, 3.5vw, 1rem);
            border-radius: 60px;
            border: 2px solid #ffaa44;
            font-family: inherit;
            min-width: 120px;
        }
        .save-name-btn, .reset-btn {
            background: #ff8c42;
            border: none;
            padding: 8px 16px;
            border-radius: 40px;
            color: white;
            font-weight: bold;
            cursor: pointer;
            font-size: clamp(0.75rem, 3vw, 0.9rem);
            transition: 0.1s;
        }
        .reset-btn { background: #c95a2c; }
        .save-name-btn:active, .reset-btn:active { transform: scale(0.96); }

        /* quiz card */
        .quiz-card {
            padding: 25px 20px 20px;
        }
        .word-question {
            background: #f1e7d3;
            border-radius: 50px;
            padding: 25px 15px;
            font-size: clamp(1.2rem, 5vw, 1.8rem);
            font-weight: 600;
            text-align: center;
            color: #2c3e2f;
            border: 4px solid #ffb66b;
            box-shadow: 0 12px 20px rgba(0,0,0,0.1);
            word-break: break-word;
        }
        .input-area {
            margin: 30px 0 20px;
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            justify-content: center;
        }
        .answer-input {
            flex: 3;
            min-width: 180px;
            padding: 14px 18px;
            font-size: clamp(1rem, 4.5vw, 1.3rem);
            border: 4px solid #ffb347;
            border-radius: 60px;
            background: white;
            font-family: inherit;
            font-weight: 500;
            text-align: center;
        }
        .submit-btn {
            flex: 1;
            background: #34a86f;
            border: none;
            padding: 12px 18px;
            font-size: clamp(1rem, 4vw, 1.4rem);
            font-weight: bold;
            border-radius: 60px;
            color: white;
            cursor: pointer;
            box-shadow: 0 5px 0 #1f6e48;
            transition: 0.05s linear;
            min-width: 100px;
        }
        .submit-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #1f6e48; }

        .feedback {
            text-align: center;
            font-size: clamp(0.9rem, 4vw, 1.2rem);
            font-weight: bold;
            padding: 12px;
            border-radius: 40px;
            background: #f2e8cf;
            margin-top: 10px;
        }
        .feedback.correct { background: #b8e4b8; color: #1b5e1b; }
        .feedback.wrong { background: #ffcfcf; color: #b33; }

        /* puzzle modal - fully responsive */
        .puzzle-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            backdrop-filter: blur(6px);
            padding: 20px;
        }
        .puzzle-card {
            background: #fffaf0;
            max-width: 550px;
            width: 90%;
            border-radius: 50px;
            padding: 25px 20px;
            text-align: center;
            border: 5px solid #ffb347;
            max-height: 90vh;
            overflow-y: auto;
        }
        .puzzle-question {
            background: #ffe6c2;
            padding: 18px;
            border-radius: 40px;
            font-size: clamp(1rem, 4.5vw, 1.3rem);
            font-weight: bold;
            margin: 15px 0;
            word-break: break-word;
        }
        .puzzle-input {
            width: 100%;
            padding: 14px;
            font-size: clamp(1rem, 4vw, 1.2rem);
            border-radius: 50px;
            border: 2px solid #ff9f2e;
            margin: 15px 0;
        }
        .puzzle-btn {
            background: #ff8c42;
            padding: 12px 24px;
            border-radius: 50px;
            font-weight: bold;
            font-size: clamp(1rem, 4vw, 1.2rem);
            color: white;
            border: none;
            cursor: pointer;
        }

        footer {
            background: #fbddab;
            padding: 12px;
            text-align: center;
            font-weight: bold;
            color: #9b5e2c;
            font-size: clamp(0.7rem, 3vw, 0.9rem);
        }

        @keyframes bounce {
            0% { transform: scale(1);}
            80% { transform: scale(1.02);}
        }
        .celebrate { animation: bounce 0.3s ease; }
        .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); }
        }

        /* touch optimizations */
        button, .submit-btn, .save-name-btn, .reset-btn, .puzzle-btn {
            touch-action: manipulation;
        }
        input, button {
            font-size: 16px; /* prevents zoom on iOS */
        }
        @media (max-width: 550px) {
            .stats-panel { flex-direction: column; align-items: stretch; text-align: center; }
            .badge-area { justify-content: center; }
            .name-row { flex-direction: column; text-align: center; }
            .name-control { justify-content: center; }
            .quiz-card { padding: 20px 15px; }
            .input-area { flex-direction: column; }
            .submit-btn { width: 100%; }
        }