/* ============================================
   MONA LIVE MATCHES - Professional Dark Theme
   Inspired by Hesgoal & Monaflix
   ============================================ */

/* --- IMPORTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* --- CSS VARIABLES --- */
:root {
    --bg-primary: #0b0e14;
    --bg-secondary: #111827;
    --bg-card: #1a1f2e;
    --bg-card-hover: #222838;
    --bg-surface: #151a26;
    --border-color: #2a3142;
    --border-accent: #6c5ce7;
    --border-live: #ff4757;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-purple: #6c5ce7;
    --accent-blue: #4f8cff;
    --accent-gradient: linear-gradient(135deg, #6c5ce7 0%, #4f8cff 100%);
    --live-red: #ff4757;
    --live-glow: rgba(255, 71, 87, 0.3);
    --success-green: #2ed573;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- BASE RESET --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- CONTAINER --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* --- HEADER / NAVBAR --- */
.header {
    background: linear-gradient(135deg, #0d1117 0%, #111827 50%, #0d1117 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 18px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.header h1 {
    font-size: 1.5em;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.header p {
    color: var(--text-muted);
    font-size: 0.78em;
    margin-top: 4px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- SITE NAVIGATION --- */
.site-nav {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.nav-link {
    padding: 10px 22px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88em;
    border-radius: var(--radius-md);
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* --- VIEW TOGGLE BUTTONS --- */
.view-toggles {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: var(--bg-secondary);
    padding: 5px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.view-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9em;
    transition: var(--transition);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.view-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.view-btn.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.35);
}

/* --- FILTERS --- */
.filters {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.88em;
    background: linear-gradient(135deg, #111827, #0d1117);
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12), 0 4px 12px rgba(108, 92, 231, 0.08);
}

.filter-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* --- STATS BAR --- */
.stats {
    padding: 12px 0;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 0 30px;
}

.stat-value {
    font-size: 1.6em;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- SPORT CATEGORY BUTTONS --- */
.sport-categories {
    display: flex;
    gap: 8px;
    padding: 16px 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
.sport-categories::-webkit-scrollbar { display: none; }

.sport-cat-btn {
    flex-shrink: 0;
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}
.sport-cat-btn:hover {
    border-color: var(--accent-purple);
    color: var(--text-primary);
    background: var(--bg-card);
}
.sport-cat-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.35);
}

/* --- MATCH STATUS FILTERS (Live / Upcoming / All) --- */
.match-filters {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: linear-gradient(135deg, #111827, #0d1117);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.match-filter-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
    position: relative;
}
.match-filter-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}
.match-filter-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.match-filter-btn.active[data-filter="live"] {
    background: rgba(255, 71, 87, 0.12);
    color: var(--live-red);
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.1);
}
.match-filter-btn.active[data-filter="upcoming"] {
    background: rgba(79, 140, 255, 0.12);
    color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(79, 140, 255, 0.1);
}

/* --- LEAGUE SECTION GROUPING --- */
.league-section {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #1a1a3e;
    background: #0a0a1a;
}
.league-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #111130 0%, #0d0d25 100%);
    border-bottom: 1px solid #1a1a3e;
}
.league-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.league-header-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
}
.league-header-name {
    font-weight: 700;
    font-size: 0.95em;
    color: var(--text-primary);
}
.league-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.league-match-count {
    font-size: 0.78em;
    color: var(--text-muted);
    font-weight: 500;
    background: var(--bg-card);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}
.league-matches {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #0d0d20;
}
.league-matches .match-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    margin: 0;
}

/* --- CHANNEL GROUPING --- */
.channels-total-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #0d1a0d 0%, #0a0a1a 100%);
    border: 1px solid #1a3e1a;
    border-radius: 10px;
    color: #2ed573;
    font-weight: 700;
    font-size: 0.95em;
    margin-bottom: 16px;
}
.channels-total-dot {
    width: 10px;
    height: 10px;
    background: #2ed573;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(46, 213, 115, 0.6);
    animation: serverPulse 2s ease-in-out infinite;
}
.channel-group {
    margin-bottom: 20px;
}
.channel-group-header {
    font-size: 0.9em;
    font-weight: 800;
    color: #8b7ff0;
    padding: 10px 14px;
    background: linear-gradient(135deg, #111130 0%, #0d0d25 100%);
    border: 1px solid #1a1a3e;
    border-radius: 10px;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}
.channel-group-header::before {
    content: '📡';
    font-size: 1.1em;
}

/* --- UPCOMING BADGE --- */
.upcoming-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(79, 140, 255, 0.15);
    color: var(--accent-blue);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* --- LIVE PULSE ANIMATION --- */
.live-pulse {
    color: var(--live-red) !important;
    background: none !important;
    -webkit-text-fill-color: var(--live-red) !important;
    animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* --- EVENTS / MATCH CARDS CONTAINER --- */
.events {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- MATCH CARD - Hesgoal Style --- */
.match-card {
    background: #0a0a1a;
    border: 2px solid #1a1a3e;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

.match-card:hover {
    border-color: #4a3aad;
    box-shadow: 0 6px 25px rgba(74, 58, 173, 0.3);
    transform: translateY(-2px);
}

.match-card.match-live {
    border-color: #ff4757;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.25), 0 0 40px rgba(255, 71, 87, 0.1);
    animation: liveGlow 2s ease-in-out infinite;
}

@keyframes liveGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 71, 87, 0.25), 0 0 40px rgba(255, 71, 87, 0.1); }
    50% { box-shadow: 0 0 30px rgba(255, 71, 87, 0.4), 0 0 60px rgba(255, 71, 87, 0.15); }
}

/* Match League Bar */
.match-league-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid #1a1a3e;
}

.league-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 3px;
}

