* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background: #3c096c;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            font-family: 'Segoe UI', 'Poppins', system-ui, sans-serif;
            padding: 16px;
        }

        /* Main container - fits on one screen */
        .sudoku-app {
            max-width: 950px;
            width: 100%;
            background: #8b8c89;
            backdrop-filter: blur(10px);
            border-radius: 40px;
            padding: 20px 24px 24px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(255, 200, 100, 0.3);
        }

        /* Header with Logo and Language */
        .app-header {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(255, 200, 100, 0.3);
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 800;
            background: black;
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            letter-spacing: -0.5px;
        }

        .lang-select {
            background: black;
            border: 1px solid #ffc975;
            border-radius: 30px;
            padding: 6px 14px;
            color: #ffd670;
            font-weight: 600;
            font-size: 0.75rem;
            cursor: pointer;
            outline: none;
        }

        /* Stats Row: Difficulty, Timer, Mistakes */
        .stats-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .difficulty-group {
            display: flex;
            gap: 8px;
            background: #124559;
            padding: 5px 12px;
            border-radius: 50px;
        }

        .diff-btn {
            background: none;
            border: none;
            padding: 6px 14px;
            font-weight: 700;
            border-radius: 40px;
            color: white;
            font-size: 0.7rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .diff-btn.active {
            background: #ff9770;
            color: #1e2a2f;
            box-shadow: 0 2px 8px rgba(255, 165, 89, 0.4);
        }

        .timer-box {
            background: black;
            padding: 6px 20px;
            border-radius: 40px;
            font-family: monospace;
            font-weight: bold;
            font-size: 1.3rem;
            letter-spacing: 2px;
            color: #ffd670;
            box-shadow: inset 0 0 4px #ffb347;
        }

        .mistakes-box {
            background: black;
            padding: 6px 18px;
            border-radius: 40px;
            color: #ffd670;
            font-weight: bold;
            font-size: 0.8rem;
        }

        /* Candidate button row - above board (like Shuffle/Clear in your example) */
        .candidate-row {
            display: flex;
            justify-content: flex-end;
            margin-bottom: 12px;
        }

        .candidate-btn {
            background: #124559;
            border: none;
            padding: 8px 20px;
            border-radius: 40px;
            font-weight: 600;
            font-size: 0.75rem;
            color:  white;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            transition: 0.1s;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        }

        .candidate-btn.active {
            background: #ff9770;
            color: #1e2a2f;
        }

        /* Main Game Area: Board (left) + Number Pad (right) */
        .game-layout {
            display: flex;
            gap: 24px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        /* Board Container */
        .board-container {
            flex: 2;
            min-width: 280px;
            position: relative;
        }

        .sudoku-grid {
            display: grid;
            grid-template-columns: repeat(9, 1fr);
            background-color: #2a2c3a;
            border: 2px solid #F3B33D;
            border-radius: 16px;
            overflow: hidden;
            aspect-ratio: 1 / 1;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
        }

        .cell {
            background-color: #FFF6E5;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border: 0.5px solid #cfbc91;
            position: relative;
        }

        .cell-value {
            font-size: 1.1rem;
            font-family: 'Courier New', monospace;
            font-weight: 600;
            color: black;
        }

        .candidates-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            grid-template-rows: repeat(3, 1fr);
            width: 100%;
            height: 100%;
            gap: 1px;
            padding: 2px;
        }

        .candidate-num {
            font-size: 0.55rem;
            font-weight: 500;
            color: #5a6e7a;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cell.prefix .cell-value {
            color: #2c7840;
            font-weight: 800;
        }

        .cell.selected {
            background: #FFE2A4;
            box-shadow: inset 0 0 0 2px #f39c12;
        }

        .cell.highlight-num {
            background: #fae6b3;
        }

        .cell.error-highlight {
            background: #ffcdd2;
        }
        .cell.error-highlight .cell-value {
            color: #c7362b;
        }

        .cell[data-row="2"], .cell[data-row="5"] {
            border-bottom: 2px solid #c67f2e;
        }
        .cell[data-col="2"], .cell[data-col="5"] {
            border-right: 2px solid #c67f2e;
        }

        /* Number Pad - Right Side Box (similar to controls in your layout) */
        .numpad-box {
            flex: 1;
            min-width: 140px;
            background: rgba(0, 0, 0, 0.35);
            border-radius: 28px;
            padding: 16px 12px;
            backdrop-filter: blur(4px);
            border: 1px solid rgba(255, 200, 100, 0.3);
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .numpad-title {
            font-size: 0.7rem;
            color: white;
            letter-spacing: 1px;
            margin-bottom: 12px;
            text-transform: uppercase;
        }

        .numpad-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            width: 100%;
        }

        .num-pad-btn {
            background: #124559;
            border-radius: 40px;
            padding: 10px 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.3rem;
            font-weight: 800;
            color: #FFD966;
            cursor: pointer;
            transition: 0.05s;
            box-shadow: inset 0 -2px 0 #0a1a22, 0 3px 6px black;
        }

        .num-pad-btn:active {
            transform: scale(0.94);
            background: #ff9770;
            color: #1f2f2f;
        }

        .erase-pad {
            background: #124559;
            margin-top: 6px;
        }

        /* Action Buttons Row */
        .actions-row {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            margin: 14px 0 12px;
        }

        .action-btn {
            background:  #124559;
            border: none;
            padding: 7px 16px;
            border-radius: 40px;
            font-weight: 600;
            font-size: 0.7rem;
            color: #ffffff;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            cursor: pointer;
            transition: 0.1s;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
        }

        .action-btn:active {
            transform: scale(0.96);
        }

        .solution-btn {
            background: #2e6b55;
            color: #FFE484;
        }

        /* Status Message */
        .status-msg {
            text-align: center;
            margin-top: 8px;
            font-size: 0.7rem;
            color: #ffdd99;
            font-weight: 500;
            padding: 6px;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 30px;
        }

        /* Game Over Mesh */
        .gameover-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: repeating-linear-gradient(45deg, rgba(0,0,0,0.85) 0px, rgba(0,0,0,0.85) 2px, rgba(180,60,50,0.7) 2px, rgba(180,60,50,0.7) 8px, rgba(0,0,0,0.85) 8px);
            backdrop-filter: blur(3px);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 20;
            animation: pulseRed 1s infinite;
        }

        .gameover-overlay span {
            background: #000000cc;
            padding: 10px 20px;
            border-radius: 50px;
            font-size: 1rem;
            font-weight: 900;
            color: #ff6b4a;
            border: 2px solid #ff3a00;
        }

        @keyframes pulseRed {
            0% { backdrop-filter: blur(3px); }
            50% { backdrop-filter: blur(5px); }
            100% { backdrop-filter: blur(3px); }
        }

        @media (max-width: 650px) {
            .sudoku-app { padding: 14px; }
            .game-layout { flex-direction: column; }
            .numpad-box { flex-direction: row; flex-wrap: wrap; gap: 10px; justify-content: center; }
            .numpad-grid { grid-template-columns: repeat(5, 1fr); width: auto; }
            .num-pad-btn { padding: 6px 12px; }
            .stats-row { gap: 8px; }
            .timer-box { font-size: 1rem; padding: 4px 12px; }
        }

        @media (max-height: 750px) {
            .sudoku-app { padding: 12px 20px; }
            .stats-row { margin-bottom: 10px; }
            .actions-row { margin: 8px 0; }
        }