/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #242424; /* Dark background from your screenshot */
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    padding-top: 50px;
}

.app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* The Board Grid */
.board {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 12px;
}

/* Individual Board Cells */
.cell {
    width: 45px;
    height: 45px;
    background-color: #4a4a4a; /* Empty state color */
    border-radius: 50%; /* Makes them circles */
    cursor: pointer;
}

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

/* Buttons */
.controls {
    display: flex;
    gap: 10px;
}

button {
    background-color: #1a1a1a;
    color: white;
    border: 1px solid #4a4a4a;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

button:hover {
    background-color: #333333;
}

button.primary {
    border-color: #ffffff;
}

/* Pieces Tray Placeholder */
.pieces-tray {
    width: 100%;
    text-align: center;
    color: #888;
    border-top: 1px solid #444;
    padding-top: 20px;
}

.counter-text {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: bold;
    min-width: 100px;
    justify-content: center;
    color: #aaaaaa;
}

#difficulty-badge {
    margin: 15px auto 0 auto;
    padding: 8px 20px;
    background-color: #1a1a1a;
    border: 1px solid #4a4a4a;
    border-radius: 20px;
    font-size: 1.05rem;
    color: #e0e0e0;
    text-align: center;
    display: none;
    width: fit-content;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.palette {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

/* Replace .palette-btn styles with these */
.palette {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 0 20px;
}

.palette-piece {
    /* Content sizing now handled by absolute coordinate positioning logic */
    background-color: #1a1a1a;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.1s;
    min-width: 45px;
    min-height: 45px;
}

.palette-piece:hover {
    transform: scale(1.1);
    background-color: #2a2a2a;
}

.palette-piece.selected {
    border-color: #ffffff;
    transform: scale(1.2);
    background-color: #333333;
}

.palette-piece.used {
    opacity: 0.2;
    cursor: not-allowed;
    transform: none;
}

.mini-cell {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Floating Cursor Piece */
#cursor-piece {
    position: fixed;
    pointer-events: none; /* Let clicks pass through */
    z-index: 1000;
    display: none;
}

/* Blocker Tool Styling */
.blocker-style {
    background-color: #222 !important;
    border: 2px dashed #888 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #888 !important;
    font-weight: bold;
    font-size: 20px;
    box-sizing: border-box;
}

.blocker-style::after {
    content: 'X';
}