.league-name {
    color: #8888aa;
    font-size: 0.78em;
    font-weight: 600;
    flex: 1;
}

.sport-tag {
    padding: 2px 10px;
    background: rgba(108, 92, 231, 0.12);
    color: #8b7ff0;
    border-radius: 50px;
    font-size: 0.68em;
    font-weight: 600;
}

/* Match Body - Teams & Score */
.match-body {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    gap: 12px;
    min-height: 90px;
    background: #0a0a1a;
}

.match-team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.match-team.home-team {
    justify-content: flex-end;
    text-align: right;
}

.match-team.away-team {
    justify-content: flex-start;
    text-align: left;
}

.team-crest {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

.match-card:hover .team-crest {
    transform: scale(1.08);
}

.match-body .team-name {
    font-size: 1em;
    font-weight: 700;
    color: #e8e8f0;
    line-height: 1.25;
}

/* Score Center */
.match-score-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    flex-shrink: 0;
    padding: 0 8px;
}

.live-label {
    color: #ff4757;
    font-size: 0.75em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: livePulse 1.5s ease-in-out infinite;
}

.live-minute {
    color: #ff4757;
    font-size: 1.1em;
    font-weight: 800;
    background: rgba(255, 71, 87, 0.1);
    padding: 2px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.live-score {
    font-size: 1.6em;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(108, 92, 231, 0.5);
}

.match-score-center .match-time {
    font-size: 0.95em;
    font-weight: 700;
    color: #6c5ce7;
}

.match-score-center .match-date {
    font-size: 0.7em;
    color: #666;
    font-weight: 500;
}

/* Server Buttons */
.match-servers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid #1a1a3e;
    background: rgba(255,255,255,0.02);
}

.match-servers .channel-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #12122a, #181840);
    border: 1px solid #2a2a5e;
    border-radius: 50px;
    color: #ccccee;
    font-weight: 700;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.server-dot {
    width: 6px;
    height: 6px;
    background: #2ed573;
    border-radius: 50%;
    display: inline-block;
    animation: serverPulse 2s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(46, 213, 115, 0.5);
}

@keyframes serverPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(46, 213, 115, 0.5); }
    50% { opacity: 0.4; box-shadow: 0 0 2px rgba(46, 213, 115, 0.2); }
}

