/**
 * Battle Page Styles
 * Extracted from battle.php
 * Note: Some styles use CSS variables set by PHP inline
 */

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-50px); }
}

/* Error message container */
.battle-error-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.battle-error-content {
    text-align: center;
    color: #666;
}

.battle-error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.battle-error-link {
    color: var(--accent);
    margin-top: 1rem;
    display: block;
}

/* Competitor avatars with dynamic backgrounds */
.competitor-avatar-p1 { background-image: var(--p1-bg-image, none); }
.competitor-avatar-p2 { background-image: var(--p2-bg-image, none); }

/* People's Champion */
.pc-badge-text { font-size: 0.7rem; color: #444; margin-top: 0.2rem; }
.pc-tracking-info { text-align: center; font-size: 0.8rem; color: #888; }
.pc-section { display: flex; justify-content: center; margin: 1rem 0; }
.pc-badge { color: #ffd700; margin-right: 0.5rem; }
.pc-info { text-align: center; margin-top: 1rem; padding: 1rem; background: var(--card-bg); color: #888; }
.pc-winner-name { color: var(--accent); font-weight: 600; }

/* Prediction bars with dynamic widths */
.prediction-bar-p1 { width: var(--p1-pred-pct, 0%); }
.prediction-bar-p2 { width: var(--p2-pred-pct, 0%); }
.prediction-stat-red { color: #ff4444; }
.prediction-stat-blue { color: #60a5fa; }

/* Vote bars with dynamic widths */
.vote-bar-p1 { width: var(--p1-percent, 50%); }
.vote-bar-p2 { width: var(--p2-percent, 50%); }

/* Vote bar container */
.vote-bar-container { display: flex; align-items: center; gap: 1rem; }

/* Chat styling */
.chat-loading { opacity: 0.5; }
.chat-disabled { opacity: 0.5; cursor: default; }
.chat-submit-icon { margin-left: 5px; }

/* Reminder button */
.reminder-btn-menu { display: none; }
.reminder-btn-menu.show { display: block; }
.reminder-btn-icon { margin-left: 5px; cursor: pointer; }

/* Comments */
.comments-empty { text-align: center; padding: 2rem; background: var(--card-bg); color: #888; }
.comments-empty-icon { font-size: 2rem; margin-bottom: 1rem; }
.comments-auth-required { text-align: center; color: #444; padding: 2rem; }
.comments-auth-icon { font-size: 2rem; margin-bottom: 1rem; }
.comment-submit-icon { margin-left: 5px; }

/* Stream items */
.stream-item { animation: fadeIn 0.3s ease; }

/* Footer */
.footer-privacy-link { color: #666; font-size: 0.8rem; text-decoration: underline; }

/* Fire button */
.fire-btn { color: var(--accent); }

/* Voting rules link */
.voting-rules-link {
    color: #666;
    font-size: 0.8rem;
    text-decoration: underline;
    margin-top: 0.5rem;
    display: block;
}

/* Inline utilities */
.u-opacity-50 { opacity: 0.5; }
.u-cursor-default { cursor: default; }
.u-margin-right-sm { margin-right: 0.5rem; }
.u-margin-left-xs { margin-left: 5px; }
.u-margin-top { margin-top: 1rem; }
.u-display-block { display: block; }
.u-display-flex-center { display: flex; justify-content: center; margin: 1rem 0; }
.u-text-center { text-align: center; }

/* Small text */
.text-small-muted { font-size: 0.8rem; color: #888; margin-bottom: 0.5rem; }
.text-timestamp { font-size: 0.7rem; color: #444; margin-top: 0.2rem; }

/* Percent colors */
.percent-red { color: #ff4444; }
.percent-blue { color: #60a5fa; }

/* Crown icon */
.crown-gold { color: #ffd700; margin-right: 0.5rem; }

/* Gap utilities */
.gap-flex { display: flex; gap: 1rem; align-items: center; }

/* Position utilities */
.relative { position: relative; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Comments auth */
.comments-auth-box {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 3rem;
    border: 1px dashed #333;
}

.comments-auth-text { color: #888; }

.comments-auth-link {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 0.5rem;
    display: inline-block;
}

/* Prediction result box */
.prediction-result-box { margin-top: 1rem; }

/* Chat signed in link */
.chat-signin-link {
    color: var(--accent);
    font-weight: 600;
}

/* Vote form */
.vote-form-container { display: flex; gap: 1rem; align-items: center; }

/* ========================================
   BATTLE PAGE STYLES - Extracted from battle.php
======================================== */

/* --- IMMERSIVE HERO SECTION --- */
.arena-hero {
    position: relative;
    padding-top: 100px;
    padding-bottom: 4rem;
    background: radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.25) 0%, transparent 70%);
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.arena-hero::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 100%;
    opacity: 0.05; pointer-events: none;
}

.hub-tag {
    text-align: center; font-size: 0.8rem; letter-spacing: 3px;
    text-transform: uppercase; color: var(--accent); font-weight: 800;
    margin-bottom: 2rem; display: block; opacity: 0.8;
    text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}

/* --- THE FIGHT CARD --- */
.fight-card {
    display: grid; grid-template-columns: 1fr 120px 1fr;
    align-items: center; max-width: 1000px; margin: 0 auto;
    position: relative; z-index: 2;
}

.fighter {
    display: flex; flex-direction: column; align-items: center;
    position: relative; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none; /* For the link */
}
.fighter:hover { transform: scale(1.02); }

.fighter.p1 { align-items: flex-end; text-align: right; }
.fighter.p2 { align-items: flex-start; text-align: left; }

/* Avatars */
.fighter-img-wrapper {
    width: 180px; height: 180px; position: relative; margin-bottom: 1.5rem;
    transition: border-color 0.3s;
}
.fighter-img {
    width: 100%; height: 100%; border-radius: 12px;
    background-size: cover; background-position: center;
    border: 2px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: skew(-2deg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.avatar-fallback {
    font-size: 4rem;
    color: rgba(255,255,255,0.3);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transform: skew(2deg);
}

.fighter.p1 .fighter-img {
    border-right: 4px solid var(--accent);
}
.fighter.p2 .fighter-img {
    border-left: 4px solid #3b82f6;
}

.fighter:hover .fighter-img { border-color: #fff; }

/* Names & Stats */
.fighter-name {
    font-size: 2.5rem; font-weight: 900; line-height: 1;
    text-transform: uppercase; font-style: italic;
    text-shadow: 2px 2px 0px #000; margin-bottom: 0.5rem; color: #fff;
}
.fighter-stat-box {
    display: flex; gap: 1rem; font-size: 0.9rem;

    color: var(--text-muted); font-family: monospace; text-transform: uppercase;
}

/* Winner Badge */
.winner-badge {
    position: absolute; top: -15px;
    background: #ffd700; color: #000; font-weight: 800;
    padding: 0.25rem 1rem; border-radius: 4px; text-transform: uppercase;
    font-size: 0.8rem; box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4); z-index: 10;
}
.fighter.p1 .winner-badge { right: 10px; }
.fighter.p2 .winner-badge { left: 10px; }

/* VS CENTER PIECE */
.vs-middle {
    display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%;
}
.vs-text {
    font-size: 4rem; font-weight: 900; font-style: italic;
    background: linear-gradient(180deg, #fff 0%, #666 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(var(--accent-rgb), 0.5));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(var(--accent-rgb), 0.5)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 25px rgba(var(--accent-rgb), 0.8)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(var(--accent-rgb), 0.5)); }
}

.battle-date { font-size: 0.8rem; color: #666; font-weight: 700; text-transform: uppercase; margin-top: 1rem; }

/* --- THE VIDEO STAGE --- */
.stage-container {
    max-width: 1100px; margin: -3rem auto 3rem; padding: 0 1rem;
    position: relative; z-index: 5;
}

.media-player-shell {
    background: #000; border-radius: 16px; overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255,255,255,0.1);
    aspect-ratio: 16/9; position: relative;
    display: flex; align-items: center; justify-content: center;
}

/* Simulive Video Player Styles */
.simulive-player {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

.simulive-badge, .replay-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.replay-badge {
    background: rgba(100, 100, 100, 0.9);
}

.live-pulse {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.video-container {
    width: 100%;
    height: 100%;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Video Placeholder (Bot Protection) */
.video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #666;
    padding: 2rem;
    text-align: center;
    height: 100%;
}

.video-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Utility class for hiding elements */
.hidden {
    display: none !important;
}

/* Unmute Overlay */
.video-unmute-overlay {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.video-unmute-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-unmute-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.video-unmute-btn:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: var(--accent);
    transform: scale(1.05);
}

.video-unmute-btn i {
    font-size: 1.1rem;
    color: var(--accent);
}

.simulive-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 2rem 1.5rem 1rem;
    z-index: 10;
}

.simulive-timer {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.simulive-timer i {
    color: #ef4444;
}

.simulive-hint {
    color: #888;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Simulive Countdown Overlay */
.simulive-countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(9,9,11,0.98) 0%, rgba(30,10,10,0.98) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 2rem;
    text-align: center;
}

.countdown-badge {
    background: rgba(207,0,0,0.9);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(207,0,0,0.4);
}

.countdown-timer-large {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.countdown-unit-large {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    min-width: 100px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.countdown-unit-large span {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    text-shadow: 0 0 20px rgba(207,0,0,0.5);
}

.countdown-unit-large label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.5rem;
}

.countdown-message {
    color: #aaa;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.countdown-message i {
    color: var(--accent);
}

.countdown-video-preview {
    position: relative;
    width: 320px;
    max-width: 90%;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.1);
    opacity: 0.6;
    filter: grayscale(0.3);
}

.countdown-video-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
}

.preview-overlay i {
    font-size: 4rem;
    color: rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
    .simulive-countdown-overlay {
        padding: 1rem;
        position: relative;
        min-height: 400px;
        margin-bottom: 2rem;
    }
    
    .countdown-timer-large {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .countdown-unit-large {
        padding: 0.75rem 1rem;
        min-width: 60px;
    }
    
    .countdown-unit-large span {
        font-size: 1.75rem;
    }
    
    .countdown-unit-large label {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }
    
    .countdown-badge {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        letter-spacing: 1px;
    }
    
    .countdown-message {
        font-size: 0.9rem;
        text-align: center;
        padding: 0 1rem;
    }
    
    .countdown-video-preview {
        width: 100%;
        max-width: 280px;
    }
}

/* Countdown Timer */
.countdown-cta {
    flex-direction: column;
    gap: 1.5rem;
}

.countdown-timer {
    display: flex;
    gap: 1rem;
}

.countdown-unit {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    min-width: 70px;
    text-align: center;
}

.countdown-unit span {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.countdown-unit label {
    display: block;
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

.media-cta { text-align: center; }
.play-button-large {
    width: 90px; height: 90px;
    background: rgba(255,255,255,0.1); border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem; cursor: pointer; backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}
.play-button-large i { font-size: 2.5rem; color: #fff; margin-left: 5px; }
.play-button-large:hover {
    background: var(--accent); border-color: var(--accent);
    transform: scale(1.1) rotate(5deg); box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.6);
}
.media-text h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.media-text p { color: #777; font-size: 0.95rem; }

/* LIVE Indicator */
.live-tag {
    position: absolute; top: 20px; right: 20px;
    background: #e11d48; color: white; padding: 0.25rem 0.75rem;
    border-radius: 4px; font-weight: 800; font-size: 0.8rem;
    text-transform: uppercase; animation: blink 2s infinite;
    display: flex; align-items: center; gap: 5px;
}
.live-tag::before { content: ''; width: 8px; height: 8px; background: #fff; border-radius: 50%; }
@keyframes blink { 50% { opacity: 0.5; } }

/* --- ACTION BAR (Voting) --- */
.action-deck {
    background: var(--card-bg); border-top: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem 2rem; display: flex; justify-content: space-between; align-items: center;
}

.vote-form { display: flex; gap: 1rem; align-items: center; }

.vote-btn {
    background: transparent; border: 1px solid rgba(255,255,255,0.2);
    color: #fff; padding: 0.75rem 1.5rem; border-radius: 8px;
    font-weight: 700; text-transform: uppercase; font-size: 0.9rem;
    cursor: pointer; display: flex; align-items: center; gap: 0.5rem;
    transition: all 0.2s; min-width: 140px; justify-content: center;
}
.vote-btn:hover:not(:disabled) { background: rgba(255,255,255,0.05); border-color: #fff; }
.vote-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.vote-btn.primary {
    background: var(--accent); border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.3);
}
.vote-btn.primary:hover:not(:disabled) { filter: brightness(1.2); transform: translateY(-2px); }

.vote-btn.secondary-action { color: #888; border-color: transparent; }
.vote-btn.secondary-action:hover { color: #fff; background: rgba(255,255,255,0.05); }

/* Disabled voting during prediction period */
.disabled-voting {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px dashed rgba(255,255,255,0.1);
}

.disabled-voting .vote-btn {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: #888;
    width: auto;
    min-width: 140px;
}

@media (max-width: 480px) {
    .disabled-voting {
        flex-direction: column;
        gap: 0.75rem;
    }
    .disabled-voting .vote-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* --- DISCUSSION GRID --- */
.discussion-area {
    max-width: 1100px; margin: 3rem auto; padding: 0 1rem;
    display: grid; grid-template-columns: 2fr 1fr; gap: 3rem;
}
.section-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}
.section-title { font-size: 1.8rem; font-weight: 800; font-style: italic; }
.comment-count { background: #222; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.9rem; color: #888; }

/* Comment Input */
.comment-box-wrapper {
    background: var(--card-bg); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 1.5rem; margin-bottom: 3rem;
}
.comment-input-wrapper {
    position: relative;
}
.c-textarea {
    width: 100%; background: #000; border: 1px solid #333;
    color: #fff; padding: 1rem; border-radius: 8px;
    min-height: 80px; resize: none; font-family: inherit;
    transition: border 0.2s;
}
.c-textarea:focus { outline: none; border-color: var(--accent); }

.c-tools { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.c-actions { display: flex; gap: 1rem; color: #666; font-size: 1.2rem; cursor: pointer; }
.c-actions i:hover { color: #fff; }

/* Emoji Picker for Battle Chat */
.emoji-picker-battle {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #1a1a1f;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 8px;
    min-width: 280px;
}

.emoji-picker-battle::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #1a1a1f;
    border-right: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transform: rotate(45deg);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    font-size: 1.3rem;
}

.emoji-grid span {
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    text-align: center;
    transition: background 0.2s;
}

.emoji-grid span:hover {
    background: rgba(255,255,255,0.1);
}

.btn-post {
    background: #fff; color: #000; border: none;
    padding: 0.6rem 1.5rem; font-weight: 800; text-transform: uppercase;
    border-radius: 6px; cursor: pointer;
}
.btn-post:hover { background: var(--accent); color: #fff; }

/* Sidebar Cards */
.sidebar-card {
    background: var(--card-bg); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; padding: 1.5rem; margin-bottom: 2rem;
}
.sidebar-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; color: #fff; display: flex; align-items: center; gap: 0.5rem; }
.rules-list { list-style: none; color: #888; font-size: 0.9rem; line-height: 1.6; }
.rules-list li { margin-bottom: 0.5rem; position: relative; padding-left: 1.2rem; }
.rules-list li::before { 
    content: '•'; color: var(--accent); position: absolute; left: 0; font-weight: bold; 
}

/* Stream */
.stream-item { display: flex; gap: 1rem; margin-bottom: 2rem; animation: fadeIn 0.5s ease; }
.stream-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background-size: cover; background-position: center; border: 2px solid #333;
}
.stream-body { flex: 1; }
.stream-meta { margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.5rem; }
.stream-user { font-weight: 700; color: #fff; font-size: 1rem; text-decoration: none; transition: color 0.2s; }
.stream-user:hover { color: var(--accent); }
.stream-time { color: #555; font-size: 0.8rem; }
.stream-content {
    color: #ccc; line-height: 1.6; font-size: 0.95rem;
    background: rgba(255,255,255,0.03); padding: 1rem;
    border-radius: 0 12px 12px 12px; border: 1px solid rgba(255,255,255,0.05);
}

/* Reactions */
.stream-reactions { display: flex; gap: 1rem; margin-top: 0.5rem; padding-left: 0.5rem; }
.reaction-pill {
    display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: #666;
    cursor: pointer; transition: all 0.2s;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    border: 1px solid transparent;
}
.reaction-pill:hover { color: var(--accent); background: rgba(255,255,255,0.05); }
.reaction-pill.active { color: var(--accent); }

/* Fire Reaction */
.reaction-pill.fire-pill { 
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
}
.reaction-pill.fire-pill:hover { 
    background: rgba(255,100,0,0.1);
    border-color: rgba(255,100,0,0.3);
}
.reaction-pill.fire-pill.fired, .reaction-pill.fire-pill.active {
    color: #ff6600;
    background: rgba(255,100,0,0.15);
    border-color: rgba(255,100,0,0.4);
    box-shadow: 0 0 10px rgba(255,100,0,0.2);
}
.reaction-pill.fire-pill.fired i, .reaction-pill.fire-pill.active i {
    color: #ff6600;
}
.reaction-pill.fire-pill.processing {
    opacity: 0.6;
    pointer-events: none;
}
.reaction-pill.fire-pill .fire-count {
    font-weight: 600;
    min-width: 1rem;
    text-align: center;
}

/* Delete comment button for admins */
.reaction-pill.delete-pill {
    margin-left: auto;
    color: #888;
    border: 1px solid rgba(255,255,255,0.1);
}
.reaction-pill.delete-pill:hover {
    color: #ef4444;
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.3);
}

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

@keyframes commentSlide {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ========================================
   LIVE CHAT MODAL OVERLAY - PREMIUM STYLING
======================================== */

/* Chat Toggle Button on Video */
.video-chat-toggle {
    position: absolute;
    bottom: 70px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    padding: 0.6rem 1rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 20;
    transition: all 0.2s;
}

.video-chat-toggle:hover {
    background: rgba(207,0,0,0.8);
    border-color: var(--accent);
    transform: scale(1.05);
}

.video-chat-toggle i {
    font-size: 1rem;
}

/* Chat Modal Overlay */
.chat-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(8px);
    z-index: 200; /* Higher than video toggle button (100) */
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Hide video toggle when chat is open */
.chat-modal-overlay.active ~ .video-overlay-toggle-btn,
.chat-modal-overlay.active .video-overlay-toggle-btn {
    display: none !important;
}

.chat-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.chat-modal {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Chat Modal Header */
.chat-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0,0,0,0.4);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.chat-modal-title {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
}

.live-indicator {
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px #ef4444;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.chat-close-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-close-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

/* Floating Reactions - Smaller */
.floating-reactions {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 120px;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

.floating-emoji {
    position: absolute;
    font-size: 1.8rem;
    animation: floatUp 2.5s ease-out forwards;
    opacity: 0;
    text-shadow: 0 0 15px currentColor;
}

@keyframes floatUp {
    0% { 
        transform: translateY(100%) scale(0.5) rotate(-10deg); 
        opacity: 0; 
    }
    10% { 
        opacity: 1; 
        transform: translateY(80%) scale(1) rotate(0deg); 
    }
    100% { 
        transform: translateY(-80px) scale(1.1) rotate(10deg); 
        opacity: 0; 
    }
}

/* Chat Messages Area */
.live-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    scroll-behavior: smooth;
}

.live-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.live-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.live-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.chat-welcome {
    text-align: center;
    color: #666;
    padding: 2rem 1rem;
}

.chat-welcome i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}

.chat-welcome p {
    font-size: 0.85rem;
}

/* ========================================
   CHAT MESSAGES - COMPACT YOUTUBE-STYLE
======================================== */

/* Individual Chat Message - Compact Layout */
.chat-message,
.live-chat-message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.25rem 0;
    animation: messageSlideIn 0.2s ease;
}

@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Remove own message special styling - all messages align left */
.chat-message.own,
.live-chat-message.own {
    flex-direction: row;
}

.chat-message.own .chat-message-content,
.live-chat-message.own .chat-message-content {
    background: transparent;
    border-color: transparent;
}

/* Small Avatar - Left aligned */
.chat-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: none;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Message Content - No bubble, just text */
.chat-message-content {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    max-width: none;
    flex: 1;
    min-width: 0;
}

/* Username - Smaller, inline style */
.chat-username {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    display: inline;
    margin-right: 0.4rem;
}

/* Chat Text - Smaller, compact */
.chat-text {
    font-size: 0.8rem;
    color: #e0e0e0;
    line-height: 1.4;
    word-break: break-word;
    display: inline;
}

/* Reaction Only Messages */
.chat-reaction-only {
    font-size: 1.5rem;
    animation: reactionBounce 0.4s ease;
    display: inline;
}

@keyframes reactionBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Timestamp - Hidden by default, show on hover */
.chat-time {
    font-size: 0.65rem;
    color: #555;
    margin-left: 0.5rem;
    display: inline;
}

/* Chat Input Area */
.live-chat-input-area {
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.5);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.reaction-buttons {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    justify-content: center;
}

.reaction-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    color: #fff;
}

.reaction-btn:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Icon colors */
.reaction-btn.fire-btn { color: #ff6600; }
.reaction-btn.heart-btn { color: #ff0066; }
.reaction-btn.skull-btn { color: #aaa; }
.reaction-btn.hundred-btn { color: #ffd700; }

.reaction-btn.fire-btn:hover {
    background: rgba(255,100,0,0.25);
    border-color: #ff6600;
    box-shadow: 0 5px 20px rgba(255,100,0,0.3);
}

.reaction-btn.heart-btn:hover {
    background: rgba(255,0,100,0.25);
    border-color: #ff0066;
    box-shadow: 0 5px 20px rgba(255,0,100,0.3);
}

.reaction-btn.skull-btn:hover {
    background: rgba(100,100,100,0.25);
    border-color: #666;
    box-shadow: 0 5px 20px rgba(100,100,100,0.3);
}

.reaction-btn.hundred-btn:hover {
    background: rgba(255,215,0,0.25);
    border-color: #ffd700;
    box-shadow: 0 5px 20px rgba(255,215,0,0.3);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.625rem;
    align-items: center;
}

.live-chat-input {
    flex: 1;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 25px;
    padding: 0.625rem 1rem;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.live-chat-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(207,0,0,0.2);
}

.live-chat-input::placeholder {
    color: #666;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(207,0,0,0.4);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.live-chat-login {
    padding: 1.25rem;
    text-align: center;
    background: rgba(0,0,0,0.4);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.live-chat-login a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.live-chat-login a:hover {
    text-decoration: underline;
}

/* ========================================
   MOBILE FULL-SCREEN CHAT
======================================== */

/* Hide navbar when chat is open */
.chat-modal-overlay.active ~ .navbar,
.chat-modal-overlay.active ~ nav.navbar,
body:has(.chat-modal-overlay.active) .navbar {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Ensure chat header and close button are clickable */
.chat-modal-header {
    position: relative;
    z-index: 10000;
}

.chat-close-btn {
    position: relative;
    z-index: 10001;
}

/* Portrait: Full height */
@media (max-width: 768px) and (orientation: portrait) {
    .chat-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
        z-index: 9999;
    }
    
    .chat-modal {
        width: 100%;
        height: 100%;
    }
    
    .chat-modal-header {
        padding: 0.75rem 1rem;
        min-height: 50px;
    }
    
    .chat-modal-title {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
    
    .live-chat-messages {
        padding: 0.5rem 0.75rem;
        gap: 0.25rem;
    }
    
    /* Even more compact on mobile */
    .chat-message,
    .live-chat-message {
        padding: 0.2rem 0;
        gap: 0.4rem;
    }
    
    .chat-avatar {
        width: 22px;
        height: 22px;
    }
    
    .chat-username {
        font-size: 0.7rem;
    }
    
    .chat-text {
        font-size: 0.75rem;
        line-height: 1.35;
    }
    
    .live-chat-input-area {
        padding: 0.75rem;
    }
    
    .reaction-buttons {
        gap: 0.4rem;
        margin-bottom: 0.5rem;
    }
    
    .reaction-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Landscape: Full width, side panel style */
@media (max-width: 768px) and (orientation: landscape) {
    .chat-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        z-index: 9999;
        justify-content: flex-end;
    }
    
    /* Also hide navbar in landscape when chat is open */
    .chat-modal-overlay.active ~ .navbar,
    .chat-modal-overlay.active ~ nav.navbar,
    body:has(.chat-modal-overlay.active) .navbar {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }
    
    .chat-modal {
        width: 50%;
        min-width: 320px;
        max-width: 400px;
        height: 100%;
        background: rgba(9, 9, 11, 0.95);
        border-left: 1px solid rgba(255,255,255,0.1);
    }
    
    .chat-modal-header {
        padding: 0.6rem 0.75rem;
        min-height: 44px;
    }
    
    .live-chat-messages {
        padding: 0.5rem 0.75rem;
    }
}

/* Desktop adjustments - keep same dimensions, just compact messages */
@media (min-width: 769px) {
    .chat-modal-overlay {
        position: absolute;
        z-index: 200;
    }
    
    .chat-modal {
        width: 100%;
        height: 100%;
    }
}

/* Original mobile styles for toggle button */
@media (max-width: 600px) {
    .video-chat-toggle {
        top: 50px;
        left: 110px;
        bottom: auto;
        right: auto;
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .video-chat-toggle span {
        display: none;
    }
}

/* --- PREDICTION WIDGET --- */
.prediction-widget {
    background: linear-gradient(135deg, rgba(207, 0, 0, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.prediction-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.prediction-header h4 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 0.25rem;
}

.prediction-header p {
    font-size: 0.8rem;
    color: #888;
}

.prediction-bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.prediction-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.prediction-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.prediction-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
}

.prediction-bar-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.prediction-bar-fill.p1 { background: linear-gradient(90deg, #cf0000, #ff4444); }
.prediction-bar-fill.p2 { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

.prediction-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #888;
}

.prediction-labels .percent {
    font-weight: 700;
    color: #fff;
}

.prediction-count {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
}

.prediction-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.prediction-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.prediction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.prediction-btn.selected {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
}

.prediction-btn .name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.prediction-btn .check {
    font-size: 1.2rem;
    color: var(--accent);
}

.prediction-result {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.prediction-result.correct {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.prediction-result.wrong {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Mobile styles for prediction widget */
@media (max-width: 768px) {
    .prediction-widget {
        padding: 1.25rem 1rem;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .prediction-bar-container {
        gap: 0.75rem;
    }
    
    .prediction-avatar {
        width: 40px;
        height: 40px;
    }
    
    .prediction-header h4 {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
}

/* --- LIVE VOTE DISPLAY --- */
.vote-display {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.vote-display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.vote-display-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

.vote-total {
    font-size: 0.8rem;
    color: #888;
}

.vote-total i {
    color: var(--accent);
    margin-right: 0.25rem;
}

.vote-bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.vote-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-image: var(--vote-avatar-bg, url('../../images/default_avatar.svg'));
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.vote-bar-wrapper {
    flex: 1;
}

.vote-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    margin-bottom: 0.5rem;
}

.vote-bar-fill {
    height: 100%;
    transition: width 0.5s ease;
    position: relative;
}

.vote-bar-fill.p1 { background: linear-gradient(90deg, #cf0000, #ff4444); }
.vote-bar-fill.p2 { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

.vote-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.vote-bar-labels .name {
    color: #888;
}

.vote-bar-labels .percent {
    font-weight: 700;
    color: #fff;
}

.vote-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #22c55e;
    font-weight: 600;
}

/* Desktop improvements for vote display */
@media (min-width: 769px) {
    .vote-display {
        background: rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1.5rem;
    }
    
    .vote-bar-container {
        gap: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .vote-avatar {
        width: 56px;
        height: 56px;
        border-width: 3px;
    }
    
    .vote-bar {
        height: 16px;
        border-radius: 8px;
    }
    
    .vote-bar-labels {
        font-size: 0.9rem;
    }
}

/* Mobile responsive for vote display */
@media (max-width: 768px) {
    .vote-display {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .vote-display-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .vote-display-title {
        font-size: 0.75rem;
    }
    
    .vote-total {
        font-size: 0.75rem;
    }
    
    .vote-bar-container {
        gap: 0.75rem;
    }
    
    .vote-avatar {
        width: 40px;
        height: 40px;
    }
    
    .vote-bar {
        height: 12px;
    }
    
    .vote-bar-labels {
        font-size: 0.8rem;
    }
    
    .vote-bar-labels .name {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.vote-live-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* People's Champion Badge */
.peoples-champion-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    animation: pc-glow 2s ease-in-out infinite alternate;
}

@keyframes pc-glow {
    from { box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4); }
    to { box-shadow: 0 4px 25px rgba(251, 191, 36, 0.7); }
}

.peoples-champion-badge i {
    font-size: 1rem;
}

.peoples-champion-badge.declared {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
}

.peoples-champion-badge.tracking {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%);
    color: #fbbf24;
    animation: none;
}

.pc-tracking-info {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Live Viewer Counter */
.live-viewer-count {
    position: absolute;
    bottom: 120px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    z-index: 20;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.viewer-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-live 2s infinite;
}

.viewer-number {
    color: #22c55e;
}

.viewer-label {
    color: #888;
    font-size: 0.8rem;
}

/* Reminder Button Styles */
.reminder-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.reminder-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.2));
}

.reminder-btn.active {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    border-color: rgba(76, 175, 80, 0.4);
    color: #4caf50;
}

@media (max-width: 850px) {
    .fight-card { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
    .fighter.p1, .fighter.p2 { align-items: center; text-align: center; }
    .fighter.p1 .fighter-img { border-right: none; border-bottom: 4px solid var(--accent); }
    .fighter.p2 .fighter-img { border-left: none; border-bottom: 4px solid #3b82f6; }
    .vs-middle { order: -1; margin-bottom: 1rem; }
    .vs-text { font-size: 3rem; }
    .action-deck { flex-direction: column; gap: 1rem; text-align: center; }
    .discussion-area { grid-template-columns: 1fr; }
    .prediction-options { grid-template-columns: 1fr; }
}
    </style>
/* ========================================
   CSS CUSTOM PROPERTIES FOR CSP COMPLIANCE
   These use inline CSS variables for dynamic values
======================================== */

/* Fighter images with CSS variables */
.fighter-img[data-has-avatar="true"] { 
    background: transparent;
    border: 2px solid rgba(255,255,255,0.2);
    overflow: hidden;
}

.fighter-img[data-has-avatar="true"] .fighter-avatar-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: skew(2deg) scale(1.15);
    transform-origin: center;
}

.fighter-img[data-has-avatar="false"] {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 2px solid rgba(255,255,255,0.1);
}

/* Prediction avatars */
.prediction-avatar {
    background-image: var(--prediction-avatar-bg, url('../../images/default_avatar.svg'));
}

/* Prediction bars with dynamic widths */
.prediction-bar-fill.p1 { width: var(--p1-pred-width, 50%); }
.prediction-bar-fill.p2 { width: var(--p2-pred-width, 50%); }

/* Vote avatars */
.vote-avatar {
    background-image: var(--vote-avatar-bg, url('../../images/default_avatar.svg'));
}

/* Vote bars with dynamic widths - set via inline style */
.vote-bar-fill.p1,
.vote-bar-fill.p2 { transition: width 0.5s ease; }

/* Stream avatars */
.stream-avatar {
    background-image: var(--stream-avatar-bg, url('../../images/default_avatar.svg'));
}

/* Chat avatars */
.chat-avatar {
    background-image: var(--chat-avatar-bg, url('../../images/default_avatar.svg'));
}

/* ==============================================
   TOAST NOTIFICATION STYLES
   ============================================== */

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: #121215;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: slideInRight 0.3s ease;
    pointer-events: auto;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-color: #22c55e;
}

.toast.error {
    border-color: #cf0000;
}

.toast.info {
    border-color: #3b82f6;
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #22c55e;
}

.toast.error .toast-icon {
    color: #cf0000;
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast-message {
    flex: 1;
    font-weight: 500;
    color: #fff;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

/* ==============================================
   ALERT BOX STYLES (for vote messages)
   ============================================== */

.alert-box {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 16px 24px;
    border-radius: 12px;
    min-width: 300px;
    max-width: 600px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    animation: slideInDown 0.4s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

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

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* ==============================================
   VOTING PERIOD STYLES
   ============================================== */

.vote-live-indicator.voting-period {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

.voting-countdown {
    text-align: center;
    padding: 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.voting-countdown-text {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 4px;
}

.voting-countdown-time {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3b82f6;
}

/* ==============================================
   VIDEO OVERLAY TOGGLE (Single Button)
   ============================================== */

.media-player-shell {
    position: relative;
    transition: all 0.3s ease;
}

/* Single toggle button - top right */
.video-overlay-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

.video-overlay-toggle-btn:hover {
    background: rgba(207, 0, 0, 0.8);
    border-color: var(--accent);
}

/* Overlay transitions */
.simulive-info,
.simulive-badge,
.replay-badge,
.video-unmute-overlay {
    transition: opacity 0.3s ease;
}

/* Navbar auto-hide on mobile when watching video */
@media (max-width: 768px) {
    .navbar.video-watching {
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    
    .navbar {
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    
    /* Portrait fixes */
    @media (orientation: portrait) {
        .stage-container {
            padding: 0 0.75rem; /* Slightly reduce side padding */
            overflow-x: hidden; /* Prevent horizontal scroll */
        }
        
        .media-player-shell {
            width: 100%;
            max-width: 100%;
            /* Fixed height for mobile portrait to fit countdown */
            height: 480px;
            aspect-ratio: auto;
        }
        
        .simulive-player,
        .video-container,
        .simulive-countdown-overlay {
            width: 100%;
            max-width: 100%;
        }
        
        .simulive-info {
            padding: 1rem;
        }
        
        .simulive-badge,
        .replay-badge {
            top: 50px;
            left: 10px;
            font-size: 0.7rem;
            padding: 0.4rem 0.75rem;
        }
        
        .video-unmute-overlay {
            bottom: 60px;
        }
        
        /* Simulive countdown overlay - ensure it fits */
        .simulive-countdown-overlay {
            padding: 1rem;
            overflow-y: auto; /* Allow scroll if content is too tall */
            justify-content: flex-start;
            padding-top: 3rem;
        }
        
        .countdown-timer-large {
            gap: 0.5rem;
            flex-wrap: wrap;
        }
        
        .countdown-badge {
            margin-bottom: 1rem;
            font-size: 0.75rem;
            padding: 0.5rem 1rem;
        }
        
        /* Upcoming battle countdown timer - mobile fix */
        .countdown-timer {
            gap: 0.5rem;
            flex-wrap: wrap;
            justify-content: center;
        }
        
        .countdown-unit {
            padding: 0.6rem 0.75rem;
            min-width: 55px;
        }
        
        .countdown-unit span {
            font-size: 1.5rem;
        }
        
        .countdown-unit label {
            font-size: 0.6rem;
        }
        
        /* Voting countdown - ensure it doesn't overflow */
        .voting-countdown {
            padding: 10px;
            margin-left: 0.5rem;
            margin-right: 0.5rem;
        }
        
        .voting-countdown-time {
            font-size: 1rem;
        }
    }
}
