:root {
    --bg-color: #1a1a1a;
    --card-bg: #2a2a2a;
    --text-color: #e0e0e0;
    --gold: #d4af37;
    --gold-dim: #998020;
    --red: #c62828;
    --red-light: #ef5350;
    --green: #2e7d32;
    --green-light: #66bb6a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.main-header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(180deg, #000 0%, #1a1a1a 100%);
    border-bottom: 2px solid var(--gold-dim);
}

.main-header h1 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 3rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.main-header p {
    font-size: 1.1rem;
    color: #aaa;
}

.back-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--gold);
    text-decoration: none;
    font-weight: bold;
    font-family: 'Cinzel', serif;
}

.back-btn:hover {
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.players-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.8rem 1.2rem;
    background: rgba(26, 26, 26, 0.7);
    border: 1px solid #3a3a3a;
    border-radius: 8px;
}

.filter-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.filter-title {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.toggle-eliminated-btn {
    background: rgba(218, 165, 32, 0.12);
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 0.5rem 1.1rem;
    border-radius: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.toggle-eliminated-btn:hover {
    background: var(--gold);
    color: #000;
    transform: scale(1.02);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.4);
}

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

.player-card {
    background-color: var(--card-bg);
    border: 2px solid var(--gold-dim);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: var(--gold);
}

.character-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: #000;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--gold);
}

.player-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 0.6rem;
}

.player-status-badge.status-confirmed-innocent {
    background: rgba(46, 125, 50, 0.25);
    color: var(--green-light);
    border: 1px solid var(--green);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.2);
}

.player-status-badge.status-rejoined {
    background: rgba(255, 193, 7, 0.15);
    color: #ffd54f;
    border: 1px dashed #ffd54f;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.15);
}

.player-status-badge.status-winner {
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.3), rgba(255, 215, 0, 0.15));
    color: #ffd700;
    border: 1px solid #ffd700;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
}

/* ===== Winner Cards ===== */
.player-card.winner-card {
    border: 2px solid #ffd700;
    background: radial-gradient(circle at top, #2a2210, #181510);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.25);
    position: relative;
}

.player-card.winner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
}

.winner-closed-btn {
    background: rgba(218, 165, 32, 0.15) !important;
    border-color: #ffd700 !important;
    color: #ffd700 !important;
}

/* ===== Grand Finale Winners Banner ===== */
.game-winners-banner {
    width: 100%;
    background: linear-gradient(135deg, #2c1a04 0%, #4a3306 50%, #2c1a04 100%);
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 1.2rem 1rem;
    text-align: center;
    margin-bottom: 1.2rem;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.3);
}

.winners-crown {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
    letter-spacing: 4px;
}

