/* Screen Management */
.screen {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.screen.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Game Code Display */
.game-code-display {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 20px 0;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.game-code-large {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 0.5rem;
    color: var(--color-accent);
    margin-top: 8px;
    font-family: monospace;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Lobby */
.lobby-status {
    margin: 30px 0;
}

.lobby-player-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    min-height: 100px;
}

/* Scoreboard (Dev Guide 6) */
.score-row {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr 1fr;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.score-player {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-emoji {
    font-size: 1.5rem;
}

.score-name {
    font-weight: 700;
}

.score-phase {
    color: var(--muted);
}

.score-total {
    text-align: right;
    font-weight: 700;
    color: var(--color-accent);
}

.status-out {
    color: var(--color-success);
    font-weight: 700;
}

.status-submitted {
    color: var(--color-accent);
}

.status-playing {
    color: var(--muted);
    font-style: italic;
}

.highlight-out {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--color-success);
}

.highlight-done {
    background: rgba(33, 150, 243, 0.1);
}

.lobby-player-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s, background 0.2s;
}

.lobby-player-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.06);
}

.player-emoji {
    font-size: 2rem;
}

.player-name {
    flex: 1;
    font-weight: 600;
    font-size: 1.1rem;
}

.player-status {
    color: var(--color-success);
    font-size: 0.875rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Winner Screen (Dev Guide 8) */
.winner-title {
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 20px;
}

.standings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    text-align: left;
}

.standing-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.standing-item.is-winner {
    background: rgba(76, 175, 80, 0.2);
    border-color: var(--color-success);
}

.standing-rank {
    font-weight: 700;
    width: 24px;
    text-align: center;
}

/* Lobby Polish (Dev Guide 9) */
.empty-slot {
    opacity: 0.5;
}

.ready-indicator {
    font-size: 0.75rem;
    margin-right: 8px;
}

/* Full Scoreboard (Dev Guide 9) */
.scoreboard-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
}

.scoreboard-table th,
.scoreboard-table td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid var(--border);
}

.scoreboard-table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.totals-row td {
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.1em;
}

.active-round-row td {
    background: rgba(255, 255, 0, 0.05);
    border-top: 2px solid var(--color-accent);
}

@media (max-width: 600px) {
    .desktop-only {
        display: none;
    }

    .scoreboard-table {
        font-size: 0.8rem;
    }

    .scoreboard-table th,
    .scoreboard-table td {
        padding: 4px;
    }
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
    transition: background 0.2s;
}

.radio-label:hover {
    background: rgba(255, 255, 255, 0.1);
}

input[type="radio"] {
    accent-color: var(--color-accent);
    width: 18px;
    height: 18px;
}

/* Table Layout */
.poker-table {
    position: relative;
    margin: 40px auto;
    width: 90%;
    max-width: 600px;
    aspect-ratio: 3/2;
    background: linear-gradient(135deg, #1a5c1a 0%, #2d7a2d 50%, #1a5c1a 100%);
    border-radius: 50%;
    border: 12px solid #8b4513;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3), 0 4px 15px rgba(0, 0, 0, 0.5);
}

.poker-table::before {
    content: '';
    position: absolute;
    inset: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Player Pills */
.player-pill {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.player-pill:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px currentColor;
}

.player-emoji {
    font-size: 1.25rem;
}

/* Seating Positions */
.seat-top {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.seat-bottom {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.seat-left {
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
}

.seat-right {
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
}

.seat-top-left {
    top: 15%;
    left: 10%;
}

.seat-top-right {
    top: 15%;
    right: 10%;
}

/* Dealer Badge */
.dealer-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--color-accent);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s;
}

.dealer-badge.visible {
    opacity: 1;
}

/* Phase Lock Status */
.phase-lock-status {
    margin: 20px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.lock-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.lock-item {
    display: flex;
    gap: 12px;
    align-items: center;
}