/* Newspaper crossword theme — black & white with pale multiplier tints */
:root {
    --bg: #f5f0e8;
    --bg-surface: #ece6d9;
    --bg-card: #e0d8c8;
    --primary: #333;
    --primary-light: #555;
    --accent: #1a1a1a;
    --text: #1a1a1a;
    --text-dim: #777;
    --success: #555;
    --danger: #900;

    /* Pale, washed-out multiplier tints */
    --tw-color: #e8c8c8;
    --dw-color: #ead8c4;
    --tl-color: #c8d8e8;
    --dl-color: #d0e0ea;
    --star-color: #e8e0c8;

    --tile-bg: #fff;
    --tile-text: #111;
    --tile-pending: #e8e0c0;
    --radius: 2px;
    --cell-gap: 0px;
}

html, body {
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* Board: black grid lines like a crossword */
.board {
    background: #111;
    padding: 1px;
    border: 2px solid #111;
    border-radius: 0;
    gap: 1px;
}

.cell {
    border-radius: 0;
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* Empty cells: crisp white (lower specificity than bonus classes) */
.cell--empty:not([class*="cell--bonus"]) {
    background: #fff;
}

/* Bonus squares: pale tints with dark text labels */
.cell--bonus-tw::after,
.cell--bonus-dw::after,
.cell--bonus-tl::after,
.cell--bonus-dl::after,
.cell--bonus-s::after {
    color: rgba(0, 0, 0, 0.35);
    font-size: clamp(4px, 1.1vw, 7px);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Occupied tiles: raised 3D look */
.cell--occupied {
    background: linear-gradient(170deg, #fff 0%, #f0ead8 60%, #ddd5c0 100%);
    color: #000;
    font-weight: 900;
    box-shadow: inset 0 -3px 1px rgba(0,0,0,0.18), inset 0 2px 1px rgba(255,255,255,1), 0 1px 2px rgba(0,0,0,0.25);
    text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}

/* Pending tiles: raised with emphasis border */
.cell--pending {
    background: linear-gradient(170deg, #f8f0d8 0%, #ece3c8 60%, #d8cfb5 100%);
    color: #000;
    box-shadow: 0 0 0 1.5px #333, inset 0 -3px 1px rgba(0,0,0,0.15), inset 0 2px 1px rgba(255,255,255,0.9), 0 1px 2px rgba(0,0,0,0.2);
    text-shadow: 0 1px 0 rgba(255,255,255,0.7);
    font-weight: 900;
}

.cell--drop-target {
    background: #ddd;
    box-shadow: inset 0 0 0 1.5px #333;
}

/* Rack tiles: raised 3D look */
.rack-tile {
    background: linear-gradient(170deg, #fff 0%, #f0ead8 60%, #ddd5c0 100%);
    color: #000;
    border: 1px solid #aaa;
    border-top-color: #ccc;
    border-bottom-color: #888;
    border-radius: 3px;
    box-shadow: 0 3px 5px rgba(0,0,0,0.3), inset 0 2px 1px rgba(255,255,255,1), inset 0 -2px 1px rgba(0,0,0,0.12);
    text-shadow: 0 1px 0 rgba(255,255,255,0.7);
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 900;
}

.rack-tile--dragging {
    opacity: 0.25;
}

.drag-ghost {
    background: linear-gradient(170deg, #fff 0%, #f0ead8 60%, #ddd5c0 100%);
    color: #000;
    border: 1px solid #999;
    border-radius: 3px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4), inset 0 2px 1px rgba(255,255,255,1);
    text-shadow: 0 1px 0 rgba(255,255,255,0.7);
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 900;
}

.rack--drop-target {
    outline-color: #333;
}

/* Logo: serif newspaper masthead */
.logo {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #111;
    font-weight: 900;
    letter-spacing: -2px;
}

.logo-small {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #111;
    font-weight: 900;
}

/* Buttons: outlined, minimal */
button {
    background: #fff;
    color: #111;
    border: 1px solid #999;
    border-radius: 2px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

button:active {
    background: #e8e0d0;
}

.action-btn.primary {
    background: #111;
    color: #fff;
    border-color: #111;
}

.action-btn.primary:active {
    background: #333;
}

#btn-login {
    background: #111;
    color: #fff;
    border-color: #111;
}

#btn-register {
    background: #fff;
    color: #111;
}

#btn-new-game {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* Inputs */
input[type="text"], input[type="password"] {
    background: #fff;
    border: 1px solid #aaa;
    color: #111;
    font-family: 'Georgia', 'Times New Roman', serif;
}

input:focus {
    border-color: #333;
}

/* Headers and surfaces */
.lobby-header,
.game-header,
.stats-header {
    background: #ece6d9;
    border-bottom: 1px solid #ccc;
}

.info-bar {
    background: #f5f0e8;
    color: #777;
}

/* Score display */
.score.you { color: #111; }
.score.opp { color: #777; }
.score-sep { color: #aaa; }

.turn-indicator.your-turn {
    background: #111;
    color: #fff;
}

.turn-indicator.their-turn {
    background: #e0d8c8;
    color: #777;
}

/* Game cards */
.game-card {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 2px;
}

.game-card:active {
    background: #f0ead8;
}

.game-turn.your-turn {
    background: #111;
    color: #fff;
}

.game-turn.their-turn {
    background: #e0d8c8;
    color: #777;
}

.game-turn.finished {
    background: #ccc;
    color: #333;
}

/* Suggestions */
.suggestions {
    background: #fff;
    border-color: #ccc;
}

.suggestion-item:hover {
    background: #f0ead8;
}

/* Modal: paper-like */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.3);
}

.modal-content {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-header .word {
    color: #111;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.modal-close {
    color: #999;
}

.definition {
    color: #333;
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* Blank picker */
.blank-picker h3 {
    color: #111;
}

.letter-grid button {
    background: #fff;
    color: #111;
    border: 1px solid #ccc;
    border-radius: 2px;
}

.letter-grid button:active {
    background: #e8e0d0;
}

/* Stats */
.stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 2px;
}

.stat-item .stat-value {
    color: #111;
}

.word-list li {
    border-bottom-color: #e0e0e0;
}

.word-list .word-name {
    color: #111;
}

/* Banner */
.banner {
    background: #111;
    color: #fff;
}

/* Move history */
.move-history {
    background: #ece6d9;
}

.history-entry {
    border-bottom-color: #ddd;
}

.history-entry .move-words {
    color: #111;
}
