/* ============================================================
   ROYAL CHESS - Premium Black & Gold Theme
   ============================================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Cinzel:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    --gold: #d4af37;
    --gold-light: #f5d76e;
    --gold-dark: #a67c00;
    --gold-glow: rgba(212, 175, 55, 0.3);
    --gold-subtle: rgba(212, 175, 55, 0.08);
    --bg-primary: #0a0a0a;
    --bg-secondary: #111;
    --bg-tertiary: #0d0d0d;
    --bg-overlay: #1a1a1a;
    --text-primary: #fff;
    --text-secondary: #ccc;
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-dim: rgba(255, 255, 255, 0.2);
    --danger: #ff4444;
    --danger-bg: rgba(255, 50, 50, 0.1);
    --danger-border: rgba(255, 50, 50, 0.3);
    --square-light: #1a1a1a;
    --square-dark: #0d0d0d;
    --font-display: 'Cinzel', serif;
    --font-serif: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.8);
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.4s ease;
    --transition-intro: 0.8s ease;
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   ANIMATED BACKGROUND
   ============================================================ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.03) 0%, transparent 30%);
    pointer-events: none;
    z-index: 0;
}

.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 8s infinite ease-in-out;
}

@keyframes floatParticle {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(1);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   INTRO SCREEN
   ============================================================ */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background: radial-gradient(ellipse at center, var(--bg-overlay) 0%, var(--bg-primary) 70%, #000 100%);
    transition: opacity var(--transition-intro), transform var(--transition-intro);
}

.intro-screen.hidden {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.intro-content {
    text-align: center;
    position: relative;
}

.intro-ornament {
    font-size: 40px;
    color: var(--gold);
    letter-spacing: 20px;
    margin-bottom: 10px;
    opacity: 0.6;
}

.intro-icon {
    font-size: 80px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 30px var(--gold-glow));
}

.intro-title {
    font-family: var(--font-display);
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-light) 30%, var(--gold) 60%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.intro-subtitle {
    font-family: var(--font-serif);
    font-size: 18px;
    color: rgba(212, 175, 55, 0.5);
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-bottom: 50px;
}

.intro-divider {
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto 40px;
}

.intro-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.intro-btn {
    min-width: 320px;
    padding: 18px 40px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-slow);
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    overflow: hidden;
}

.intro-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.6s ease;
}

.intro-btn:hover::before {
    left: 100%;
}

.intro-btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
    border-color: var(--gold);
    font-weight: 700;
    box-shadow: 0 4px 20px var(--gold-glow);
}

.intro-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
}

.intro-btn-secondary {
    background: transparent;
    color: var(--gold);
}

.intro-btn-secondary:hover {
    background: var(--gold-subtle);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.2);
}

.intro-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.intro-footer {
    position: absolute;
    bottom: 30px;
    font-size: 12px;
    color: rgba(212, 175, 55, 0.2);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================================================
   ONLINE LOBBY
   ============================================================ */
.online-lobby {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    background: radial-gradient(ellipse at center, var(--bg-overlay) 0%, var(--bg-primary) 70%, #000 100%);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.online-lobby.active {
    display: flex;
}

.lobby-content {
    text-align: center;
}

.lobby-title {
    font-family: var(--font-display);
    font-size: 36px;
    color: var(--gold);
    margin-bottom: 10px;
}

.lobby-subtitle {
    color: rgba(212, 175, 55, 0.5);
    margin-bottom: 40px;
    font-size: 14px;
    letter-spacing: 2px;
}

.lobby-options {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.lobby-card {
    background: var(--gold-subtle);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 280px;
    cursor: pointer;
    transition: all var(--transition-base);
}

.lobby-card:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.15);
}

.lobby-card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.lobby-card-title {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 18px;
    margin-bottom: 8px;
}

.lobby-card-desc {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    line-height: 1.5;
}

.lobby-back {
    margin-top: 30px;
    background: transparent;
    border: none;
    color: rgba(212, 175, 55, 0.4);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    transition: color var(--transition-base);
    letter-spacing: 2px;
}

.lobby-back:hover {
    color: var(--gold);
}

/* Room Code Display */
.room-code-display {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(0, 0, 0, 0.3);
}

.room-code-label {
    font-size: 12px;
    color: rgba(212, 175, 55, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.room-code {
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--gold);
    letter-spacing: 8px;
}

.room-status {
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 14px;
}

.room-status .spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-top: 2px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.room-input-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.room-input {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-size: 24px;
    font-family: var(--font-display);
    color: var(--gold);
    text-align: center;
    letter-spacing: 6px;
    width: 200px;
    outline: none;
    transition: border-color var(--transition-base);
}

.room-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.room-input::placeholder {
    letter-spacing: 2px;
    font-size: 14px;
    color: rgba(212, 175, 55, 0.2);
}

/* ============================================================
   GAME CONTAINER
   ============================================================ */
.game-container {
    position: relative;
    z-index: 1;
    background: linear-gradient(145deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-2xl);
    padding: 30px;
    box-shadow:
        var(--shadow-xl),
        inset 0 1px 0 rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.15);
    display: none;
}

.game-container.active {
    display: block;
    animation: gameAppear 0.5s ease;
}

@keyframes gameAppear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.game-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: center;
}

