/* ==========================================================================
   GAME 07: IMPOSTER STYLESHEET (OBSIDIAN REDESIGN - CRIMSON #E11D48)
   ========================================================================== */

.imposter-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    gap: 16px;
    font-family: 'Inter', sans-serif;
    color: var(--text-main, #F5F3EE);
    box-sizing: border-box;
}

/* HUD styles */
.imposter-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--bg-surface, #10131B);
    border: 1px solid rgba(225, 29, 72, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(225, 29, 72, 0.08);
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.hud-left {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.hud-badge {
    padding: 6px 12px;
    background: rgba(225, 29, 72, 0.12);
    border: 1px solid rgba(225, 29, 72, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-game-007, #E11D48);
    font-family: 'Space Grotesk', sans-serif;
}

.badge-diff-easy {
    background: rgba(71, 209, 140, 0.12);
    color: #47D18C;
    border-color: rgba(71, 209, 140, 0.3);
}

.badge-diff-medium {
    background: rgba(244, 184, 96, 0.12);
    color: #F4B860;
    border-color: rgba(244, 184, 96, 0.3);
}

.badge-diff-hard {
    background: rgba(225, 29, 72, 0.12);
    color: #E11D48;
    border-color: rgba(225, 29, 72, 0.3);
}

.hud-timer {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-game-007, #E11D48);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.hud-timer.timer-warning {
    color: #FF4F70;
    animation: pulseWarning 0.8s infinite alternate;
}

@keyframes pulseWarning {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); color: #E11D48; }
}

/* Role / Secret Word Card */
.imposter-role-card {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(225, 29, 72, 0.25);
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.imposter-role-card:hover {
    transform: translateY(-2px);
}

.role-normal {
    background: var(--bg-surface, #10131B);
    border-color: rgba(255, 255, 255, 0.1);
}

.role-imposter {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.15) 0%, rgba(16, 19, 27, 0.9) 100%);
    border: 1px dashed var(--accent-game-007, #E11D48);
}

.role-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--text-muted, #9B9EAA);
}

.role-imposter .role-title {
    color: var(--accent-game-007, #E11D48);
}

.role-secret-word {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-main, #F5F3EE);
    margin: 8px 0;
}

.highlight-word {
    color: var(--accent-game-007, #E11D48);
    background: rgba(225, 29, 72, 0.15);
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid rgba(225, 29, 72, 0.3);
    display: inline-block;
}

.highlight-category {
    font-weight: 800;
    color: #8B6CFF;
}

.role-desc {
    font-size: 0.9rem;
    color: var(--text-muted, #9B9EAA);
    font-weight: 600;
}

/* Turn Banner */
.imposter-turn-banner {
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.banner-my-turn {
    background: rgba(225, 29, 72, 0.15);
    color: var(--accent-game-007, #E11D48);
    border-color: rgba(225, 29, 72, 0.4);
    animation: pulseBorder 1.5s infinite alternate;
}

.banner-others {
    background: var(--bg-surface, #10131B);
    color: var(--text-muted, #9B9EAA);
}

.banner-voting {
    background: rgba(139, 108, 255, 0.15);
    color: #8B6CFF;
    border-color: rgba(139, 108, 255, 0.3);
}

.banner-results, .banner-final {
    background: var(--bg-surface, #10131B);
    color: var(--text-main, #F5F3EE);
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4); }
    100% { box-shadow: 0 0 0 6px rgba(225, 29, 72, 0); }
}

/* Main play sandbox card */
.imposter-main-play {
    background: var(--bg-surface, #10131B);
    border: 1px solid rgba(225, 29, 72, 0.2);
    border-radius: 16px;
    padding: 20px;
    min-height: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Clue Log History panel */
.clue-history-header {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-main, #F5F3EE);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.imposter-clue-log {
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding-right: 4px;
}

.clue-log-row {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-card, #181C27);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-size: 0.95rem;
}

.clue-log-row.my-clue {
    background: rgba(139, 108, 255, 0.08);
    border-color: rgba(139, 108, 255, 0.2);
}

.clue-log-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    margin-right: 8px;
    color: var(--text-muted, #9B9EAA);
}

.my-clue .clue-log-name {
    color: #8B6CFF;
}

.clue-log-text {
    font-weight: 600;
    color: var(--text-main, #F5F3EE);
    font-style: italic;
    flex-grow: 1;
}

.clue-log-round {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 6px;
    color: var(--text-muted, #9B9EAA);
    font-weight: 700;
}

/* Input form styling */
.imposter-input-area {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.imposter-input-area input {
    flex-grow: 1;
    padding: 12px 16px;
    min-height: 44px;
    background: var(--bg-card, #181C27);
    border: 2px solid rgba(225, 29, 72, 0.25);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main, #F5F3EE);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.imposter-input-area input:focus-visible {
    border-color: var(--accent-game-007, #E11D48);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.25);
}

/* Voting Grid layout */
.voting-title {
    font-family: 'Space Grotesk', sans-serif;
    text-align: center;
    font-weight: 900;
    font-size: 1.4rem;
    margin-bottom: 4px;
    color: var(--text-main, #F5F3EE);
}

.voting-subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted, #9B9EAA);
    margin-bottom: 20px;
    font-weight: 600;
}

.imposter-voting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    max-height: 55vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
}

.voting-candidate-card {
    background: var(--bg-card, #181C27);
    border: 1px solid rgba(225, 29, 72, 0.2);
    border-radius: 12px;
    padding: 16px 10px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 80px;
}

.voting-candidate-card:hover:not(.disabled) {
    transform: scale(1.04);
    border-color: var(--accent-game-007, #E11D48);
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.25);
}

.voting-candidate-card:focus-visible {
    outline: none;
    border-color: var(--accent-game-007, #E11D48);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.3);
}

.voting-candidate-card.selected {
    border-color: var(--accent-game-007, #E11D48);
    background: rgba(225, 29, 72, 0.15);
    transform: scale(1.04);
    box-shadow: 0 0 0 2px var(--accent-game-007, #E11D48);
}

.voting-candidate-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.candidate-avatar {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.candidate-nickname {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main, #F5F3EE);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Results Reveal Screen */
.imposter-reveal-block {
    text-align: center;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border: 2px solid rgba(225, 29, 72, 0.25);
    background: var(--bg-surface, #10131B);
}

.reveal-caught {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.2) 0%, rgba(16, 19, 27, 0.95) 100%);
    border-color: var(--accent-game-007, #E11D48);
}

.reveal-survived {
    background: linear-gradient(135deg, rgba(139, 108, 255, 0.2) 0%, rgba(16, 19, 27, 0.95) 100%);
    border-color: #8B6CFF;
}

.reveal-header {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted, #9B9EAA);
}

.reveal-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.4rem;
    font-weight: 900;
    margin: 8px 0;
    color: var(--text-main, #F5F3EE);
}

.reveal-word {
    font-size: 1.1rem;
    color: var(--text-muted, #9B9EAA);
    font-weight: 600;
    margin-top: 6px;
}

.reveal-status-msg {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 10px;
    color: var(--text-main, #F5F3EE);
}

.results-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.card-sub {
    background: var(--bg-card, #181C27);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
}

.col-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted, #9B9EAA);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
}

.col-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.result-vote-row, .result-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main, #F5F3EE);
}

.points-val {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--accent-game-007, #E11D48);
    font-weight: 800;
}

/* Final Results / Podium styles */
.imposter-podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin: 30px auto 20px auto;
    height: 180px;
    gap: 10px;
    max-width: 400px;
}

.podium-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 12px 12px 0 0;
    border: 1px solid rgba(225, 29, 72, 0.25);
    border-bottom: none;
    background: var(--bg-card, #181C27);
}

.slot-1 {
    height: 100%;
    background: linear-gradient(to top, rgba(225, 29, 72, 0.25), rgba(16, 19, 27, 0.9));
    border-color: var(--accent-game-007, #E11D48);
    box-shadow: 0 0 20px rgba(225, 29, 72, 0.2);
}

.slot-2 {
    height: 75%;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.08), rgba(16, 19, 27, 0.9));
}

.slot-3 {
    height: 60%;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.05), rgba(16, 19, 27, 0.9));
}

.podium-badge {
    font-size: 1.4rem;
    margin-top: 10px;
}

.podium-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main, #F5F3EE);
    margin: 8px 4px 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    width: 90%;
}

.podium-score {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--accent-game-007, #E11D48);
    margin-bottom: 12px;
}

/* Scrollbar customization */
.imposter-clue-log::-webkit-scrollbar, .col-content::-webkit-scrollbar {
    width: 6px;
}
.imposter-clue-log::-webkit-scrollbar-thumb, .col-content::-webkit-scrollbar-thumb {
    background-color: rgba(225, 29, 72, 0.3);
    border-radius: 3px;
}

/* Leaderboard rankings list */
.imposter-final-list {
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: var(--bg-card, #181C27);
    padding: 10px;
}

.imposter-final-list-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main, #F5F3EE);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.imposter-final-list-item:last-child {
    border-bottom: none;
}

.podium-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .imposter-container,
    .imposter-hud,
    .imposter-role-card,
    .role-secret-word,
    .imposter-main-play,
    .results-columns,
    .imposter-voting-grid,
    .imposter-input-area,
    .imposter-podium-container,
    .imposter-final-list {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .role-secret-word {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .hud-left {
        min-width: 0;
        max-width: 100%;
    }

    .results-columns {
        grid-template-columns: 1fr;
    }

    .imposter-voting-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .imposter-container {
        padding: 0;
    }

    .imposter-hud {
        padding: 8px 10px;
    }

    .hud-badge {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .imposter-role-card {
        padding: 12px;
    }

    .role-secret-word {
        font-size: 1.3rem;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .imposter-main-play {
        padding: 12px;
    }

    .results-columns {
        grid-template-columns: 1fr;
    }
    
    .imposter-voting-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .voting-candidate-card {
        padding: 10px 6px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .imposter-input-area {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .imposter-input-area input,
    .imposter-input-area button {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 44px;
        box-sizing: border-box;
    }

    .imposter-podium-container {
        max-width: 100%;
        height: 150px;
    }

    .reveal-name {
        font-size: 1.8rem;
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

