/* Sudoku Style - Dark Neon */
body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    overflow: hidden;
    user-select: none;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

/* Header */
.header-bar {
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #1e1e1e;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4ecca3;
    text-shadow: 0 0 10px rgba(78, 204, 163, 0.4);
}

.stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
}
.stat-item { color: #aaa; }
.stat-val { color: #fff; font-weight: bold; }

/* Board */
#sudoku-board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    width: 90vw;
    height: 90vw;
    max-width: 500px;
    max-height: 500px;
    background: #111;
    border: 2px solid #555;
    margin-bottom: 20px;
}

.cell {
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    color: #4ecca3; /* User input color */
}

/* 3x3 Block Borders */
.cell[data-col="2"], .cell[data-col="5"] { border-right: 2px solid #666; }
.cell[data-row="2"], .cell[data-row="5"] { border-bottom: 2px solid #666; }

.cell.initial {
    color: #aaa;
    background: #1a1a1a;
    font-weight: bold;
    cursor: default;
}

.cell.selected {
    background: rgba(78, 204, 163, 0.2);
    box-shadow: inset 0 0 10px rgba(78, 204, 163, 0.2);
}

.cell.highlight {
    background: rgba(255, 255, 255, 0.1);
}

/* Notes Grid */
.cell.has-notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    font-size: 0.6rem;
    color: #888;
    align-items: center;
    justify-items: center;
    line-height: 1;
}

/* Controls */
.controls-area {
    width: 90vw;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.numpad {
    display: flex;
    justify-content: space-between;
}

.num-btn {
    flex: 1;
    height: 45px;
    margin: 0 2px;
    background: #2d2d2d;
    border: none;
    border-radius: 5px;
    color: #4ecca3;
    font-size: 1.2rem;
    cursor: pointer;
}
.num-btn:active { background: #4ecca3; color: #000; }

.action-row {
    display: flex;
    justify-content: space-between;
}

.act-btn {
    flex: 1;
    margin: 0 5px;
    padding: 10px;
    background: #333;
    border: none;
    border-radius: 5px;
    color: #eee;
    cursor: pointer;
    font-size: 0.9rem;
}
.act-btn.active {
    background: #f43f5e; /* Note mode active */
    color: white;
}
.act-btn:hover { background: #444; }

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #333;
    text-align: center;
}

.modal-title {
    font-size: 1.5rem;
    color: #4ecca3;
    margin-bottom: 20px;
}

.btn-primary {
    background: #4ecca3;
    color: #000;
    border: none;
    padding: 10px 25px;
    font-size: 1rem;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 20px;
    font-weight: bold;
}
.btn-primary:hover { background: #3db892; }

/* Difficulty Buttons */
.btn-level {
    background: #333;
    color: #eee;
    border: 1px solid #444;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-level:hover {
    background: #444;
    border-color: #4ecca3;
    color: #4ecca3;
}
.btn-level.expert {
    border-color: #f43f5e;
    color: #f43f5e;
}
.btn-level.expert:hover {
    background: #f43f5e;
    color: #fff;
}

@media (max-width: 500px) {
    #sudoku-board { height: 90vw; width: 90vw; }
    .num-btn { font-size: 1rem; }
}