.board-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================================
   GAME HEADER
   ============================================================ */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
}

.game-title-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-title-icon {
    font-size: 24px;
}

.game-title-text {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
}

.game-title-sub {
    font-size: 11px;
    color: rgba(212, 175, 55, 0.3);
    letter-spacing: 1px;
}

.game-controls-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Turn Indicator */
.turn-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.turn-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.3);
    transition: all var(--transition-base);
    position: relative;
}

.turn-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 1px solid transparent;
    transition: all var(--transition-base);
}

.turn-dot.white {
    background: linear-gradient(135deg, #fff, #e0e0e0);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.turn-dot.black {
    background: linear-gradient(135deg, #444, #111);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Header Button */
.header-btn {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.15);
    color: var(--gold);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* ============================================================
   CHESS BOARD
   ============================================================ */
.board-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        var(--shadow-lg),
        inset 0 0 0 2px rgba(212, 175, 55, 0.1);
}

.board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 560px;
    height: 560px;
    user-select: none;
}

/* Squares */
.square {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 48px;
    cursor: pointer;
    position: relative;
    transition: background-color var(--transition-fast);
}

.square.light {
    background-color: var(--square-light);
}

.square.dark {
    background-color: var(--square-dark);
}

.square.selected {
    background: radial-gradient(circle, var(--gold) 0%, rgba(212, 175, 55, 0.3) 100%) !important;
}

.square.valid-move::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.square.valid-capture {
    box-shadow: inset 0 0 0 3px rgba(212, 175, 55, 0.5);
}

.square.last-move {
    background-color: rgba(212, 175, 55, 0.12) !important;
}

.square.check {
    background: radial-gradient(circle, #ff0000 0%, rgba(255, 0, 0, 0.4) 40%, transparent 70%) !important;
}

.square:hover {
    filter: brightness(1.15);
}

.square:hover .piece {
    transform: scale(1.05);
}

/* ============================================================
   PIECES
   ============================================================ */
.piece {
    pointer-events: none;
    line-height: 1;
    transition: transform var(--transition-fast);
    position: relative;
    z-index: 1;
}

.piece.white-piece {
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
    color: #e8e8e8;
}

.piece.black-piece {
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7));
    color: #222;
}

/* Piece Skins */
.piece.skin-modern.white-piece {
    color: #f0f0f0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.piece.skin-modern.black-piece {
    color: #1a1a1a;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.piece.skin-neon.white-piece {
    color: #00ff88;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.piece.skin-neon.black-piece {
    color: #ff0066;
    text-shadow: 0 0 15px rgba(255, 0, 102, 0.5);
}

.piece.skin-wood.white-piece {
    color: #f5deb3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.piece.skin-wood.black-piece {
    color: #8b4513;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Rank & File Labels */
.rank-label,
.file-label {
    position: absolute;
    font-size: 10px;
    font-weight: 500;
    pointer-events: none;
    font-family: var(--font-body);
}

.rank-label {
    left: 3px;
    top: 3px;
}

.square.light .rank-label,
.square.light .file-label {
    color: rgba(255, 255, 255, 0.15);
}

.square.dark .rank-label,
.square.dark .file-label {
    color: rgba(255, 255, 255, 0.1);
}

.file-label {
    right: 3px;
    bottom: 2px;
}

/* ============================================================
   GAME STATUS
   ============================================================ */
.game-status {
    margin-top: 12px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.1);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    font-family: var(--font-body);
}

