/**
 * Mafia Legend - TV Styles v8.1.0
 * استایل‌های تلویزیون - پخش زنده مافیا
 */

/* ============================================
   فونت فارسی
   ============================================ */
@font-face {
    font-family: 'iran';
    src: url('../fonts/iran.woff2') format('woff2'),
         url('../fonts/iran.woff') format('woff'),
         url('../fonts/iran.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'iran';
    src: url('../fonts/iran.woff2') format('woff2'),
         url('../fonts/iran.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   ریست و استایل‌های پایه
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'iran', 'Tahoma', sans-serif;
    background: #0a0c15;
    color: #fff;
    overflow: hidden;
    direction: rtl;
}

#mafia-tv-root {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ============================================
   کانتینر اصلی
   ============================================ */
.tv-container {
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at 30% 40%, #0f1a2f 0%, #03050b 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* ============================================
   افکت پس‌زمینه
   ============================================ */
.tv-bg-effect {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.tv-bg-effect::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at 30% 40%, rgba(212, 175, 55, 0.08) 0%, transparent 50%);
    animation: bgPulse 8s ease-in-out infinite;
}

.tv-bg-effect::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(0, 245, 196, 0.05) 60deg, transparent 120deg);
    animation: bgRotate 20s linear infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes bgRotate {
    100% { transform: rotate(360deg); }
}

/* ============================================
   هدر
   ============================================ */
.tv-header {
    position: relative;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(10, 15, 25, 0.95), transparent);
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(10px);
}

.tv-header h2 {
    color: #f1c40f;
    font-size: 22px;
    text-shadow: 0 0 20px rgba(241, 196, 15, 0.5);
    letter-spacing: 3px;
    font-family: 'Orbitron', monospace;
}

.tv-live-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 6px 20px;
    border-radius: 40px;
    border: 2px solid #ff4d6d;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.4);
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #ff4d6d;
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
    box-shadow: 0 0 10px #ff4d6d;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* ============================================
   بخش بالایی (40% ارتفاع) - سه ستون
   ============================================ */
.tv-top-section {
    position: relative;
    z-index: 10;
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    gap: 25px;
}

/* ============================================
   کارت سخنران (چپ)
   ============================================ */
.tv-speaker-card {
    flex: 1;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(15, 15, 26, 0.98));
    backdrop-filter: blur(20px);
    border-radius: 35px;
    padding: 20px;
    text-align: center;
    border: 2px solid rgba(241, 196, 15, 0.5);
    box-shadow: 0 0 40px rgba(241, 196, 15, 0.2);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tv-speaker-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(241, 196, 15, 0.15) 0%, transparent 70%);
    animation: cardGlow 4s ease-in-out infinite;
}

@keyframes cardGlow {
    0%, 100% { opacity: 0.3; transform: translate(0, 0); }
    50% { opacity: 0.7; transform: translate(5%, 5%); }
}

.tv-speaker-avatar-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 12px;
}

.tv-speaker-timer-ring {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 122px;
    height: 122px;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 8px rgba(0, 245, 196, 0.5));
}

.tv-speaker-timer-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.tv-speaker-timer-ring-fill {
    fill: none;
    stroke: #00f5c4;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s linear;
}

.tv-speaker-timer-ring-fill.urgent {
    stroke: #ff4757;
    filter: drop-shadow(0 0 8px #ff4757);
}

.tv-speaker-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(241, 196, 15, 0.6);
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.3);
}

.tv-speaker-timer-text {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    padding: 3px 10px;
    border-radius: 30px;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: bold;
    color: #00f5c4;
    white-space: nowrap;
    border: 1px solid rgba(0, 245, 196, 0.3);
}

.tv-speaker-timer-text.urgent {
    color: #ff4757;
    border-color: #ff4757;
    animation: timerPulse 0.5s infinite;
}

@keyframes timerPulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.08); }
}

.tv-speaker-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #fff;
}

.tv-speaker-seat {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 8px;
}

.tv-speaker-status {
    display: inline-block;
    padding: 4px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    background: linear-gradient(135deg, rgba(0, 245, 196, 0.2), rgba(0, 245, 196, 0.05));
    border: 1px solid rgba(0, 245, 196, 0.4);
    color: #00f5c4;
}