.match-servers .channel-link:hover {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.match-servers .channel-link:hover .server-dot {
    background: white;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.match-servers .channel-link.active {
    background: linear-gradient(135deg, #6c5ce7 0%, #4f8cff 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

/* Live badge small for league headers */
.live-badge-sm {
    padding: 3px 10px;
    background: #ff4757;
    color: white;
    border-radius: 50px;
    font-size: 0.7em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: livePulse 2s ease-in-out infinite;
}

/* --- BADGES --- */
.live-badge {
    padding: 3px 10px;
    background: var(--live-red);
    color: white;
    border-radius: 50px;
    font-size: 0.7em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: livePulse 2s ease-in-out infinite;
    position: relative;
}

.live-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    margin-right: 4px;
    animation: liveDot 1s ease-in-out infinite;
}

.sport-badge {
    padding: 3px 10px;
    background: rgba(108, 92, 231, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 50px;
    font-size: 0.7em;
    font-weight: 600;
}

.time-badge, .date-badge {
    padding: 3px 10px;
    background: rgba(79, 140, 255, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(79, 140, 255, 0.2);
    border-radius: 50px;
    font-size: 0.7em;
    font-weight: 600;
}


/* --- CHANNELS GRID (TV Channels View) --- */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.channel-big {
    height: 72px;
    font-weight: 700;
    font-size: 0.88em;
    text-align: left;
    background: #0a0a1a;
    border: 1px solid #1a1a3e;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #e0e0f0;
    font-family: inherit;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.channel-big::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #2ed573;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(46, 213, 115, 0.6);
    animation: serverPulse 2s ease-in-out infinite;
}

.channel-big::after {
    content: '▶';
    position: absolute;
    right: 16px;
    font-size: 0.7em;
    color: #4a4a6a;
    transition: all 0.3s ease;
}

.channel-big:hover {
    border-color: #6c5ce7;
    background: linear-gradient(135deg, #12122e 0%, #1a1040 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(108, 92, 231, 0.25);
}

.channel-big:hover::after {
    color: #6c5ce7;
    right: 14px;
}

.channel-big:hover::before {
    background: #6c5ce7;
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.6);
}

.channel-big.active {
    border-color: #6c5ce7;
    background: linear-gradient(135deg, #6c5ce7 0%, #4f8cff 100%);
    color: white;
}

.channel-big.active::before {
    background: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.channel-big.active::after {
    color: rgba(255,255,255,0.7);
}

/* --- PLAYER SECTION --- */
.player-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 80px rgba(108, 92, 231, 0.08);
}

.player-header {
    background: linear-gradient(135deg, #111827 0%, #0d1117 100%);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.live-dot-player {
    width: 8px;
    height: 8px;
    background: var(--live-red);
    border-radius: 50%;
    flex-shrink: 0;
    animation: livePulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255, 71, 87, 0.6);
}

.now-playing-label {
    color: var(--live-red);
    font-weight: 800;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    flex-shrink: 0;
}

.current-channel-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.stream-info {
    color: var(--text-muted);
    font-size: 0.75em;
    font-weight: 500;
}

.close-player-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 71, 87, 0.1);
    color: var(--live-red);
    border: 1px solid rgba(255, 71, 87, 0.2);
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9em;
    transition: var(--transition);
    font-family: inherit;
}

.close-player-btn:hover {
    background: var(--live-red);
    color: white;
    transform: scale(1.1);
}

.player-wrapper {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    border-bottom: 1px solid var(--border-color);
}

.main-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 1;
}

/* --- PLAYER OVERLAY --- */
.player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.player-overlay-content {
    text-align: center;
    padding: 40px 30px;
    max-width: 420px;
}

.overlay-icon {
    font-size: 52px;
    margin-bottom: 16px;
    animation: pulse-icon 2s ease-in-out infinite;
}

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

.player-overlay h3 {
    color: #fff;
    font-size: 1.2em;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.player-overlay p {
    color: #999;
    font-size: 0.85em;
    margin: 0 0 20px 0;
    line-height: 1.6;
}
    line-height: 1.5;
}

.overlay-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.overlay-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.85em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.overlay-btn-primary {
    background: linear-gradient(135deg, #6c5ce7 0%, #4f8cff 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.35);
}

.overlay-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.5);
}

.overlay-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.overlay-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.overlay-hint {
    color: #555 !important;
    font-size: 0.72em !important;
    margin: 0 !important;
    font-style: italic;
}

/* --- PLAYER BOTTOM BAR --- */
.player-bottom-bar {
    padding: 12px 16px;
    background: linear-gradient(135deg, #111827 0%, #0d1117 100%);
    border-top: 1px solid var(--border-color);
}

/* --- SOCIAL BUTTONS --- */
.social-buttons-container {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.social-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.78em;
    text-decoration: none;
    color: white;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.social-button.telegram-button {
    background: linear-gradient(135deg, #2AABEE, #1d96d1);
}

.social-button.telegram-button:hover {
    background: linear-gradient(135deg, #34b8fb, #2AABEE);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(42, 171, 238, 0.3);
}

.social-button.whatsapp-button {
    background: linear-gradient(135deg, #25D366, #1eba57);
}

.social-button.whatsapp-button:hover {
    background: linear-gradient(135deg, #2ee670, #25D366);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

/* --- CHAT --- */
.chat-container {
    margin-top: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.chat-iframe {
    width: 100%;
    height: 220px;
    border: none;
}

/* --- LOADING & EMPTY STATES --- */
.loading {
    text-align: center;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #1a1a3e;
    border-top: 4px solid #6c5ce7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: #e0e0f0;
    font-size: 1em;
    font-weight: 600;
}

.loading-sub {
    color: #555;
    font-size: 0.82em;
    font-weight: 500;
    animation: loadingDots 1.5s ease-in-out infinite;
}

@keyframes loadingDots {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1em;
    font-weight: 500;
}

.no-results::before {
    content: '🔍';
    display: block;
    font-size: 2em;
    margin-bottom: 10px;
}

/* --- ANIMATIONS --- */
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes liveDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

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

.match-card {
    animation: fadeInUp 0.4s ease-out backwards;
}

/* Stagger animation */
.match-card:nth-child(1) { animation-delay: 0s; }
.match-card:nth-child(2) { animation-delay: 0.05s; }
.match-card:nth-child(3) { animation-delay: 0.1s; }
.match-card:nth-child(4) { animation-delay: 0.15s; }
.match-card:nth-child(5) { animation-delay: 0.2s; }

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* --- SCORE FINAL (Finished matches) --- */
.score-final-label {
    font-size: 0.72em;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.score-final {
    font-size: 1.4em;
    font-weight: 900;
    color: var(--text-secondary);
    letter-spacing: 2px;
}
.score-halftime {
    font-size: 0.68em;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- STANDINGS TABLE --- */
.standings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.standings-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #111130 0%, #0d0d25 100%);
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 1em;
    color: var(--text-primary);
}
.standings-league-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
}
.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}
.standings-table thead {
    background: rgba(255,255,255,0.03);
}
.standings-table th {
    padding: 10px 8px;
    text-align: center;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}
.standings-table th.st-team {
    text-align: left;
    padding-left: 12px;
}
.standings-table td {
    padding: 10px 8px;
    text-align: center;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.st-row:hover {
    background: rgba(108, 92, 231, 0.06);
}
.st-row.st-top td:first-child {
    border-left: 3px solid var(--accent-purple);
}
.st-row.st-bottom td:first-child {
    border-left: 3px solid var(--live-red);
}
td.st-pos {
    font-weight: 800;
    color: var(--text-primary);
    width: 36px;
}
td.st-team {
    text-align: left;
    padding-left: 12px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.st-badge {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}
td.st-pts {
    font-weight: 900;
    color: var(--text-primary);
    font-size: 1.05em;
}
.standings-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75em;
    padding: 12px;
    font-style: italic;
}

/* --- FEATURED LEAGUE BUTTONS --- */
.featured-leagues {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.featured-leagues::-webkit-scrollbar { display: none; }

.featured-league-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.82em;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}
.featured-league-btn:hover {
    border-color: var(--accent-purple);
    color: var(--text-primary);
    background: var(--bg-card);
}
.featured-league-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.35);
}
.fl-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 3px;
}

/* --- STANDINGS INFO BOX --- */
.standings-info {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9em;
}
.standings-info p {
    margin: 6px 0;
}

/* --- TEAM GRID --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.team-card-mini {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
    transition: var(--transition);
}
.team-card-mini:hover {
    border-color: var(--accent-purple);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.15);
}
.team-card-badge {
    width: 42px;
    height: 42px;
    object-fit: contain;
    margin-bottom: 8px;
}
.team-card-name {
    font-weight: 700;
    font-size: 0.82em;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.team-card-next {
    font-size: 0.7em;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- FIXTURE LIST (No Standings Available) --- */
.fixture-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 165, 2, 0.08);
    border: 1px solid rgba(255, 165, 2, 0.2);
    border-radius: 10px;
    color: #ffa502;
    font-size: 0.85em;
    margin: 12px 0;
}
.fixture-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0;
}
.fixture-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82em;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 0 4px;
}
.fixture-section-title .live-pulse {
    width: 8px;
    height: 8px;
    background: #ff4757;
    border-radius: 50%;
    animation: pulse-dot 1.4s infinite;
}
.fixture-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.2s ease;
}
.fixture-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(108, 92, 231, 0.2);
}
.fixture-row.fixture-live {
    border-color: rgba(255, 71, 87, 0.3);
    background: rgba(255, 71, 87, 0.05);
}
.fixture-team {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.fixture-team.fixture-home {
    justify-content: flex-end;
    text-align: right;
}
.fixture-team.fixture-away {
    justify-content: flex-start;
    text-align: left;
}
.fixture-team-name {
    font-size: 0.88em;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fixture-badge {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}
.fixture-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 70px;
    flex-shrink: 0;
}
.fixture-score-num {
    font-size: 1.1em;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
}
.fixture-vs {
    font-size: 0.95em;
    font-weight: 800;
    color: var(--accent-purple);
    letter-spacing: 1px;
}
.fixture-status {
    font-size: 0.65em;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.fixture-status.live {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
    animation: pulse-dot 1.4s infinite alternate;
}
.fixture-status.upcoming {
    background: rgba(108, 92, 231, 0.15);
    color: var(--accent-purple);
}
.fl-indicator {
    font-size: 0.75em;
    margin-left: 2px;
}

.st-badge-count {
    margin-left: auto;
    background: rgba(108, 92, 231, 0.15);
    color: var(--accent-purple);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75em;
    font-weight: 700;
}

/* --- PERFORMANCE BARS --- */
.st-perf {
    min-width: 120px;
}
.perf-bar {
    display: inline-block;
    width: 70px;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
    vertical-align: middle;
}
.perf-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}
.perf-label {
    font-size: 0.75em;
    color: var(--text-muted);
    margin-left: 6px;
    font-weight: 600;
}

/* --- RESPONSIVE - TABLET --- */
@media (max-width: 900px) {
    .container { padding: 0 12px 30px; }
    .match-body { padding: 16px; gap: 8px; }
    .team-crest { width: 38px; height: 38px; }
    .match-body .team-name { font-size: 0.88em; }
    .match-score-center { min-width: 65px; }
}

/* --- RESPONSIVE - MOBILE --- */
@media (max-width: 640px) {
    .header h1 { font-size: 1.3em; }
    .header p { font-size: 0.75em; }

    .view-toggles { gap: 4px; }
    .view-btn { padding: 10px 12px; font-size: 0.82em; }

    .filter-row { flex-direction: column; gap: 10px; }
    .filter-group { min-width: 100%; }

    .match-body {
        padding: 14px 12px;
        gap: 6px;
    }

    .team-crest { width: 32px; height: 32px; }
    .match-body .team-name { font-size: 0.8em; }
    .match-score-center { min-width: 55px; }
    .match-score-center .match-time { font-size: 0.82em; }
    .live-minute { font-size: 0.95em; padding: 2px 8px; }

    .match-servers { gap: 6px; padding: 8px 12px; }
    .match-servers .channel-link { padding: 7px 12px; font-size: 0.78em; }

    .channels-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
    .channel-big { height: 56px; font-size: 0.8em; }

    .sport-tag { font-size: 0.6em; padding: 2px 6px; }

    .sport-cat-btn { padding: 8px 14px; font-size: 0.8em; }
    .match-filter-btn { padding: 8px 10px; font-size: 0.8em; }
    .league-header { padding: 10px 12px; }
    .league-header-name { font-size: 0.85em; }

    .site-nav { gap: 2px; padding: 6px 8px; }
    .nav-link { padding: 8px 12px; font-size: 0.8em; }

    .st-hide-mobile { display: none; }
    .standings-table { font-size: 0.78em; }
    td.st-team { gap: 5px; }
    .st-badge { width: 18px; height: 18px; }
    .team-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
    .team-card-badge { width: 32px; height: 32px; }
    .team-card-name { font-size: 0.75em; }

    .fixture-row { padding: 10px 10px; gap: 6px; }
    .fixture-team-name { font-size: 0.75em; }
    .fixture-badge { width: 22px; height: 22px; }
    .fixture-score { min-width: 50px; }
    .fixture-score-num { font-size: 0.95em; }
    .fixture-vs { font-size: 0.85em; }
    .fixture-notice { font-size: 0.78em; padding: 10px 12px; }
}

/* ===== LIVE CHAT ROOM ===== */
.chat-section {
    margin-top: 0;
    border-radius: 0 0 16px 16px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
    overflow: hidden;
}
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(108, 92, 231, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
}
.chat-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-icon {
    font-size: 1.1em;
}
.chat-title {
    font-weight: 700;
    font-size: 0.9em;
    color: var(--text-primary);
}
.chat-online {
    font-size: 0.72em;
    font-weight: 600;
    color: #2ed573;
    background: rgba(46, 213, 115, 0.1);
    padding: 3px 10px;
    border-radius: 50px;
}
.chat-toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 4px 8px;
}
.chat-toggle-btn.collapsed {
    transform: rotate(-90deg);
}
.chat-body {
    display: flex;
    flex-direction: column;
    max-height: 350px;
    transition: max-height 0.3s ease;
    overflow: hidden;
}
.chat-body.collapsed {
    max-height: 0;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    min-height: 200px;
    max-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar {
    width: 4px;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.3);
    border-radius: 4px;
}
.chat-welcome {
    text-align: center;
    padding: 20px 16px;
    color: var(--text-muted);
    font-size: 0.82em;
}
.chat-welcome-icon {
    font-size: 2em;
    display: block;
    margin-bottom: 8px;
}

/* Chat Messages */
.chat-msg {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    animation: chatFadeIn 0.3s ease;
}
@keyframes chatFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
}
.chat-msg-body {
    flex: 1;
    min-width: 0;
}
.chat-msg-name {
    font-size: 0.78em;
    font-weight: 700;
    margin-bottom: 2px;
}
.chat-msg-time {
    font-size: 0.65em;
    color: var(--text-muted);
    margin-left: 6px;
    font-weight: 400;
}
.chat-msg-text {
    font-size: 0.84em;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}
