/* Hexad Games - Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600;700&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0a0a1a;
    --bg2: #12122a;
    --bg3: #1a1a3a;
    --accent: #00d4aa;
    --accent2: #00a88a;
    --accent-dim: rgba(0, 212, 170, 0.25);
    --purple: #8855dd;
    --blue: #4488ff;
    --orange: #ff8844;
    --pink: #ff55aa;
    --red: #e05555;
    --yellow: #e0c855;
    --green: #55e088;
    --text: #e0e0e0;
    --dim: #666;
    --border: rgba(255,255,255,0.06);
}

html, body { 
    height: 100%; 
    overflow: hidden; 
    -webkit-tap-highlight-color: transparent; 
}

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-y: auto;
}

/* Background */
.hx-bg {
    position: fixed; inset: 0; z-index: -1;
    background: radial-gradient(ellipse at 30% 20%, rgba(0,212,170,0.04) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(100,100,200,0.04) 0%, transparent 50%), var(--bg);
}

/* Container */
.hx-container {
    display: flex; flex-direction: column; align-items: center;
    padding: 15px; min-height: 100vh; padding-bottom: 100px;
}

/* Typography */
.hx-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.3em, 4vw, 1.8em);
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 3px;
    text-align: center;
}

.hx-subtitle { 
    font-size: 0.75em; 
    color: var(--dim); 
    margin-bottom: 12px; 
    text-align: center;
}

.hx-subtitle a { color: var(--accent); text-decoration: none; }

/* Loading */
.hx-loader {
    position: fixed; inset: 0; background: var(--bg);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 9999;
}
.hx-loader.hidden { display: none; }

.hx-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--bg2); border-top-color: var(--accent);
    border-radius: 50%; animation: hx-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes hx-spin { to { transform: rotate(360deg); } }

.hx-loader-text { 
    font-family: 'Orbitron', sans-serif; 
    color: var(--accent); 
    font-size: 0.85em; 
}

/* Top Bar */
.hx-topbar {
    position: fixed; top: 0; left: 0; right: 0;
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px;
    background: rgba(10,10,26,0.95);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.hx-status { display: flex; align-items: center; gap: 6px; font-size: 0.7em; }

.hx-dot { 
    width: 7px; height: 7px; 
    border-radius: 50%; 
    background: var(--green); 
}
.hx-dot.offline { background: var(--red); }

.hx-topbtns { display: flex; gap: 8px; }

.hx-ibtn {
    background: none; border: none; color: var(--dim);
    cursor: pointer; font-size: 1em; padding: 4px;
    transition: color 0.15s;
}
.hx-ibtn:hover, .hx-ibtn.on { color: var(--accent); }

/* Screens */
.hx-screen { 
    display: none; 
    width: 100%; 
    max-width: 480px; 
    margin-top: 48px; 
}
.hx-screen.active { display: block; }

/* Cards */
.hx-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.hx-card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8em;
    color: var(--accent);
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 6px;
}

/* Buttons */
.hx-btn {
    width: 100%; padding: 12px; border: none; border-radius: 8px;
    font-family: 'Orbitron', sans-serif; font-size: 0.8em; font-weight: 700;
    cursor: pointer; transition: all 0.15s; margin-bottom: 8px;
}

.hx-btn-p { background: var(--accent); color: var(--bg); }
.hx-btn-p:hover:not(:disabled) { filter: brightness(1.1); }

.hx-btn-s { 
    background: rgba(255,255,255,0.06); 
    color: var(--text); 
    border: 1px solid var(--border); 
}
.hx-btn-s:hover:not(:disabled) { background: rgba(255,255,255,0.1); }

.hx-btn-d { 
    background: rgba(224,85,85,0.15); 
    color: var(--red); 
    border: 1px solid rgba(224,85,85,0.25); 
}

.hx-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Inputs */
.hx-input-row { display: flex; gap: 8px; }

