/* Hangman Specific Styles */

.container {
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Lobby Header UI */
.game-header-ui {
    width: 100%;
    max-width: 800px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
}

.user-welcome h2 {
    margin: 0;
    font-size: clamp(1rem, 4vw, 1.4rem);
}

.stats-banner {
    padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 24px);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    display: flex;
    gap: clamp(10px, 3vw, 20px);
    margin: 0 auto;
    width: fit-content;
    color: var(--primary);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
}

.stat-item {
    font-weight: bold;
}

.stat-divider {
    color: rgba(255, 255, 255, 0.1);
}

/* Game Layout */
.game-layout {
    display: flex;
    gap: 40px;
    width: 100%;
    max-width: 900px;
    margin-top: 20px;
    align-items: flex-start;
}

/* Lobby - Consistency */
.game-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    width: 100%;
    max-width: 900px;
}

.mode-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: clamp(16px, 4vw, 24px);
    flex: 1 1 260px;
    max-width: 320px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.mode-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.1);
}

.mode-card h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    margin-bottom: 12px;
    color: var(--primary);
}

.mode-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 20px;
    flex-grow: 1;
}

.hangman-view {
    flex: 1;
    max-width: 350px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

#hangman-svg {
    width: 100%;
    height: auto;
}

.hg-part {
    stroke: var(--primary);
    stroke-width: 4;
    fill: none;
    transition: opacity 0.3s;
    filter: drop-shadow(0 0 5px var(--primary));
}

.hg-part.hidden {
    opacity: 0;
}

.game-info {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-top: 20px;
}

/* Role Badge */
.role-badge {
    align-self: flex-start;
    padding: 8px 16px;
    background: rgba(189, 0, 255, 0.15);
    border: 1px solid var(--secondary);
    color: var(--secondary);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    border-radius: 100px;
    letter-spacing: 1px;
}

/* Word Display */
.word-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 2rem;
    min-height: 3rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Keyboard */
.keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 500px;
}

.key {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
    transition: all 0.2s;
    user-select: none;
}

.key:hover:not(.used) {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.key.used {
    opacity: 0.3;
    cursor: default;
    background: transparent;
}

.key.correct {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.key.wrong {
    border-color: #ff0055;
    color: #ff0055;
}

/* Picker UI */
.picker-ui {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--primary);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.picker-ui h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    margin-bottom: 20px;
}

.picker-ui input {
    text-align: center;
    text-transform: uppercase;
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 20px;
}

/* Coin Flip */
.coin-animation {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: #fff;
    margin: 0 auto 20px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    animation: spin 0.6s infinite linear;
}

@keyframes spin {
    from {
        transform: rotateY(0deg);
    }

    to {
        transform: rotateY(360deg);
    }
}

/* Mobile */
@media (max-width: 800px) {
    .game-header-ui {
        margin-bottom: 20px;
    }

    .user-welcome {
        flex-direction: column;
        gap: 10px;
    }

    .game-modes {
        gap: 12px;
    }

    .mode-card {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .game-layout {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .hangman-view {
        max-width: 250px;
        order: 1;
    }

    .game-info {
        order: 2;
        width: 100%;
        align-items: center;
    }

    .word-slots {
        font-size: 1.5rem;
    }

    .key {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}