/* Base Styling */
.game-card {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 420px;
    margin: 20px auto;
    box-sizing: border-box;
}

/* Levels */
.level-tabs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}
.level-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 0;
    flex: 1;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #555;
    transition: 0.3s;
}
.level-btn:hover { background-color: #e2e6ea; }
.level-btn.active {
    background-color: #5b42f3;
    color: white;
    border-color: #5b42f3;
}

.game-card h1 {
    text-align: center;
    color: #5b42f3;
    margin: 0 0 15px 0;
    font-size: 28px;
}

/* Stats */
.stats-bar {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: #555;
    margin-bottom: 15px;
    font-weight: bold;
}
.mistake-text { color: #d93025; }

/* Sudoku Grid */
.sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    border: 2px solid #222;
    background: #fff;
    margin-bottom: 20px;
}
.cell {
    aspect-ratio: 1;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.1s;
    box-sizing: border-box;
}

.border-right { border-right: 2px solid #222; }
.border-bottom { border-bottom: 2px solid #222; }

/* Cell Colors & States */
.filled { font-weight: bold; color: #000; background-color: #f8f9fa; }
.user-filled { color: #5b42f3; font-weight: bold; } 
.error { color: #d93025; font-weight: bold; background-color: #fce8e6; } 
.selected { background-color: #4d8afe !important; color: white !important; }
.highlight { background-color: #cce5ff !important; }

/* Numpad */
.numpad {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.num-btn {
    background: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 0;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: 0.2s;
}
.num-btn:hover { background: #e2e6ea; }

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
}
.action-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}
.btn-new { background-color: #5b42f3; }
.btn-new:hover { background-color: #4a34c8; }
.btn-solve { background-color: #00c471; }
.btn-solve:hover { background-color: #00a05c; }