.hx-inp {
    flex: 1; padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: 'Orbitron', sans-serif;
    font-size: 1em;
    text-align: center;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hx-inp:focus { outline: none; border-color: var(--accent); }
.hx-inp.err { border-color: var(--red); animation: hx-shake 0.3s; }

@keyframes hx-shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* Code Display */
.hx-code-box {
    background: var(--bg);
    border: 2px solid var(--accent);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    margin-bottom: 12px;
}

.hx-code-lbl { font-size: 0.7em; color: var(--dim); margin-bottom: 6px; }

.hx-code-val {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8em; font-weight: 900;
    letter-spacing: 6px;
    color: var(--accent);
}

.hx-waiting { color: var(--orange); font-size: 0.8em; margin-top: 8px; }

/* Game List */
.hx-glist { max-height: 160px; overflow-y: auto; }

.hx-gitem {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px;
    background: var(--bg);
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.hx-gitem:hover { background: rgba(0,212,170,0.08); }

.hx-ginfo { display: flex; align-items: center; gap: 10px; }
.hx-gtype { font-size: 1.1em; }
.hx-gcode { font-family: 'Orbitron', sans-serif; font-size: 0.85em; color: var(--accent); }
.hx-ghost { font-size: 0.7em; color: var(--dim); }

.hx-gjoin {
    background: rgba(0,212,170,0.15);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.65em;
    font-weight: 700;
}

.hx-no-games { text-align: center; color: var(--dim); padding: 16px; font-size: 0.8em; }

/* Player Tags */
.hx-players { display: flex; justify-content: space-between; margin-bottom: 8px; }

.hx-ptag {
    padding: 6px 12px;
    background: var(--bg2);
    border-radius: 6px;
    font-size: 0.7em;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.hx-ptag.on { border-color: var(--accent); background: rgba(0,212,170,0.12); }

.hx-pcolor { font-weight: 700; margin-bottom: 2px; }
.hx-pname { color: var(--dim); font-size: 0.9em; }

/* Game Status */
.hx-status-bar {
    text-align: center;
    padding: 10px;
    background: var(--bg2);
    border-radius: 6px;
    margin: 8px 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85em;
}

.hx-status-bar.end { 
    background: linear-gradient(135deg, rgba(255,180,0,0.15), rgba(180,100,180,0.15)); 
}

/* Controls */
.hx-ctrls { display: flex; gap: 8px; margin-top: 8px; }
.hx-ctrls .hx-btn { flex: 1; margin: 0; padding: 8px; font-size: 0.7em; }

/* Score Display */
.hx-scores {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 10px 0;
}

.hx-score {
    text-align: center;
}

.hx-score-val {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8em;
    font-weight: 900;
}

.hx-score-lbl {
    font-size: 0.7em;
    color: var(--dim);
}

/* Toast */
.hx-toasts { 
    position: fixed; 
    bottom: 16px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 9999; 
}

.hx-toast {
    background: rgba(10,10,26,0.95);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 0.75em;
    margin-bottom: 6px;
    border: 1px solid var(--border);
    animation: hx-toastin 0.2s ease;
}

.hx-toast.err { border-color: var(--red); color: var(--red); }
.hx-toast.warn { border-color: var(--orange); color: var(--orange); }

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

/* Modal */
.hx-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.85);
    display: none; justify-content: center; align-items: center;
    z-index: 1000;
}

.hx-modal.on { display: flex; }

.hx-mbox {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.hx-mtitle { 
    font-family: 'Orbitron', sans-serif; 
    color: var(--accent); 
    margin-bottom: 12px; 
    text-align: center; 
}

.hx-mclose {
    position: absolute; top: 10px; right: 12px;
    background: none; border: none;
    color: var(--dim); font-size: 1.2em; cursor: pointer;
}

.hx-mclose:hover { color: var(--text); }

/* Rules */
.hx-rules h3 { 
    color: var(--accent); 
    margin: 10px 0 5px; 
    font-family: 'Orbitron', sans-serif; 
    font-size: 0.85em; 
}

.hx-rules p { 
    color: var(--dim); 
    font-size: 0.75em; 
    line-height: 1.5; 
    margin-bottom: 6px; 
}

/* Back Link */
.hx-back {
    position: fixed;
    bottom: 12px;
    left: 12px;
    font-size: 0.7em;
    color: var(--dim);
    text-decoration: none;
}

.hx-back:hover { color: var(--accent); }

/* 8x8 Grid Board (Chess, Checkers, Reversi) */
.hx-board-8x8 {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    border: 2px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    max-width: 380px;
    margin: 0 auto;
}

.hx-sq {
    aspect-ratio: 1;
    display: flex; justify-content: center; align-items: center;
    position: relative;
    cursor: pointer;
    transition: all 0.1s;
}

.hx-sq.lt { background: #b5c0b5; }
.hx-sq.dk { background: #5a7a5a; }
.hx-sq:hover { filter: brightness(1.08); }
.hx-sq.sel { background: rgba(0,212,170,0.45) !important; }
.hx-sq.vm::after {
    content: '';
    position: absolute;
    width: 26%; height: 26%;
    background: rgba(0,170,110,0.55);
    border-radius: 50%;
}
.hx-sq.vc { background: rgba(190,70,70,0.45) !important; }
.hx-sq.lm { box-shadow: inset 0 0 0 3px rgba(255,200,0,0.35); }

/* 7x6 Grid Board (Connect Four) */
.hx-board-7x6 {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    background: var(--blue);
    padding: 10px;
    border-radius: 8px;
    max-width: 350px;
    margin: 0 auto;
}

.hx-c4-cell {
    aspect-ratio: 1;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s;
}

.hx-c4-cell:hover { background: var(--bg3); }
.hx-c4-cell.red { background: var(--red); }
.hx-c4-cell.yellow { background: var(--yellow); }
.hx-c4-cell.win { animation: hx-pulse 0.5s ease infinite; }

@keyframes hx-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Go/Reversi style board */
.hx-board-go {
    display: grid;
    gap: 0;
    background: #d4a855;
    padding: 15px;
    border-radius: 4px;
    max-width: 380px;
    margin: 0 auto;
}

.hx-go-cell {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.hx-go-cell::before {
    content: '';
    position: absolute;
    background: #222;
}

/* Horizontal line */
.hx-go-cell::before {
    width: 100%; height: 1px;
}

/* Vertical line */
.hx-go-cell::after {
    content: '';
    position: absolute;
    width: 1px; height: 100%;
    background: #222;
}

/* Reversi Green Board */
.hx-board-reversi {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    background: #1a5a1a;
    padding: 8px;
    border-radius: 6px;
    max-width: 380px;
    margin: 0 auto;
}

.hx-rev-cell {
    aspect-ratio: 1;
    background: #2a7a2a;
    border-radius: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.1s;
}

.hx-rev-cell:hover { background: #3a8a3a; }
.hx-rev-cell.vm { background: rgba(0,212,170,0.3); }

/* Discs/Pieces */
.hx-disc {
    width: 80%; height: 80%;
    border-radius: 50%;
    transition: all 0.2s;
}

.hx-disc.black { 
    background: radial-gradient(circle at 30% 30%, #444, #111); 
    box-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.hx-disc.white { 
    background: radial-gradient(circle at 30% 30%, #fff, #ccc); 
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hx-disc.flip {
    animation: hx-flip 0.3s ease;
}

@keyframes hx-flip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(0deg); }
}

/* Battleship Grids */
.hx-board-ship {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    background: var(--bg3);
    padding: 4px;
    border-radius: 4px;
    max-width: 280px;
}

.hx-ship-cell {
    aspect-ratio: 1;
    background: var(--blue);
    opacity: 0.6;
    border-radius: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.1s;
}

.hx-ship-cell:hover { opacity: 0.8; }
.hx-ship-cell.ship { background: var(--dim); opacity: 1; }
.hx-ship-cell.hit { background: var(--red); opacity: 1; }
.hx-ship-cell.miss { background: var(--bg); opacity: 1; }

/* Responsive */
@media (max-width: 400px) {
    .hx-board-8x8, .hx-board-reversi, .hx-board-go { max-width: 320px; }
    .hx-board-7x6 { max-width: 280px; }
}

/* ========================================
   HEXAD HUB SIDEBAR
   ======================================== */
.hx-hub-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg2);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 12px 8px;
    cursor: pointer;
    z-index: 200;
    transition: all 0.2s;
}
.hx-hub-toggle:hover { background: var(--bg3); }
.hx-hub-toggle span { writing-mode: vertical-rl; text-orientation: mixed; font-size: 0.7em; color: var(--accent); }

.hx-hub {
    position: fixed;
    right: -320px;
    top: 0;
    bottom: 0;
    width: 300px;
    background: var(--bg2);
    border-left: 1px solid var(--border);
    z-index: 300;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.hx-hub.open { right: 0; }

.hx-hub-header {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hx-hub-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85em;
    color: var(--accent);
}
.hx-hub-close {
    background: none;
    border: none;
    color: var(--dim);
    font-size: 1.2em;
    cursor: pointer;
}
.hx-hub-close:hover { color: var(--text); }

.hx-hub-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.hx-hub-section {
    margin-bottom: 16px;
}
.hx-hub-section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7em;
    color: var(--dim);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Points Display */
.hx-points-display {
    background: linear-gradient(135deg, rgba(0,212,170,0.15), rgba(136,85,221,0.15));
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    margin-bottom: 12px;
}
.hx-points-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8em;
    font-weight: 900;
    color: var(--accent);
}
.hx-points-label {
    font-size: 0.7em;
    color: var(--dim);
}

/* Challenge Cards */
.hx-challenge {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    transition: all 0.2s;
}
.hx-challenge:hover { border-color: var(--accent-dim); }
.hx-challenge.active { border-color: var(--accent); background: rgba(0,212,170,0.08); }
.hx-challenge.completed { opacity: 0.6; border-color: var(--green); }
.hx-challenge.completed::after { content: ' ✓'; color: var(--green); }

.hx-challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.hx-challenge-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75em;
    color: var(--text);
}
.hx-challenge-points {
    background: var(--purple);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65em;
    font-weight: 700;
}
.hx-challenge-points.easy { background: var(--green); }
.hx-challenge-points.medium { background: var(--orange); }
.hx-challenge-points.hard { background: var(--red); }

.hx-challenge-desc {
    font-size: 0.7em;
    color: var(--dim);
    line-height: 1.4;
}
.hx-challenge-progress {
    margin-top: 6px;
    height: 4px;
    background: var(--bg3);
    border-radius: 2px;
    overflow: hidden;
}
.hx-challenge-progress-bar {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s;
}

/* Challenge Toggle */
.hx-challenge-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.hx-toggle-label { font-size: 0.75em; color: var(--text); }
.hx-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--bg3);
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.2s;
}
.hx-toggle.on { background: var(--accent); }
.hx-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: left 0.2s;
}
.hx-toggle.on::after { left: 20px; }

/* Quick Links */
.hx-quick-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.hx-quick-link {
    aspect-ratio: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.2em;
    transition: all 0.2s;
}
.hx-quick-link:hover { border-color: var(--accent); background: rgba(0,212,170,0.08); }
.hx-quick-link span {
    font-size: 0.45em;
    color: var(--dim);
    margin-top: 2px;
}

/* Device Settings */
.hx-device-select {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.hx-device-btn {
    flex: 1;
    padding: 8px 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--dim);
    font-size: 0.7em;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.hx-device-btn:hover { border-color: var(--accent-dim); }
.hx-device-btn.sel { border-color: var(--accent); color: var(--accent); background: rgba(0,212,170,0.1); }
.hx-device-btn span { display: block; font-size: 1.4em; margin-bottom: 2px; }

/* Stats Row */
.hx-stats-row {
    display: flex;
    justify-content: space-around;
    padding: 8px;
    background: var(--bg);
    border-radius: 6px;
    margin-bottom: 8px;
}
.hx-stat {
    text-align: center;
}
.hx-stat-val {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1em;
    color: var(--accent);
}
.hx-stat-lbl {
    font-size: 0.6em;
    color: var(--dim);
}

/* Hub Overlay for mobile */
.hx-hub-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 250;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.hx-hub-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Current Game Badge */
.hx-current-game {
    background: linear-gradient(135deg, var(--accent), var(--purple));
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
    text-align: center;
}
.hx-current-game-icon { font-size: 1.5em; }
.hx-current-game-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8em;
    color: white;
    margin-top: 4px;
}

/* Selection indicator (difficulty) */
.hx-btn-s.sel {
    border-color: var(--accent);
    background: rgba(0,212,170,0.15);
    color: var(--accent);
}

/* Responsive Hub */
@media (max-width: 600px) {
    .hx-hub { width: 280px; right: -290px; }
    .hx-hub.open { right: 0; }
}

/* Notification dot */
.hx-notif-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    animation: hx-pulse 1s ease infinite;
}

/* Hub Tabs */
.hx-hub-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 5px;
}