.chat-msg-system {
    text-align: center;
    font-size: 0.75em;
    color: var(--text-muted);
    padding: 4px 0;
    font-style: italic;
}

/* Chat Input Area */
.chat-input-area {
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
}
.chat-nickname-bar,
.chat-send-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-nickname-input,
.chat-message-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.85em;
    outline: none;
    transition: border-color 0.2s ease;
}
.chat-nickname-input:focus,
.chat-message-input:focus {
    border-color: var(--accent-purple);
}
.chat-nickname-input::placeholder,
.chat-message-input::placeholder {
    color: var(--text-muted);
}
.chat-join-btn,
.chat-send-btn {
    background: var(--accent-purple);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.82em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.chat-join-btn:hover,
.chat-send-btn:hover {
    background: #5a4fcf;
    transform: translateY(-1px);
}
.chat-user-tag {
    font-size: 0.75em;
    font-weight: 700;
    color: var(--accent-purple);
    background: rgba(108, 92, 231, 0.12);
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
}

/* Chat Mobile */
@media (max-width: 640px) {
    .chat-messages {
        min-height: 150px;
        max-height: 220px;
        padding: 10px;
    }
    .chat-msg-avatar { width: 24px; height: 24px; font-size: 0.65em; }
    .chat-msg-name { font-size: 0.72em; }
    .chat-msg-text { font-size: 0.78em; }
    .chat-nickname-input,
    .chat-message-input { padding: 8px 10px; font-size: 0.8em; }
    .chat-join-btn,
    .chat-send-btn { padding: 8px 14px; font-size: 0.78em; }
    .chat-user-tag { font-size: 0.68em; padding: 4px 8px; }
}