:root {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #20c997;
    --border-color: #343a40;
    --grid-line-color: #dee2e6;
    --room-border-width: 3px;
    --cell-size: 40px;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    margin-bottom: 20px;
    font-weight: 300;
}

.controls-area {
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

button:hover {
    filter: brightness(0.9);
}

#check-btn {
    background-color: var(--accent-color);
    color: #000;
}

#show-solution-btn {
    background-color: var(--secondary-color);
}

#message {
    min-height: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}
.msg-success { color: #198754; }
.msg-error { color: #dc3545; }

/* Board */
#board {
    display: grid;
    /* Grid columns are set in JS */
    background-color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 3px solid #000; /* Outer border */
    user-select: none;
    margin-bottom: 20px;
}

.cell {
    width: var(--cell-size);
    height: var(--cell-size);
    border: 1px solid var(--grid-line-color);
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cell:hover {
    background-color: #f1f1f1;
}

/* Room Borders */
.cell.border-top { border-top: var(--room-border-width) solid #000 !important; }
.cell.border-bottom { border-bottom: var(--room-border-width) solid #000 !important; }
.cell.border-left { border-left: var(--room-border-width) solid #000 !important; }
.cell.border-right { border-right: var(--room-border-width) solid #000 !important; }

/* Clues */
.clue-text {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
    line-height: 1;
}

/* States */
.state-black {
    background-color: #333 !important;
}

.state-white::after {
    content: ""; /* Dot for white */
    width: 6px;
    height: 6px;
    background-color: #ccc;
    border-radius: 50%;
}

/* Solution Container */
#solution-container {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: none;
    text-align: center;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    :root {
        --cell-size: 30px;
    }
    .controls-area {
        flex-direction: column;
        align-items: stretch;
    }
}