.hx-hub-tab {
    flex: 1;
    padding: 10px 5px;
    background: none;
    border: none;
    color: var(--dim);
    font-size: 0.7em;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.hx-hub-tab:hover {
    color: var(--text);
}

.hx-hub-tab.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    margin-bottom: -1px;
}

.hx-hub-panel {
    display: none;
    flex-direction: column;
    min-height: 0;
}

.hx-hub-panel.active {
    display: flex;
}

/* Theme Grid */
.hx-theme-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}

.hx-theme-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 2px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.1em;
}

.hx-theme-btn span {
    font-size: 0.5em;
    color: var(--dim);
    margin-top: 2px;
    text-transform: capitalize;
}

.hx-theme-btn:hover {
    border-color: var(--accent);
}

.hx-theme-btn.sel {
    border-color: var(--accent);
    background: var(--accent-dim);
}

/* Quick Play Grid */
.hx-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.hx-quick-grid .hx-quick-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: var(--bg2);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.75em;
    transition: all 0.2s;
}

.hx-quick-grid .hx-quick-link:hover {
    background: var(--accent-dim);
    color: var(--accent);
}

.hx-quick-grid .hx-quick-link span {
    font-size: 1.2em;
}

/* All Games Button */
.hx-all-games-btn {
    display: block;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-dim), var(--purple)20);
    border-radius: 8px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 600;
    transition: all 0.2s;
}

