/* spellingbee-play.css — SP + MP play pages */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #1a1a2e;
    --surface: #1e2a45;
    --surface-light: #2a3a5c;
    --primary: #ffc970;
    --primary-light: #ffd98a;
    --primary-dark: #e6a84a;
    --accent: #7ee8a0;
    --accent-dark: #5cc87a;
    --text: #edf0f7;
    --text-dim: #8a92a8;
    --incorrect: #f08090;
    --already: #f0d070;
}

html, body { height: 100%; }
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    overflow-x: hidden;
}

/* ─── Login banner ─── */
.login-banner {
    width: 100%; max-width: 500px;
    background: var(--surface);
    border: 1px solid var(--surface-light);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.login-banner a { color: var(--accent); text-decoration: none; font-weight: 600; }
.dismiss-btn { background: none; border: none; color: var(--text-dim); font-size: 1.2rem; cursor: pointer; }

/* ─── Header ─── */
.game-header {
    width: 100%; max-width: 500px;
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
.hub-link { text-decoration: none; font-size: 1.4rem; }
.game-title { font-size: 1.4rem; font-weight: 900; letter-spacing: 2px; display: flex; gap: 1px; }
.game-title .letter { font-weight: 900; text-shadow: 0 0 10px currentColor; }
.header-controls { display: flex; align-items: center; gap: 8px; }
.word-counter { font-size: 1.1rem; font-weight: 700; }
.word-counter #found-count { color: var(--accent); }
.word-counter #total-count { color: var(--text-dim); }
.icon-btn { background: var(--surface); border: 1px solid var(--surface-light); border-radius: 8px; padding: 4px 8px; cursor: pointer; font-size: 1rem; }

/* ─── Stats dropdown ─── */
.stats-dropdown {
    width: 100%; max-width: 500px;
    background: var(--surface);
    border: 1px solid var(--surface-light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    animation: slideDown 0.2s ease;
}
.stats-dropdown.hidden { display: none; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.stat-item .stat-val { font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.stat-item .stat-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Progress bar ─── */
.progress-container {
    width: 100%; max-width: 500px;
    height: 4px; background: var(--surface); border-radius: 2px;
    margin-bottom: 8px; overflow: hidden;
}
.progress-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    border-radius: 2px; transition: width 0.3s ease;
}

/* ─── Puzzle Info Badge ─── */
.puzzle-info {
    width: 100%; max-width: 500px;
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 6px; font-size: 0.85rem;
}
.puzzle-info.hidden { display: none; }
.puzzle-info .puzzle-num { color: var(--text-dim); font-weight: 700; }
.puzzle-info .puzzle-name { font-weight: 700; color: var(--text); }
.puzzle-theme-badge {
    padding: 2px 8px; font-size: 0.7rem; font-weight: 600;
    background: rgba(255,201,112,0.15); color: var(--primary);
    border-radius: 4px; border: 1px solid rgba(255,201,112,0.3);
}

/* ─── Honeycomb Layout ─── */
.honeycomb-area {
    width: 100%; max-width: 500px;
    margin: 4px auto 10px;
    display: flex; flex-direction: column; align-items: center;
    position: relative;
    touch-action: none;
}

.hex-row {
    display: flex; justify-content: center; gap: 8px;
    margin-top: -33px;
}
.hex-row:first-child { margin-top: 0; }

.hex-cell {
    width: 140px; height: 160px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.8rem; font-weight: 800;
    text-transform: uppercase;
    cursor: pointer; user-select: none;
    position: relative;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--surface-light);
    color: var(--text);
    transition: transform 0.15s, background 0.15s;
}

.hex-cell:active { transform: scale(0.92); }
.hex-cell:hover { background: #2d4a70; }
.hex-cell.center {
    background: var(--primary);
    color: #1a1a2e;
}
.hex-cell.center:hover { background: var(--primary-light); }

/* Drag-active hex cells */
.hex-cell.drag-active {
    background: var(--accent);
    color: #1a1a2e;
    transform: scale(1.05);
}
.hex-cell.center.drag-active {
    background: var(--primary-light);
    transform: scale(1.05);
}

.hex-cell.pop-animation {
    animation: hexPop 0.2s ease;
}
@keyframes hexPop {
    0% { transform: scale(1); }
    50% { transform: scale(0.88); }
    100% { transform: scale(1); }
}

/* ─── Drag Preview (word being swiped) ─── */
.drag-preview {
    width: 100%; max-width: 500px;
    text-align: center;
    font-size: 1.5rem; font-weight: 800;
    letter-spacing: 4px; text-transform: uppercase;
    color: var(--accent);
    min-height: 36px;
    margin-bottom: 4px;
}
.drag-preview.hidden { visibility: hidden; }

/* ─── SVG line overlay for drag connections ─── */
.drag-svg-overlay {
    position: absolute;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 10;
}
.drag-line {
    stroke: var(--accent);
    stroke-width: 3;
    stroke-opacity: 0.6;
    stroke-linecap: round;
}

/* ─── Current Word Display ─── */
.current-word-area {
    width: 100%; max-width: 500px;
    text-align: center;
    min-height: 44px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 4px;
    position: relative;
}
.current-word {
    font-size: 1.6rem; font-weight: 800;
    letter-spacing: 4px; text-transform: uppercase;
    color: var(--text);
    min-height: 40px; display: flex; align-items: center;
    position: relative;
    z-index: 2;
    pointer-events: none;
}
.current-word .center-letter { color: var(--primary); }
.current-word.shake { animation: shake 0.4s ease; }

/* (keyboard input removed — hex taps and swipe only) */

/* ─── Action Buttons ─── */
.action-buttons {
    width: 100%; max-width: 500px;
    display: flex; justify-content: center; gap: 8px;
    margin-bottom: 8px;
}
.action-btn {
    padding: 10px 20px; font-size: 0.95rem; font-weight: 700;
    border-radius: 24px; cursor: pointer;
    border: 2px solid var(--surface-light);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    transition: all 0.2s;
}
.action-btn:hover { background: var(--surface-light); }
.action-btn.submit {
    background: var(--primary); color: #1a1a2e; border-color: var(--primary);
}
.action-btn.submit:hover { background: var(--primary-light); }

/* ─── Incorrect area ─── */
.incorrect-area {
    width: 100%; max-width: 500px;
    display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
    min-height: 30px; margin-bottom: 4px;
}
.incorrect-word {
    color: var(--incorrect); font-weight: 700; font-size: 0.9rem;
    padding: 3px 10px; border-radius: 6px;
    background: rgba(240, 128, 144, 0.15); border: 1px solid rgba(240, 128, 144, 0.3);
    animation: shake 0.4s ease;
}
.already-found-tag {
    color: var(--already); font-weight: 700; font-size: 0.9rem;
    padding: 3px 10px; border-radius: 6px;
    background: rgba(240, 208, 112, 0.15); border: 1px solid rgba(240, 208, 112, 0.3);
    animation: shake 0.3s ease;
}
.too-short-tag {
    color: var(--text-dim); font-weight: 700; font-size: 0.9rem;
    padding: 3px 10px; border-radius: 6px;
    background: rgba(138, 146, 168, 0.15); border: 1px solid rgba(138, 146, 168, 0.3);
    animation: shake 0.3s ease;
}
.missing-center-tag {
    color: var(--primary); font-weight: 700; font-size: 0.9rem;
    padding: 3px 10px; border-radius: 6px;
    background: rgba(255, 201, 112, 0.15); border: 1px solid rgba(255, 201, 112, 0.3);
    animation: shake 0.3s ease;
}
.incorrect-word.fading, .already-found-tag.fading, .too-short-tag.fading, .missing-center-tag.fading {
    animation: fadeOut 0.4s ease forwards;
}
@keyframes shake {
    0%,100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}
@keyframes fadeOut { to { opacity: 0; transform: translateY(-8px); } }

/* ─── Found words wrapper (scrollable within static viewport) ─── */
.found-wrapper {
    width: 100%; max-width: 500px;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ─── Found words ─── */
.found-section { width: 100%; }
.found-header {
    font-size: 0.9rem; color: var(--text-dim); margin-bottom: 6px;
    display: flex; align-items: center; gap: 6px;
}
.found-header span { color: var(--accent); font-weight: 700; }
.found-words-list {
    display: flex; flex-wrap: wrap; gap: 4px;
    padding: 8px; background: var(--surface); border-radius: 8px;
    border: 1px solid var(--surface-light);
}
.found-word {
    padding: 2px 8px; font-size: 0.8rem; font-weight: 600;
    background: rgba(126, 232, 160, 0.15); border: 1px solid rgba(126, 232, 160, 0.3);
    color: var(--accent); border-radius: 4px;
}
.found-word.pangram {
    color: var(--primary);
    border-color: rgba(255,201,112,0.5);
    background: rgba(255,201,112,0.15);
    font-weight: 800;
}
.found-empty { color: var(--text-dim); font-size: 0.85rem; padding: 8px; }

/* ─── Rare words section ─── */
.rare-section {
    margin-top: 8px;
    border-top: 1px solid rgba(255,201,112,0.2);
    padding-top: 8px;
}
.rare-header {
    font-size: 0.85rem; color: var(--primary); margin-bottom: 4px;
    display: flex; align-items: center; gap: 6px;
}
.rare-header span { font-weight: 700; }
.found-word.rare {
    color: var(--primary);
    border-color: rgba(255,201,112,0.4);
    background: rgba(255,201,112,0.1);
}
.rare-counter {
    color: var(--primary); font-weight: 700; font-size: 0.85rem;
    margin-left: 4px;
}
.rare-counter.hidden { display: none; }

/* ─── Ultra Rare words section ─── */
.hidden-section {
    margin-top: 8px;
    border-top: 1px solid rgba(124,58,237,0.25);
    padding-top: 8px;
}
.hidden-header {
    font-size: 0.85rem; color: #7c3aed; margin-bottom: 4px;
    display: flex; align-items: center; gap: 6px;
}
.hidden-header span { font-weight: 700; }
.found-word.hidden-word {
    color: #7c3aed;
    border-color: rgba(124,58,237,0.3);
    background: rgba(124,58,237,0.08);
}
.hidden-counter {
    color: #7c3aed; font-weight: 700; font-size: 0.85rem;
    margin-left: 4px;
}
.hidden-counter.hidden { display: none; }
.three-letter-counter {
    color: #6b7280; font-weight: 700; font-size: 0.85rem;
    margin-left: 4px;
}
.three-letter-counter.hidden { display: none; }
.found-word.three-letter { color: #6b7280; border-color: rgba(107,114,128,0.3); background: rgba(107,114,128,0.08); }
.three-letter-section { margin-top: 8px; border-top: 1px solid rgba(107,114,128,0.15); padding-top: 8px; }
.three-letter-header { font-size: 0.8rem; color: #6b7280; margin: 0 0 4px 0; display: flex; align-items: center; gap: 4px; }

/* ─── Score display ─── */
.score-area {
    width: 100%; max-width: 500px;
    text-align: center;
    font-size: 0.85rem; color: var(--text-dim);
    margin-bottom: 8px;
}
.score-area .score-val { color: var(--primary); font-weight: 800; font-size: 1rem; }

/* ─── Win overlay ─── */
.win-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; animation: fadeIn 0.3s ease;
}
.win-overlay.hidden { display: none; }
.win-content {
    text-align: center; background: var(--bg);
    padding: 32px 40px; border-radius: 16px;
    border: 2px solid var(--primary);
    box-shadow: 0 0 40px rgba(255, 201, 112, 0.3);
    animation: popIn 0.4s ease;
}
.win-content h2 { font-size: 1.8rem; color: var(--primary); margin-bottom: 8px; }
.win-content p { color: var(--text-dim); margin-bottom: 16px; }
.win-rare-stats { color: var(--primary); font-weight: 700; font-size: 0.95rem; }
.new-game-btn {
    padding: 10px 24px; font-size: 1rem; font-weight: 700;
    background: var(--primary); color: #1a1a2e; border: none;
    border-radius: 8px; cursor: pointer; font-family: inherit;
    transition: background 0.2s;
}
.new-game-btn:hover { background: var(--primary-light); }
.countdown-text { font-size: 1.2rem; color: var(--primary); font-weight: 700; margin-top: 12px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ─── Error toast ─── */
.error-toast {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: var(--surface); border: 1px solid var(--surface-light);
    padding: 10px 20px; border-radius: 8px; font-size: 0.9rem;
    color: var(--text); z-index: 999;
}
.error-toast.hidden { display: none; }

/* ─── MP-specific styles ─── */
.mp-badge {
    padding: 2px 8px; font-size: 0.7rem; font-weight: 700;
    background: var(--primary); color: #1a1a2e; border-radius: 4px;
    margin-left: 6px; text-transform: uppercase; letter-spacing: 1px;
}

/* ─── Daily Badge ─── */
.daily-badge {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-left: 6px;
    animation: daily-glow 2s ease-in-out infinite alternate;
}
.daily-badge.hidden { display: none; }
@keyframes daily-glow {
    from { box-shadow: 0 0 4px #ffd700; }
    to { box-shadow: 0 0 12px #ff8c00, 0 0 20px rgba(255, 215, 0, 0.25); }
}

/* ─── Frenzy Badge ─── */
.frenzy-badge {
    background: linear-gradient(135deg, #ff4500, #ff6347);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-left: 6px;
    animation: frenzy-pulse 0.8s ease-in-out infinite alternate;
}
.frenzy-badge.hidden { display: none; }
.frenzy-label { margin-right: 3px; }
@keyframes frenzy-pulse {
    from { box-shadow: 0 0 4px #ff4500; transform: scale(1); }
    to { box-shadow: 0 0 16px #ff6347; transform: scale(1.05); }
}

/* Login screen (MP) */
.login-screen {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; height: 100vh; gap: 20px;
}
.login-card {
    background: var(--surface); border: 1px solid var(--surface-light);
    border-radius: 16px; padding: 40px; text-align: center;
    max-width: 400px; width: 90%;
}
.login-card h2 { margin-bottom: 8px; }
.login-card p { color: var(--text-dim); margin-bottom: 20px; font-size: 0.9rem; }
.login-card .logo { font-size: 3rem; margin-bottom: 12px; }
.discord-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; font-size: 1rem; font-weight: 700;
    background: #7289da; color: #fff; border: none;
    border-radius: 8px; cursor: pointer; text-decoration: none;
    transition: background 0.2s;
}
.discord-btn:hover { background: #6278c4; }

.github-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; font-size: 1rem; font-weight: 700;
    background: #333; color: #fff;
    border-radius: 8px; cursor: pointer; text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
}
.github-btn:hover { background: #24292e; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }

.login-divider {
    display: flex; align-items: center; gap: 10px;
    margin: 14px 0; color: var(--text-dim); font-size: 0.8rem;
}
.login-divider::before, .login-divider::after {
    content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.1);
}

/* ─── Top players (MP) ─── */
.top-players {
    width: 100%; max-width: 500px;
    display: flex; justify-content: center; gap: 6px;
    min-height: 40px; margin-bottom: 6px; align-items: center;
}
.top-player-card {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px 3px 4px; border-radius: 16px;
    font-size: 0.8rem; animation: tagSlideIn 0.3s ease;
}
.top-player-card.gold { background: linear-gradient(135deg, rgba(255,215,0,0.25), rgba(255,180,0,0.15)); border: 1px solid rgba(255,215,0,0.4); }
.top-player-card.silver { background: linear-gradient(135deg, rgba(192,192,192,0.2), rgba(160,160,180,0.15)); border: 1px solid rgba(192,192,192,0.35); }
.top-player-card.bronze { background: linear-gradient(135deg, rgba(205,127,50,0.2), rgba(180,100,40,0.15)); border: 1px solid rgba(205,127,50,0.35); }

.top-player-avatar-wrap { position: relative; width: 26px; height: 26px; flex-shrink: 0; }
.top-player-crown { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 0.7rem; z-index: 1; }
.top-player-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.2); }
.top-player-avatar-fallback {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 800; color: #fff;
    background: var(--surface-light); border: 2px solid rgba(255,255,255,0.2);
}
.top-player-name { font-weight: 700; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-player-card.gold .top-player-name { color: #ffd700; }
.top-player-card.silver .top-player-name { color: #c0c0c0; }
.top-player-card.bronze .top-player-name { color: #cd7f32; }
.top-player-score { color: var(--text-dim); font-size: 0.7rem; }
@keyframes tagSlideIn { from { opacity:0; transform: translateY(8px) scale(0.9); } to { opacity:1; transform: translateY(0) scale(1); } }

/* ─── Puzzle Selector ─── */
.puzzle-selector {
    width: 100%; max-width: 500px;
    display: flex; flex-direction: column; align-items: center;
    padding: 16px 12px;
    position: relative;
}
.hub-btn {
    position: absolute; top: 12px; left: 8px;
    text-decoration: none; color: var(--text); font-size: 0.85rem;
    background: rgba(255,255,255,.08); padding: 4px 10px; border-radius: 8px;
    transition: background .2s;
}
.hub-btn:hover { background: rgba(255,255,255,.16); }
.puzzle-selector h2 { margin-bottom: 12px; color: var(--text); }
.puzzle-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
    width: 100%; max-height: 70vh; overflow-y: auto;
    padding: 4px;
}
.puzzle-card {
    background: var(--surface); border: 1px solid var(--surface-light);
    border-radius: 8px; padding: 10px 12px; cursor: pointer;
    transition: all 0.2s; position: relative;
}
.puzzle-card:hover { background: var(--surface-light); border-color: var(--primary); }
.puzzle-card.completed { border-color: var(--accent); }
.puzzle-card.completed::after {
    content: '\2713'; position: absolute; top: 6px; right: 8px;
    color: var(--accent); font-weight: 800; font-size: 1rem;
}
.puzzle-card .puzzle-num { color: var(--text-dim); font-size: 0.75rem; font-weight: 700; }
.puzzle-card .puzzle-name { font-weight: 700; font-size: 0.9rem; margin: 2px 0; }
.puzzle-card .puzzle-theme { color: var(--text-dim); font-size: 0.75rem; }
.puzzle-card.weekly-card, .puzzle-card.daily-card {
    grid-column: 1 / -1;
    border: 2px solid #ffd700;
    background: linear-gradient(135deg, rgba(255,215,0,.08), rgba(255,140,0,.05));
    position: relative;
    padding: 10px 12px; min-height: auto;
}
.puzzle-card.daily-card {
    border-color: #ff6b35;
    background: linear-gradient(135deg, rgba(255,107,53,.08), rgba(255,69,0,.05));
}
.puzzle-card.weekly-card:hover { border-color: #ffab00; box-shadow: 0 0 12px rgba(255,215,0,.25); }
.puzzle-card.daily-card:hover { border-color: #ff8c57; box-shadow: 0 0 12px rgba(255,107,53,.25); }
.puzzle-card.weekly-card.completed, .puzzle-card.daily-card.completed { border-color: var(--accent); }
.puzzle-card.weekly-card.completed::after, .puzzle-card.daily-card.completed::after { display: none; }
.puzzle-card.daily-card .weekly-badge {
    background: linear-gradient(135deg, #ff6b35, #ff4500);
}
.weekly-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e; padding: 2px 8px; border-radius: 10px;
    font-size: 0.65rem; font-weight: 800; letter-spacing: 1px;
    margin-bottom: 4px;
    animation: weekly-glow 2s ease-in-out infinite alternate;
}
@keyframes weekly-glow {
    from { box-shadow: 0 0 4px #ffd700; }
    to { box-shadow: 0 0 12px #ff8c00, 0 0 20px rgba(255,215,0,.25); }
}
.puzzle-completed-check {
    position: absolute; top: 6px; right: 8px;
    color: var(--accent); font-weight: 800; font-size: 1.1rem;
}
.random-puzzle-btn {
    padding: 10px 24px; font-size: 1rem; font-weight: 700;
    background: var(--primary); color: #1a1a2e; border: none;
    border-radius: 8px; cursor: pointer; margin-bottom: 12px;
    transition: background 0.2s;
}
.random-puzzle-btn:hover { background: var(--primary-light); }

/* ─── Back to Puzzles Button ─── */
.back-btn {
    background: none; border: 1px solid var(--surface-light);
    color: var(--text-dim); border-radius: 6px;
    padding: 2px 8px; font-size: 0.75rem; cursor: pointer;
    transition: all 0.2s;
}
.back-btn:hover { color: var(--text); border-color: var(--text-dim); }

/* ─── Viewport Pinning ─── */
html {
    overscroll-behavior: none;
}
body.game-active {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
}
body.game-active > #game-screen,
body.game-active > #game-ui {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    padding: 8px 12px;
    background: var(--bg);
}

/* ─── Responsive ─── */
@media (max-width: 500px) {
    .game-title { font-size: 1.1rem; letter-spacing: 1px; }
    body { padding: 6px 8px; }
    .hex-cell { width: 110px; height: 126px; font-size: 2.2rem; }
    .hex-row { gap: 6px; margin-top: -26px; }
    .hex-row:first-child { margin-top: 0; }
    .current-word { font-size: 1.3rem; }
}
@media (max-width: 380px) {
    .hex-cell { width: 88px; height: 100px; font-size: 1.8rem; }
    .hex-row { gap: 4px; margin-top: -22px; }
}
@media (max-height: 650px) {
    .hex-cell { width: 80px; height: 92px; font-size: 1.6rem; }
    .hex-row { gap: 4px; margin-top: -19px; }
    .hex-row:first-child { margin-top: 0; }
    .current-word { font-size: 1.1rem; min-height: 32px; }
    .action-btn { padding: 6px 16px; font-size: 0.85rem; }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--surface-light); border-radius: 3px; }
