/* game_sudoku.css - 스도쿠 게임 전용 스타일 */

#sudoku-game-app { width: 100%; margin: 20px 0; }
.game-info {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 15px; padding: 0 10px; box-sizing: border-box; font-size: 1.5em; font-weight: bold;
}
#score { color: var(--color-primary); }
#timer { color: var(--text-main); }

#board-area {
    position: relative; width: 100%;
    max-width: 100%;
    margin: 0 auto 15px auto; aspect-ratio: 1 / 1;
}

#setup-container {
    position: absolute; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 15px;
    background: rgba(255,255,255,0.9); z-index: 10;
}
#setup-container select, #setup-container button { font-size: 1.2em; padding: 10px 20px; }

#sudoku-board {
    position: absolute; top: 0; left: 0; display: grid;
    grid-template-columns: repeat(9, 1fr); grid-template-rows: repeat(9, 1fr);
    width: 100%; height: 100%; border: 3px solid #333;
    background: white;
}

.cell {
    display: flex; justify-content: center; align-items: center;
    font-size: clamp(1em, 4vw, 1.8em); font-weight: bold; color: #333;
    border: 1px solid #ddd; box-sizing: border-box; cursor: pointer;
}
.cell:nth-child(3n) { border-right: 2px solid #333; }
.cell:nth-child(9n) { border-right-width: 1px; }
.cell:nth-child(n+19):nth-child(-n+27),
.cell:nth-child(n+46):nth-child(-n+54) { border-bottom: 2px solid #333; }

.cell:not(.editable) { background-color: #f0f0f0; color: #222; cursor: default; }
.cell.incorrect { background-color: var(--color-incorrect-bg) !important; color: var(--color-incorrect-text) !important; }
.highlight-focused { background-color: var(--color-focus-bg) !important; }
.highlight-same-number { background-color: var(--color-highlight-bg) !important; }
.highlight-selected-number { background-color: var(--color-selected-num-bg) !important; }

#number-input-buttons { display: flex; justify-content: space-between; width: 100%; margin-top: 15px; gap: 1%; }
#number-input-buttons .num-btn, #number-input-buttons #undo-btn {
    width: 9%; aspect-ratio: 1/1; font-size: clamp(1em, 4vw, 1.8em); font-weight: bold;
    border-radius: 8px; background-color: #f0f0f0; color: #333; border: 1px solid #ccc;
    display: flex; justify-content: center; align-items: center; padding: 0;
}
#number-input-buttons {
    display: flex;
    flex-direction: row; /* 가로 배치 강제 */
    justify-content: space-between;
    width: 100%;
    gap: 4px;
    margin-top: 10px;
}

#number-input-buttons .num-btn,
#number-input-buttons #undo-btn {
    flex: 1; /* 너비 균등 분할 */
    min-width: 0 !important; /* 전역 min-width 무시 */
    width: auto !important;
    padding: 0 !important;   /* 패딩 제거 */
    height: auto;
    aspect-ratio: 1/1;       /* 정사각형 유지 */

    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.action-buttons { display: flex; justify-content: center; gap: 10px; margin-top: 15px; width: 100%; }
.action-buttons button { flex-grow: 1; max-width: 200px; }