.hx-all-games-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--accent-dim);
}

/* Leaderboard Button */
.hx-leaderboard-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,140,0,0.15));
    border-radius: 8px;
    color: var(--yellow);
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 10px;
}

.hx-leaderboard-btn:hover {
    background: linear-gradient(135deg, rgba(255,215,0,0.25), rgba(255,140,0,0.25));
}

/* Points Display Enhancement */
.hx-points-display {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, var(--accent-dim), transparent);
    border-radius: 10px;
}

.hx-points-icon {
    font-size: 1.5em;
    margin-bottom: 5px;
}

/* Light Theme Support */
body.theme-light {
    --border: rgba(0,0,0,0.1);
    --dim: #666;
    --accent-dim: rgba(0,102,204,0.15);
}

body.theme-light .hx-hub {
    background: var(--bg2);
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
}

body.theme-light .hx-bg {
    background: var(--bg);
}

body.theme-light .hx-card,
body.theme-light .hx-btn {
    background: var(--bg2);
    border-color: var(--border);
}

/* Glow Theme Effects */
body.theme-dark .hx-hub-title,
body.theme-dark .hx-points-value {
    text-shadow: var(--glow, none);
}

/* Scrabble Helper Tips */
.scrabble-tips {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75em;
    color: var(--dim);
    max-width: 90%;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 100;
}

.scrabble-tips.show {
    opacity: 1;
}
