/* Styles spécifiques au jeu Undercover */

.undercover-hero {
    padding: 3rem 1rem;
    min-height: calc(100vh - 200px);
}

.lobby-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.lobby-card {
    padding: 2rem;
    text-align: center;
}

.lobby-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--purple-light), var(--blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lobby-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.join-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.input-room-id {
    padding: 1rem;
    font-size: 1.2rem;
    text-align: center;
    font-weight: bold;
    letter-spacing: 0.5rem;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.input-room-id:focus {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.lobby-error {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    text-align: center;
}

/* Salle d'attente */
.room-info {
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.room-id-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.room-id-label {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.room-id-value {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 0.5rem;
    color: var(--purple-light);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    background: rgba(124, 58, 237, 0.2);
    border-radius: 8px;
    border: 2px solid var(--purple-light);
}

.btn-copy {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.room-description {
    color: var(--text-secondary);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.players-list {
    padding: 2rem;
    margin-bottom: 2rem;
}

.players-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.players-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.player-card {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.player-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    border-color: rgba(124, 58, 237, 0.3);
}

.player-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.player-name.current {
    color: var(--purple-light);
    position: relative;
}

.player-name.current::after {
    content: ' (Vous)';
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.players-count {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
}

.waiting-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Écran de jeu */
.game-info {
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.word-display {
    padding: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(59, 130, 246, 0.1));
}

.word-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.secret-word {
    font-size: 3rem;
    font-weight: bold;
    color: var(--purple-light);
    text-transform: uppercase;
    letter-spacing: 0.3rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
    font-family: 'Courier New', monospace;
}

.player-role {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    display: inline-block;
    margin-top: 1rem;
}

.player-role.undercover {
    background: rgba(239, 68, 68, 0.3);
    color: #f87171;
    border: 2px solid rgba(239, 68, 68, 0.5);
}

.player-role.civilian {
    background: rgba(34, 197, 94, 0.3);
    color: #86efac;
    border: 2px solid rgba(34, 197, 94, 0.5);
}

.players-status {
    padding: 2rem;
    margin-bottom: 2rem;
}

.game-instructions {
    padding: 2rem;
    margin-bottom: 2rem;
}

.game-instructions h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
}

.instructions-list {
    list-style: none;
    padding: 0;
}

.instructions-list li {
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--purple-light);
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.instructions-list li:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.game-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

#start-game-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .lobby-container {
        grid-template-columns: 1fr;
    }

    .room-id-display {
        flex-direction: column;
    }

    .room-id-value {
        font-size: 1.5rem;
        letter-spacing: 0.3rem;
    }

    .secret-word {
        font-size: 2rem;
        letter-spacing: 0.2rem;
    }

    .players-container {
        grid-template-columns: 1fr;
    }

    .game-info {
        flex-direction: column;
        text-align: center;
    }

    .waiting-actions,
    .game-actions {
        flex-direction: column;
        width: 100%;
    }

    .waiting-actions button,
    .game-actions button {
        width: 100%;
    }
}

/* Timer */
.timer-display {
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.timer-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timer-value {
    font-size: 3rem;
    font-weight: bold;
    color: var(--purple-light);
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
}

/* Phases du jeu */
.game-phase {
    width: 100%;
}

/* Phase de vote */
.voting-header {
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.voting-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--purple-light), var(--blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.voting-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.voting-players {
    padding: 2rem;
    margin-bottom: 2rem;
}

.voting-players-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

.voting-players-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.voting-player-card {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
}

.voting-player-card:hover {
    transform: translateY(-5px);
    border-color: var(--purple-light);
}

.voting-player-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.vote-btn {
    width: 100%;
}

.vote-btn.selected {
    background: linear-gradient(135deg, var(--purple-light), var(--blue-light));
    border-color: var(--purple-light);
}

.voting-info {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    background: rgba(124, 58, 237, 0.1);
    border: 2px solid rgba(124, 58, 237, 0.3);
}

.chosen-players {
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.chosen-player-item {
    padding: 1.5rem;
    margin: 1rem 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(59, 130, 246, 0.2));
    border-radius: 12px;
    border: 2px solid rgba(124, 58, 237, 0.5);
}

.chosen-votes {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.voting-status {
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.voting-progress {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Phase de résultats */
.results-header {
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.results-title {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--purple-light), var(--blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-content {
    padding: 2rem;
    margin-bottom: 2rem;
}

.vote-results {
    width: 100%;
}

.chosen-player {
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(59, 130, 246, 0.2));
}

.chosen-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.chosen-name {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--purple-light);
    margin-bottom: 1rem;
}

.chosen-word {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.chosen-role {
    font-size: 1.3rem;
    margin-top: 1rem;
    font-weight: 600;
}

.all-votes {
    padding: 2rem;
}

.votes-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

.votes-list {
    list-style: none;
    padding: 0;
}

.vote-item {
    padding: 1rem;
    margin: 0.5rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vote-player {
    font-weight: 600;
    color: var(--text-primary);
}

.vote-action {
    color: var(--text-secondary);
    flex: 1;
    text-align: center;
}

.vote-count {
    color: var(--purple-light);
    font-weight: 600;
}