/* ============================================================
   BUMPED! Board Game — Game Styles
   ============================================================ */

:root {
    --color-red: #E32636;
    --color-blue: #2161D9;
    --color-yellow: #F2CC26;
    --color-green: #2EB847;
    --color-gold: #d4af37;
    --color-gold-light: #f5d060;
    --bg-dark: rgb(30, 28, 40);
    --bg-panel: rgba(255, 255, 255, 0.04);
}

/* ---- Game Layout ---- */

.game-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1rem;
    padding: 0.5rem;
    width: 100%;
    height: calc(100vh - 55px);
    box-sizing: border-box;
    overflow: hidden;
}

.board-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-board {
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1;
    display: block;
    border-radius: 12px;
    box-shadow:
        0 0 60px rgba(212, 175, 55, 0.12),
        0 8px 40px rgba(0, 0, 0, 0.6);
}

/* ---- Pawn Styling ---- */

.pawn {
    cursor: default;
    transition: cx 0.35s ease, cy 0.35s ease;
}

.pawn-selectable {
    cursor: pointer;
    animation: pawn-pulse 1s infinite;
}

@keyframes pawn-pulse {
    0%, 100% { r: 16; filter: drop-shadow(0 0 4px rgba(255,255,255,0.3)); }
    50% { r: 20; filter: drop-shadow(0 0 14px rgba(255,255,255,0.7)); }
}

.pawn-happy { filter: drop-shadow(0 0 8px rgba(255,215,0,0.8)); }
.pawn-punished { opacity: 0.5; }

/* ---- Game Panel (right sidebar) ---- */

.game-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding: 0.25rem;
}

.turn-indicator {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.7rem 1rem;
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
}

.turn-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

/* ---- Scoreboard ---- */

.scoreboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    background: rgba(0,0,0,0.25);
    border-radius: 8px;
    border-left: 3px solid;
    font-size: 0.82rem;
    font-weight: 600;
}

.score-home {
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ---- Card Display ---- */

.card-display {
    background: rgba(0,0,0,0.4);
    border: 2px solid;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-align: center;
}

.card-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-gold-light);
    letter-spacing: 2px;
}

.card-desc {
    font-size: 0.82rem;
    color: #bbb;
    margin-top: 0.35rem;
    line-height: 1.35;
}

/* ---- Status ---- */

.status-message {
    text-align: center;
    font-size: 0.88rem;
    color: #ccc;
    padding: 0.5rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}

/* ---- Move Options ---- */

.move-options {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.move-options-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 0.1rem;
}

.move-option-btn {
    padding: 0.5rem 0.85rem;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 8px;
    color: #e0d8c0;
    font-size: 0.82rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}

.move-option-btn:hover {
    background: rgba(212,175,55,0.22);
    border-color: var(--color-gold);
    color: #fff;
    transform: translateX(4px);
}

/* ---- Game Over ---- */

.game-over-overlay {
    text-align: center;
    padding: 1.5rem;
    background: rgba(0,0,0,0.6);
    border: 2px solid var(--color-gold);
    border-radius: 16px;
}

.game-over-text {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    color: #fff;
}

/* ---- Lobby ---- */

.lobby-container {
    background: var(--bg-panel);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 16px;
    padding: 2rem;
    max-width: 440px;
    width: 100%;
    margin: 2rem auto;
}

.lobby-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-gold-light);
    margin: 0 0 1rem;
    text-align: center;
}

.lobby-code {
    text-align: center;
    margin-bottom: 1.25rem;
    padding: 0.75rem;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
}

.lobby-code-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    margin-right: 0.5rem;
}

.lobby-code-value {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 6px;
    color: var(--color-gold-light);
}

.lobby-players {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.lobby-player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.player-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ai-badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lobby-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lobby-waiting {
    text-align: center;
    color: #888;
    font-style: italic;
}

.btn-start {
    background: linear-gradient(135deg, #d4af37, #b8960c);
    color: #1e1c28;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-start:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn-start:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: rgba(255,255,255,0.08);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
    transition: all 0.2s;
}

.btn-secondary:hover { background: rgba(255,255,255,0.12); color: #fff; }

.btn-primary {
    background: linear-gradient(135deg, #d4af37, #b8960c);
    color: #1e1c28;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover { filter: brightness(1.15); }

.error-message {
    margin-top: 0.75rem;
    padding: 0.6rem 1rem;
    background: rgba(227,38,54,0.15);
    border: 1px solid rgba(227,38,54,0.3);
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 0.85rem;
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
    .game-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        height: auto;
    }

    .game-board {
        width: 100%;
        height: auto;
    }

    .game-panel {
        max-height: 40vh;
    }
}