.tv-speaker-challenges {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.challenge-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.challenge-dot.available {
    background: #f1c40f;
    box-shadow: 0 0 8px #f1c40f;
}

.challenge-dot.used {
    background: rgba(255, 71, 87, 0.5);
}

/* ============================================
   کرنومتر بزرگ (وسط)
   ============================================ */
.tv-middle-timer {
    flex: 0.8;
    background: linear-gradient(145deg, rgba(20, 20, 40, 0.95), rgba(10, 10, 25, 0.98));
    backdrop-filter: blur(20px);
    border-radius: 40px;
    padding: 20px;
    text-align: center;
    border: 2px solid rgba(241, 196, 15, 0.5);
    box-shadow: 0 0 50px rgba(241, 196, 15, 0.25);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tv-middle-timer-title {
    font-size: 14px;
    color: #888;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.tv-middle-timer-value {
    font-family: 'Orbitron', monospace;
    font-size: 64px;
    font-weight: 900;
    color: #f1c40f;
    text-shadow: 0 0 30px rgba(241, 196, 15, 0.6);
    letter-spacing: 5px;
}

.tv-middle-timer-value.urgent {
    color: #ff4757;
    text-shadow: 0 0 30px rgba(255, 71, 87, 0.6);
    animation: middleTimerPulse 0.5s infinite;
}

@keyframes middleTimerPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* ============================================
   کارت چالش بعدی (راست)
   ============================================ */
.tv-challenge-card {
    flex: 1;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(15, 15, 26, 0.98));
    backdrop-filter: blur(20px);
    border-radius: 35px;
    padding: 20px;
    text-align: center;
    border: 2px solid rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.15);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tv-challenge-card::before {
    content: '⚡';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 35px;
    opacity: 0.12;
    animation: challengeIcon 3s ease-in-out infinite;
}

@keyframes challengeIcon {
    0%, 100% { opacity: 0.1; transform: rotate(0deg); }
    50% { opacity: 0.2; transform: rotate(15deg); }
}

.tv-challenge-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #a855f7;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
    margin: 0 auto 12px;
}

.tv-challenge-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #fff;
}

.tv-challenge-seat {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 8px;
}

.tv-challenge-timing {
    display: inline-block;
    padding: 4px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(168, 85, 247, 0.05));
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #a855f7;
}

.tv-challenge-timing.before {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.2), rgba(255, 71, 87, 0.05));
    border-color: rgba(255, 71, 87, 0.4);
    color: #ff4757;
}

.tv-challenge-challenges {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.no-challenge {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

/* ============================================
   بخش پایینی (60% ارتفاع) - اسلایدر بازیکنان
   ============================================ */
.tv-bottom-section {
    position: relative;
    z-index: 10;
    height: 60vh;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
}

.tv-slider-container {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.tv-players-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    height: 100%;
    padding: 10px 5px;
    scroll-snap-type: x mandatory;
}

.tv-players-slider::-webkit-scrollbar {
    height: 6px;
}

.tv-players-slider::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.tv-players-slider::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #f1c40f, #e67e22);
    border-radius: 10px;
}

/* ============================================
   کارت بازیکن در اسلایدر
   ============================================ */
.tv-player-slide {
    flex: 0 0 180px;
    scroll-snap-align: start;
    background: linear-gradient(145deg, rgba(20, 25, 45, 0.9), rgba(10, 12, 26, 0.95));
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 20px 12px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tv-player-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s;
}

.tv-player-slide:hover {
    transform: translateY(-8px);
    border-color: rgba(241, 196, 15, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.tv-player-slide:hover::after {
    opacity: 1;
}

.tv-player-slide.active {
    border-color: #2ecc71;
    box-shadow: 0 0 45px rgba(46, 204, 113, 0.5);
    transform: scale(1.02);
    background: linear-gradient(145deg, rgba(46, 204, 113, 0.2), rgba(20, 25, 45, 0.95));
}

.tv-player-slide.dead {
    opacity: 0.3;
    filter: grayscale(0.8);
    transform: scale(0.98);
}

.tv-player-slide.spoken {
    border-color: #00f5c4;
    background: linear-gradient(145deg, rgba(0, 245, 196, 0.1), rgba(20, 25, 45, 0.95));
}

.tv-player-slide.silenced {
    border-color: #e67e22;
    background: linear-gradient(145deg, rgba(230, 126, 34, 0.1), rgba(20, 25, 45, 0.95));
}

.tv-player-slide img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(241, 196, 15, 0.5);
    margin: 0 auto 12px;
    display: block;
    box-shadow: 0 0 25px rgba(241, 196, 15, 0.25);
}

.tv-player-slide.active img {
    border-color: #2ecc71;
    box-shadow: 0 0 30px rgba(46, 204, 113, 0.5);
}

.tv-player-slide.spoken img {
    border-color: #00f5c4;
    box-shadow: 0 0 25px rgba(0, 245, 196, 0.4);
}

.tv-player-slide-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #fff;
}

.tv-player-slide-seat {
    font-size: 12px;
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.15);
    display: inline-block;
    padding: 3px 12px;
    border-radius: 30px;
    margin-bottom: 10px;
}

.tv-player-slide-challenges {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.tv-player-slide-status {
    font-size: 10px;
    margin-top: 8px;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
    font-weight: bold;
}

.tv-player-slide-status.speaking {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.4);
}

.tv-player-slide-status.spoken {
    background: rgba(0, 245, 196, 0.15);
    color: #00f5c4;
    border: 1px solid rgba(0, 245, 196, 0.3);
}