.winners-title {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffd700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.winners-names {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.winners-desc {
    font-size: 0.88rem;
    color: #ddd;
    line-height: 1.4;
}

.player-name {
    font-family: 'Cinzel', serif;
    font-size: 1.35rem;
    font-weight: bold;
    margin-top: 0.2rem;
    margin-bottom: 0.4rem;
    color: #fff;
    letter-spacing: 0.5px;
}

.player-location {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 0.3rem;
}

.player-bio {
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

/* ===== Verdict Bar ===== */
.verdict-bar-container {
    width: 100%;
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.verdict-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.label-innocent {
    color: var(--green-light);
    font-weight: 700;
}

.label-traitor {
    color: var(--red-light);
    font-weight: 700;
}

.verdict-bar {
    position: relative;
    width: 100%;
    height: 14px;
    border-radius: 7px;
    overflow: visible;
    display: flex;
    background: #111;
}

.verdict-fill-innocent {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--green-light));
    border-radius: 7px 0 0 7px;
    transition: width 0.5s ease;
}

.verdict-fill-traitor {
    height: 100%;
    background: linear-gradient(90deg, var(--red-light), var(--red));
    border-radius: 0 7px 7px 0;
    transition: width 0.5s ease;
}

.verdict-marker {
    position: absolute;
    top: -4px;
    width: 6px;
    height: 22px;
    background: #fff;
    border-radius: 3px;
    transform: translateX(-50%);
    box-shadow: 0 0 6px rgba(255,255,255,0.6);
    transition: left 0.5s ease;
    z-index: 2;
}

.verdict-label {
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.verdict-label.innocent {
    color: var(--green-light);
}

.verdict-label.traitor {
    color: var(--red-light);
}

.verdict-label.neutral {
    color: #888;
}

/* ===== Vote Buttons ===== */
.vote-section {
    display: flex;
    gap: 0.8rem;
    margin-top: auto;
    padding-top: 1rem;
    width: 100%;
    justify-content: center;
}

.vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s, transform 0.15s;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

.vote-btn .btn-icon {
    font-size: 1.1rem;
}

.vote-btn .vote-count {
    background: rgba(255,255,255,0.1);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-left: 2px;
}

.vote-btn.innocent {
    color: var(--green-light);
    border: 1px solid var(--green);
}

.vote-btn.innocent:hover {
    background: rgba(46, 125, 50, 0.25);
    transform: scale(1.05);
}

.vote-btn.traitor {
    color: var(--red-light);
    border: 1px solid var(--red);
}

.vote-btn.traitor:hover {
    background: rgba(198, 40, 40, 0.25);
    transform: scale(1.05);
}

.vote-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.cooldown-msg {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: #ff9800;
    font-style: italic;
}

/* ===== Game Progress Panel ===== */
.game-panel {
    background: var(--card-bg);
    border: 2px solid var(--gold);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
}

.game-kitty {
    text-align: center;
    min-width: 140px;
}

.kitty-label {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kitty-amount {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold);
}

.kitty-sub {
    font-size: 0.72rem;
    color: #ffd54f;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.game-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    min-width: 60px;
}

.stat-num {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-tasks {
    flex: 1;
    min-width: 180px;
}

.tasks-title {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 6px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.task-item:last-child {
    border-bottom: none;
}

.task-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.task-detail {
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
    line-height: 1.3;
}

.task-item.task-won .task-amount {
    color: var(--green-light);
}

.task-item.task-lost .task-amount {
    color: var(--red-light);
}

.task-icon {
    font-size: 1rem;
    margin-top: 1px;
}

.task-name {
    color: #ccc;
    font-weight: 500;
}

.task-amount {
    font-weight: 700;
    white-space: nowrap;
}

.game-rules {
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
    border-top: 1px solid #444;
    padding-top: 0.8rem;
}

/* ===== Game Rounds / Voting Record ===== */
.game-rounds-section {
    width: 100%;
    border-top: 1px solid #444;
    padding-top: 1.2rem;
    margin-top: 0.5rem;
}

.rounds-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rounds-title-clickable {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.2rem;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.rounds-title-clickable:hover {
    color: #fff;
}

.timeline-arrow {
    font-size: 0.85rem;
    color: var(--gold);
    display: inline-block;
    transition: transform 0.2s ease;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(218, 165, 32, 0.12);
    border: 1px solid rgba(218, 165, 32, 0.35);
}

.rounds-title-clickable:hover .timeline-arrow {
    background: rgba(218, 165, 32, 0.25);
    border-color: var(--gold);
    color: #fff;
}

.rounds-content-collapsible {
    margin-top: 0.8rem;
    animation: fadeInTimeline 0.25s ease-in-out;
}

@keyframes fadeInTimeline {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.round-card {
    background: #1e1e1e;
    border: 1px solid #3a3a3a;
    border-left: 4px solid var(--gold);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
}

.round-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.round-card-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
}

.round-verdict-badge {
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.round-verdict-badge.innocent {
    background: rgba(46, 125, 50, 0.25);
    color: var(--green-light);
    border: 1px solid var(--green);
}

.round-verdict-badge.traitor {
    background: rgba(198, 40, 40, 0.25);
    color: var(--red-light);
    border: 1px solid var(--red);
}

.round-verdict-badge.unrevealed {
    background: rgba(255, 213, 79, 0.15);
    color: #ffd54f;
    border: 1px dashed #ffd54f;
}

.round-summary {
    font-size: 0.85rem;
    color: #bbb;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.round-results-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.round-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: #141414;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.82rem;
}

.round-target {
    color: #fff;
    font-weight: 500;
}

.round-voters {
    color: #888;
    font-style: italic;
    font-size: 0.8rem;
}

/* ===== Eliminated Player Cards ===== */
.player-card.eliminated {
    opacity: 0.82;
    background: #1d1717;
    border-color: #5a2626;
    position: relative;
    box-shadow: none;
}

.player-card.eliminated:hover {
    transform: none;
    border-color: #8b0000;
}

.eliminated-banner {
    width: 100%;
    background: linear-gradient(90deg, #8b0000, #b71c1c);
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 0.8rem;
    text-align: center;
}

.eliminated-banner.murdered {
    background: linear-gradient(90deg, #3b0a45, #880e4f);
}

.eliminated-banner.quit {
    background: linear-gradient(90deg, #37474f, #455a64);
}

.eliminated-banner.removed {
    background: linear-gradient(90deg, #b71c1c, #424242);
}

.character-icon.eliminated-icon {
    filter: grayscale(100%);
    border-color: #666;
    position: relative;
}

.role-reveal-box {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    margin: 0.8rem 0 0.4rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.role-reveal-box.unrevealed {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed #888;
}

.role-reveal-box.unrevealed .role-reveal-val {
    color: #ffd54f;
}

.role-reveal-box.innocent {
    background: rgba(46, 125, 50, 0.2);
    border: 1px solid var(--green);
}

.role-reveal-box.traitor {
    background: rgba(198, 40, 40, 0.2);
    border: 1px solid var(--red);
}

.role-reveal-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
}

.role-reveal-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.role-reveal-box.innocent .role-reveal-val {
    color: var(--green-light);
}

.role-reveal-box.traitor .role-reveal-val {
    color: var(--red-light);
}

.eliminated-meta {
    font-size: 0.78rem;
    color: #888;
    font-style: italic;
    margin-bottom: 0.8rem;
}

.eliminated-closed-btn {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed #444;
    color: #666;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #777;
    border-top: 1px solid #333;
    margin-top: 2rem;
}