.game-status .status-icon {
    font-size: 18px;
}

.game-status.check-status {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--gold);
}

.game-status.checkmate-status {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: #ff6666;
}

.game-status.stalemate-status {
    background: rgba(212, 175, 55, 0.05);
    border-color: rgba(212, 175, 55, 0.2);
    color: rgba(212, 175, 55, 0.7);
}

/* ============================================================
   CONTROLS / BUTTONS
   ============================================================ */
.controls {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    width: 100%;
}

.btn {
    padding: 12px 24px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    flex: 1;
    font-family: var(--font-body);
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
    border-color: var(--gold);
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--gold-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--gold);
}

.btn-secondary:hover {
    background: var(--gold-subtle);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border-color: rgba(212, 175, 55, 0.15);
}

.btn-outline:hover {
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--gold);
    transform: translateY(-2px);
}

/* ============================================================
   SIDE PANEL
   ============================================================ */
.side-panel {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid rgba(212, 175, 55, 0.08);
}

.panel-title {
    font-size: 11px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-family: var(--font-body);
}

/* Captured Pieces */
.captured-pieces {
    min-height: 36px;
}

.captured-group {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-bottom: 6px;
    align-items: center;
}

.captured-group:last-child {
    margin-bottom: 0;
}

.captured-group .captured-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    margin-right: 6px;
    font-weight: 500;
}

.captured-piece {
    font-size: 20px;
    opacity: 0.8;
}

/* Piece Skin Selector */
.piece-skin-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.skin-btn {
    padding: 6px 14px;
    font-size: 11px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-sm);
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-body);
}

.skin-btn:hover {
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--gold);
}

.skin-btn.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    color: var(--gold);
}

/* Move History */
.move-history {
    max-height: 260px;
    overflow-y: auto;
}

.move-history::-webkit-scrollbar {
    width: 3px;
}

.move-history::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.move-history::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.2);
    border-radius: 2px;
}

.move-list {
    display: grid;
    grid-template-columns: 32px 1fr 1fr;
    gap: 3px;
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-body);
}

.move-number {
    color: var(--text-dim);
    font-weight: 600;
    font-size: 11px;
}

.move-white,
.move-black {
    padding: 3px 6px;
    border-radius: 3px;
    cursor: default;
    transition: background 0.2s;
}

.move-white:hover,
.move-black:hover {
    background: var(--gold-subtle);
}

.move-white.last-move-highlight,
.move-black.last-move-highlight {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
}

/* ============================================================
   PROMOTION DIALOG
   ============================================================ */
.promotion-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.promotion-overlay.active {
    display: flex;
}

.promotion-dialog {
    background: linear-gradient(145deg, var(--bg-overlay), var(--bg-tertiary));
    border-radius: var(--radius-xl);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.promotion-dialog h3 {
    font-family: var(--font-display);
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 20px;
    letter-spacing: 2px;
}

.promotion-options {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.promotion-btn {
    width: 75px;
    height: 75px;
    font-size: 42px;
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-lg);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.4);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.promotion-btn:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.15);
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.2);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 900px) {
    .game-layout {
        flex-direction: column;
        align-items: center;
    }

    .side-panel {
        width: 100%;
        max-width: 560px;
    }

    .board {
        width: min(82vw, 560px);
        height: min(82vw, 560px);
    }

    .square {
        font-size: min(6.5vw, 48px);
    }

    .game-container {
        padding: 15px;
        margin: 10px;
    }

    .intro-title {
        font-size: 36px;
    }

    .intro-btn {
        min-width: 260px;
        padding: 14px 30px;
        font-size: 14px;
    }

    .lobby-card {
        width: 240px;
        padding: 25px;
    }
}

@media (max-width: 500px) {
    .board {
        width: 88vw;
        height: 88vw;
    }

    .square {
        font-size: 8vw;
    }

    .game-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .game-controls-bar {
        width: 100%;
        justify-content: flex-end;
    }

    .controls {
        flex-direction: column;
    }

    .intro-title {
        font-size: 28px;
        letter-spacing: 2px;
    }

    .intro-btn {
        min-width: 220px;
        padding: 12px 24px;
        font-size: 12px;
    }

    .lobby-options {
        flex-direction: column;
        align-items: center;
    }

    .lobby-card {
        width: 280px;
    }
}