.tv-player-slide-status.dead {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.tv-player-slide-status.silenced {
    background: rgba(230, 126, 34, 0.15);
    color: #e67e22;
    border: 1px solid rgba(230, 126, 34, 0.3);
}

.tv-player-slide-bomb {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 20px;
    animation: bombBlink 1s infinite;
}

@keyframes bombBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* ============================================
   دکمه‌های اسکرول
   ============================================ */
.tv-slider-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.tv-slider-btn {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(241, 196, 15, 0.4);
    border-radius: 40px;
    padding: 8px 25px;
    color: #f1c40f;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'iran', sans-serif;
}

.tv-slider-btn:hover {
    background: rgba(241, 196, 15, 0.2);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.3);
}

/* ============================================
   استاتوس بار
   ============================================ */
.tv-status-bar {
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    padding: 8px 30px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: bold;
    border-top: 1px solid rgba(241, 196, 15, 0.25);
}

.tv-status-bar span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tv-status-bar span::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.tv-status-bar span:nth-child(1)::before {
    background: #2ecc71;
    box-shadow: 0 0 10px #2ecc71;
}

.tv-status-bar span:nth-child(2)::before {
    background: #ff4757;
    box-shadow: 0 0 10px #ff4757;
}

.tv-status-bar span:nth-child(3)::before {
    background: #00f5c4;
    box-shadow: 0 0 10px #00f5c4;
}

/* ============================================
   اورلی شب
   ============================================ */
.tv-night-overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: radial-gradient(circle at center, #0a0c1a 0%, #020408 100%);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.tv-night-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
}

.tv-night-icon {
    font-size: 100px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.tv-night-title {
    font-size: 48px;
    font-weight: bold;
    color: #f1c40f;
    text-shadow: 0 0 30px rgba(241, 196, 15, 0.5);
    margin-bottom: 10px;
}

.tv-night-subtitle {
    font-size: 24px;
    color: #aaa;
    margin-bottom: 40px;
}

/* ============================================
   مدیا پلیر شب
   ============================================ */
.tv-night-music-player {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(241, 196, 15, 0.3);
    backdrop-filter: blur(10px);
}

.music-player-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.music-cover {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    object-fit: cover;
    border: 2px solid rgba(241, 196, 15, 0.5);
}

.music-info {
    flex: 1;
    text-align: right;
}

.music-title {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
}

.music-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.music-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f1c40f, #e67e22);
    border-radius: 2px;
    transition: width 0.3s;
}

.music-play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(241, 196, 15, 0.2);
    border: 2px solid #f1c40f;
    color: #f1c40f;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-play-btn:hover {
    background: #f1c40f;
    color: #000;
    transform: scale(1.1);
}

/* ============================================
   اورلی رویدادها
   ============================================ */
.tv-event-overlay {
    position: absolute;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.tv-event-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
}

.tv-event-content img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #f1c40f;
    box-shadow: 0 0 50px rgba(241, 196, 15, 0.5);
    margin-bottom: 30px;
}

.tv-event-content h2 {
    font-size: 36px;
    color: #f1c40f;
    margin-bottom: 15px;
}

.tv-event-content p {
    font-size: 20px;
    color: #fff;
    line-height: 1.8;
}

.tv-event-next {
    margin-top: 30px;
    padding: 15px 40px;
    background: rgba(241, 196, 15, 0.2);
    border: 2px solid #f1c40f;
    border-radius: 40px;
    color: #f1c40f;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'iran', sans-serif;
}

.tv-event-next:hover {
    background: #f1c40f;
    color: #000;
    transform: scale(1.05);
}

/* ============================================
   رسپانسیو
   ============================================ */
@media (max-width: 1200px) {
    .tv-player-slide {
        flex: 0 0 160px;
    }
    
    .tv-player-slide img {
        width: 110px;
        height: 110px;
    }
    
    .tv-middle-timer-value {
        font-size: 48px;
    }
}

@media (max-width: 900px) {
    .tv-top-section {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    .tv-speaker-card,
    .tv-middle-timer,
    .tv-challenge-card {
        width: 100%;
    }
    
    .tv-bottom-section {
        height: 50vh;
    }
    
    .tv-player-slide {
        flex: 0 0 140px;
    }
    
    .tv-player-slide img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 600px) {
    .tv-header h2 {
        font-size: 16px;
    }
    
    .tv-live-badge {
        padding: 4px 12px;
        font-size: 12px;
    }
    
    .tv-player-slide {
        flex: 0 0 120px;
    }
    
    .tv-player-slide img {
        width: 80px;
        height: 80px;
    }
    
    .tv-night-title {
        font-size: 32px;
    }
    
    .tv-night-subtitle {
        font-size: 18px;
    }
}.ps.active .si{border-color:#2ecc71;box-shadow:0 0 25px rgba(46,204,113,0.4)}
.ps.active .si{
    border-color:#ffd700 !important;
    box-shadow:0 0 30px rgba(255,215,0,0.7), 0 0 60px rgba(255,215,0,0.3) !important;
    transform:scale(1.05);
    transition:all 0.3s ease;
    background:rgba(255,215,0,0.1) !important;
}
.ps.active .sn{color:#ffd700 !important; font-size:15px !important;}
.ps.active .ss{background:linear-gradient(135deg,#ffd700,#ff8c00) !important;}