:root {
    --bg-dark: #0a0e17;
    --crimson: #ff4655;
    --cyan: #00f0ff;
    --emerald: #10b981;
    --amber: #f59e0b;
}

body {
    background-color: var(--bg-dark);
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.04) 0%, transparent 35%),
        radial-gradient(circle at 85% 80%, rgba(255, 70, 85, 0.04) 0%, transparent 35%),
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
}

.hud-card {
    position: relative;
    background: rgba(17, 24, 39, 0.82);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hud-card:hover {
    border-color: rgba(0, 240, 255, 0.28);
}

.hud-card::before,
.hud-card::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    pointer-events: none;
}

.hud-card::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--crimson);
    border-left: 2px solid var(--crimson);
}

.hud-card::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid var(--cyan);
    border-right: 2px solid var(--cyan);
}

/* Chessboard Fixed 8x8 Geometry */
.board-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-template-rows: repeat(8, minmax(0, 1fr));
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 480px;
    border: 2px solid #1e293b;
    border-radius: 0.65rem;
    overflow: hidden;
    user-select: none;
    touch-action: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.board-sq {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.14s ease;
}

.sq-light { background-color: #dde3ea; }
.sq-dark { background-color: #4b5c6b; }
.sq-selected { background-color: rgba(56, 189, 248, 0.52) !important; }
.sq-last-move { background-color: rgba(250, 204, 21, 0.34) !important; }

.sq-hint::after {
    content: '';
    width: 13px;
    height: 13px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.45);
    position: absolute;
    pointer-events: none;
}

.sq-capture-hint {
    box-shadow: inset 0 0 0 4px rgba(255, 70, 85, 0.78) !important;
}

.piece-svg {
    width: 82%;
    height: 82%;
    pointer-events: none;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.42));
}

#dragGhost {
    position: fixed;
    width: 58px;
    height: 58px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%) scale(1.12);
    display: none;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.65));
}

/* Word Grid Styles */
.word-tile {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    text-transform: uppercase;
    border: 2px solid #1e293b;
    border-radius: 0.5rem;
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
    transition: all 0.2s ease;
}

.word-tile.filled {
    border-color: #475569;
}

.word-tile.correct {
    background-color: #10b981;
    border-color: #10b981;
    color: #052e16;
}

.word-tile.present {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #451a03;
}

.word-tile.absent {
    background-color: #1e293b;
    border-color: #1e293b;
    color: #64748b;
}

.key-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    padding: 0.65rem 0.5rem;
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
    transition: all 0.15s ease;
    user-select: none;
}

.key-btn:hover {
    border-color: #00f0ff;
}