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

:root {
  --mlbd-page:#06101d;--mlbd-card:#0c192b;--mlbd-card2:#101f35;
  --mlbd-soft:#142741;--mlbd-text:#f3f8ff;--mlbd-muted:#94a8c0;
  --mlbd-blue:#0b84ff;--mlbd-red:#ff2f3a;--mlbd-green:#22c55e;
  --mlbd-radius:14px;--mlbd-shadow:0 18px 45px rgba(0,0,0,.30),inset 0 1px 0 rgba(255,255,255,.045);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: linear-gradient(180deg,#07111f 0%,#060d18 100%); color: var(--mlbd-text); font-family: 'Inter', sans-serif; display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }

/* Fixed Topbar Design that was breaking */
.topbar { display: flex; justify-content: space-between; align-items: center; background: #0a1526; padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 25px rgba(0,0,0,0.5); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { background: linear-gradient(135deg, #0b84ff, #00d4ff); color: #fff; width: 35px; height: 35px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; box-shadow: 0 4px 10px rgba(11,132,255,0.3);}
.brand-title { font-family: 'Montserrat', sans-serif; font-size: 16px; font-weight: 900; color: #fff; line-height: 1.2; letter-spacing: 0.5px;}
.brand-sub { font-size: 11px; color: var(--mlbd-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 1px;}
.top-btn { display: flex; align-items: center; gap: 6px; background: rgba(11,132,255,0.1); color: #0b84ff; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-size: 12px; font-weight: 800; transition: 0.2s; border: 1px solid rgba(11,132,255,0.2);}
.top-btn:hover { background: #0b84ff; color: #fff; border-color: #0b84ff;}

/* Header & Notice Original Layout */
.header { background: #0a1526; padding: 18px 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.05); box-shadow: 0 4px 25px rgba(0,0,0,0.5); position: sticky; top: 0; z-index: 100; }
.header h1 { font-family: 'Montserrat', sans-serif; font-size: 22px; font-weight: 800; letter-spacing: 1px; color: #fff; text-transform: uppercase; margin: 0; }
.notice-bar { background: linear-gradient(90deg, #0b84ff, #06101d); height: 40px; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.05); position: relative; overflow: hidden; border-radius:8px; margin-bottom:12px; margin-left: 15px; margin-right: 15px; }
.notice-badge { background: #fff; color: #0b84ff; padding: 0 15px; height: 100%; display: flex; align-items: center; font-size: 11px; font-weight: 900; z-index: 10; box-shadow: 10px 0 20px rgba(0,0,0,0.5); }
.modern-marquee { flex: 1; width: 100%; color: #fff; font-size: 14px; font-weight: 600; padding-top: 3px; }

.container { max-width: 900px; margin: 0 auto; padding: 15px; width: 100%; flex: 1; }

/* Ads */
.ad-slot { background: var(--mlbd-card); border: 1px dashed rgba(255,255,255,0.1); border-radius: 12px; padding: 10px; text-align: center; margin-bottom: 15px; margin-left: 15px; margin-right: 15px; overflow: hidden; display: flex; justify-content: center; align-items: center; min-height: 60px; color: var(--mlbd-muted); font-size: 12px; }

/* Original Player Area & COMPACT Watch Panel */
.player-card { background: #000; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.42); margin-bottom: 15px; position: relative; margin-left: 10px; margin-right: 10px; }
.player-wrap { aspect-ratio: 16/9; background: #000; width: 100%; position: relative; }
.iframe-player { width: 100%; height: 100%; border: none; display: block; }
.no-server { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--mlbd-muted); font-weight: 500; }

.watch-panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,auto); gap: 10px; align-items: center; padding: 10px 14px; background: #0b1628; border-top: 1px solid rgba(255,255,255,.07); }
.watch-left { display: flex; align-items: center; gap: 10px; }
.yt-live-badge { background: #ff0033; color: #fff; padding: 12px 12px; border-radius: 10px; font-weight: 900; font-size: 10px; display: flex; align-items: center; gap: 6px; box-shadow: 0 8px 22px rgba(255,0,51,.22); }
.watch-title strong { display: block; font-size: 15px; font-weight: 900; }
.watch-title span { font-size: 11px; color: var(--mlbd-muted); font-weight: 800; }
.watch-metrics { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.watch-metric { background: rgba(255,255,255,.045); padding: 8px; border-radius: 10px; }
.watch-metric strong { display: block; font-size: 15px; font-weight: 900; }
.watch-metric span { display: block; font-size: 9px; color: var(--mlbd-muted); text-transform: uppercase; margin-top: 2px; font-weight: 900; }
.watch-metric.live { background: linear-gradient(180deg,rgba(11,132,255,.20),rgba(11,132,255,.10)); box-shadow: inset 0 0 0 1px rgba(11,132,255,.30); }
.watch-metric.live strong { color: #dfffea; }
.watch-metric.quality { background: rgba(255,255,255,.08); }

.player-helper-text { text-align: center; margin-bottom: 15px; font-size: 12px; color: #FBBF24; background: rgba(251, 191, 36, 0.08); padding: 10px 15px; border-radius: 8px; border: 1px dashed rgba(251, 191, 36, 0.2); font-family: 'Inter', sans-serif; margin-left: 15px; margin-right:15px;  }

/* VERTICAL CHANNELS LIST (Fixed layout) */
.quick-switch { background: #0a1526; border-radius: 16px; padding-bottom: 10px; box-shadow: var(--mlbd-shadow); margin-bottom: 20px; margin-left: 15px; margin-right: 15px; }
.switch-head { display: flex; justify-content: space-between; padding: 15px 16px; align-items: center; }
.switch-title { font-size: 18px; font-weight: 900; }
.switch-count { background: rgba(11,132,255,.14); color: #cae2ff; padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: bold; }
.channel-strip { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 0 16px 16px; }
.channel-card.list-view { display: flex; align-items: center; justify-content: space-between; background: #0d1b2f; padding: 10px 15px; border-radius: 14px; color: #fff; text-decoration: none; box-shadow: 0 12px 28px rgba(0,0,0,.22); transition: 0.2s;}
.channel-card.list-view:hover { background: #12243d; transform: translateY(-2px); }
.channel-card.list-view.active { background: linear-gradient(135deg,rgba(17,62,111,.96),rgba(10,25,44,.98)); box-shadow: inset 0 0 0 1px rgba(54,157,255,.34); }
.channel-logo { width: 60px; height: 45px; background: #edf4ff; border-radius: 8px; display: flex; justify-content: center; align-items: center; overflow: hidden; flex-shrink:0;}
.channel-logo img { max-width: 90%; max-height: 80%; object-fit: contain; }
.logo-fallback { width: 100%; height: 100%; background: linear-gradient(135deg, #0b84ff, #00d4ff); display: flex; justify-content: center; align-items: center; color: white; font-weight: 900; font-size: 10px; text-transform: uppercase; font-family: 'Montserrat', sans-serif;}
.channel-info { flex: 1; margin-left: 15px; text-align: left; }
.channel-name { font-weight: 900; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-stats { display: flex; gap: 6px; flex-shrink:0;}
.channel-stat.views { background: rgba(11,132,255,.12); color: #dcedff; padding: 5px 8px; border-radius: 8px; font-size: 11px; font-weight: bold; display: flex; gap: 5px; align-items: center; }

/* Original Feature Banner */
.feature-banner { background: linear-gradient(135deg, rgba(11, 132, 255, 0.1), rgba(0, 212, 255, 0.1)); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 25px 20px; text-align: center; margin-bottom: 20px; margin-left: 15px; margin-right: 15px; }
.feature-banner h3 { font-family: 'Montserrat', sans-serif; font-size: 18px; color: #fff; margin-bottom: 8px; font-weight: 700; text-transform: uppercase; }
.feature-banner p { color: var(--mlbd-muted); font-size: 13px; line-height: 1.5; margin:0;}

/* Live Chat Button & Slide (Original Random Badge added back) */
.chat-slide-wrapper { max-height: 0; overflow: hidden; transition: max-height 0.5s ease-in-out; margin-bottom: 20px; margin-left: 15px; margin-right: 15px; }
.chat-slide-wrapper.open { max-height: 600px; }
.chat-toggle-btn { position: relative; background: #0c192b; color: #0b84ff; border: 1px solid rgba(11,132,255,0.4); padding: 12px 30px; font-size: 15px; font-weight: 700; border-radius: 30px; cursor: pointer; transition: 0.3s; font-family: 'Montserrat', sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.chat-toggle-btn:hover { background: rgba(11, 132, 255, 0.1); }
.chat-toggle-btn.chat-opened { background: #ff2f3a; color: #fff; border-color: #ff2f3a; box-shadow: 0 4px 15px rgba(255, 47, 58, 0.4); }
.chat-badge { position: absolute; top: -6px; right: -8px; background: #ff2f3a; color: #fff; font-size: 11px; font-weight: 800; min-width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid #06101d; box-shadow: 0 2px 5px rgba(0,0,0,0.5); font-family: 'Inter', sans-serif; }
.chat-inner{background:#0c192b;border:1px solid rgba(255,255,255,.05);border-radius:12px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,.5);margin-bottom:15px;}
.chat-head{background:rgba(0,0,0,.3);padding:15px;font-weight:900;color:#0b84ff;display:flex;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.05);}

/* COMPACT NEXT MATCH COUNTDOWN */
.next-match-countdown { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.next-match-countdown .time-box { background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.05); padding: 10px 12px; border-radius: 10px; min-width: 65px; box-shadow: inset 0 0 10px rgba(11, 132, 255, 0.1); text-align:center;}
.next-match-countdown .time-box span { display: block; font-size: 1.6em; font-weight: 800; color: #0b84ff; text-shadow: 0 0 10px rgba(11, 132, 255, 0.4); margin-bottom: 2px; }
.next-match-countdown .time-box small { color: var(--mlbd-muted); text-transform: uppercase; font-size: 0.7em; font-weight: 800; letter-spacing: 1px; }

/* Admin Global Timer Box (If enabled) */
.timer-container { background: rgba(10, 21, 38, 0.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 20px; padding: 40px 20px; text-align: center; margin: 20px 15px 40px; box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); }

/* Poll System ("Fan Prediction" & Advanced Colors) */
.poll-box { background: var(--mlbd-card2); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 20px; margin-bottom: 15px; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.poll-question { font-size: 16px; font-weight: 900; margin-top: 0; color: #fff; font-family: 'Nunito', sans-serif;}
.poll-options { display: flex; flex-direction: column; gap: 10px; }
.poll-btn { position: relative; background: #06101d; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; overflow: hidden; transition: 0.3s; outline: none; }
.poll-btn:hover:not(.voted) { border-color: #0b84ff; }
.poll-bg { position: absolute; top: 0; left: 0; height: 100%; transition: width 0.8s cubic-bezier(0.4,0,0.2,1); z-index: 1; }
.poll-text { position: relative; z-index: 2; color: #fff; font-weight: 800; font-size: 14px; }
.poll-pct { position: relative; z-index: 2; font-weight: 900; font-size: 13px; }
.poll-btn.voted { cursor: default; border-color: rgba(255,255,255,0.1); }
.poll-winner { margin-top: 15px; padding-top: 15px; border-top: 1px dashed rgba(255,255,255,0.1); font-size: 14px; font-weight: 800; color: var(--mlbd-muted); text-align: center; }

/* Original Schedule Grid Maintained (With Theme Upgrade) */
.schedule-card { background:#0a1526; border-radius:16px; box-shadow:var(--mlbd-shadow); margin-bottom:20px; margin-left: 15px; margin-right: 15px; overflow:hidden;}
.schedule-top { padding:15px 16px; border-bottom:1px solid rgba(255,255,255,.05); background:rgba(255,255,255,.018);}
.schedule-title strong { display:block; color:#fff; font-size:17px; font-weight:900; }
.schedule-title span { display:block; margin-top:3px; color:var(--mlbd-muted); font-size:12px; font-weight:800; }

.schedule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px; padding:15px;}
.match-card { background: var(--mlbd-card2); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; overflow: hidden; transition: 0.3s; }
.match-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.4); border-color:rgba(11,132,255,0.3); }
.card-header { padding: 12px 15px; background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; }
.match-day { background: var(--mlbd-soft); color: #fff; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.match-card.today .match-day { background: #ff2f3a; }
.match-date { color: var(--mlbd-muted); font-size: 11px; font-weight: 600; }

.card-body { padding: 20px 15px; max-height: 380px; overflow-y: auto; }
.card-body::-webkit-scrollbar { width: 6px; }
.card-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }

.teams-wrapper { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; background: rgba(0,0,0,0.2); padding: 15px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.03); }
.team { width: 42%; text-align: center; }
.team-short { font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 900; color: #fff; letter-spacing: 1px; }
.team-full { font-size: 9px; color: var(--mlbd-muted); font-weight: 600; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.vs { width: 28px; height: 28px; background: #0b84ff; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; box-shadow: 0 0 10px rgba(11, 132, 255, 0.4); flex-shrink: 0; }

.match-info { display: flex; justify-content: space-between; align-items:center; font-size: 12px; color: var(--mlbd-muted); }
.match-info span { display: flex; align-items: center; gap: 5px; }
.match-info i { color: #0b84ff; font-size: 10px; }

.individual-timer { padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; display:inline-flex; align-items:center; gap:5px; border: 1px solid; }
.individual-timer.upcoming { background: rgba(11,132,255,.10); color: #cde4ff; border-color: rgba(11,132,255,.30); }
.individual-timer.live { background: rgba(34,197,94,.10); color: #c9ffd8; border-color: rgba(34,197,94,.35); }
.individual-timer.ended { background: rgba(255,47,58,.10); color: #ffb3b8; border-color: rgba(255,47,58,.30); }

/* AJAX LIVE POPUP NOTIFICATION */
.live-popup { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:9999; display:flex; justify-content:center; align-items:center; backdrop-filter:blur(5px); opacity:1; transition:opacity 0.3s; padding:15px;}
.live-popup.hidden { opacity:0; pointer-events:none; }
.popup-content { background:var(--mlbd-card); border:1px solid rgba(255,255,255,0.1); border-radius:16px; padding:20px; max-width:400px; width:100%; text-align:center; position:relative; box-shadow:0 20px 50px rgba(0,0,0,0.5); overflow:hidden;}
.popup-close { position:absolute; top:10px; right:10px; background:rgba(255,255,255,0.1); border:none; color:#fff; width:30px; height:30px; border-radius:50%; cursor:pointer; font-size:14px; transition:0.2s;}
.popup-close:hover { background:#ff2f3a; }
.popup-header { font-size:18px; font-weight:900; color:#22c55e; margin-bottom:15px; display:flex; align-items:center; justify-content:center; gap:8px;}
.popup-content img { max-width:100%; border-radius:10px; margin-bottom:15px; max-height:200px; object-fit:cover;}
.popup-text { font-size:14px; color:#fff; font-weight:600; line-height:1.5; margin-bottom:20px;}
.popup-timer-bar { width:100%; height:4px; background:rgba(255,255,255,0.1); border-radius:2px; overflow:hidden; position:absolute; bottom:0; left:0;}
.popup-progress { height:100%; background:#22c55e; width:100%; }

/* Section Title */
.section-title { font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 700; text-transform: uppercase; margin: 35px 15px 15px; color: #fff; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; display: block; width: 4px; height: 18px; background: #0b84ff; border-radius: 2px; }

/* Contact Support */
.contact-box { background: var(--mlbd-card); padding: 25px 20px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); text-align: center; margin-bottom: 20px; margin-left: 15px; margin-right: 15px; }
.contact-box p { color: var(--mlbd-muted); font-size: 13px; margin-bottom: 20px; }
.contact-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.contact-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; background: var(--mlbd-soft); color: #fff; text-decoration: none; border-radius: 8px; font-size: 13px; font-weight: 600; border: 1px solid rgba(255,255,255,0.05); transition: 0.2s; }
.contact-btn:hover { background: #0b84ff; border-color: #0b84ff; }

/* Custom Footer */
.custom-footer { background: #040914; padding: 35px 20px; text-align: center; border-top: 1px solid rgba(255,255,255,0.05); border-radius: 16px; margin-top: 20px; margin-bottom: 30px; margin-left: 15px; margin-right: 15px; box-shadow: var(--mlbd-shadow); font-family: 'Inter', sans-serif;}
.footer-brand { font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: 900; color: #fff; margin-bottom: 15px; letter-spacing: 1px;}
.footer-links { display: flex; justify-content: center; gap: 15px; margin-bottom: 20px; flex-wrap: wrap;}
.footer-links a { background: var(--mlbd-card); color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 8px; font-weight: 800; font-size: 13px; border: 1px solid rgba(255,255,255,0.05); transition: 0.3s;}
.footer-links a:hover { background: #0b84ff; border-color: #0b84ff;}
.footer-copy { color: var(--mlbd-muted); font-size: 13px; font-weight: 700; line-height: 1.6;}

/* Mobile Responsiveness Updates */
@media (max-width: 900px) {
    .watch-panel { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .channel-strip { grid-template-columns: 1fr; padding: 15px; }
    .contact-links { flex-direction: column; }
    .contact-btn { width: 100%; justify-content: center; }
    .next-match-countdown { gap: 8px; }
    .next-match-countdown .time-box { min-width: 55px; padding: 8px; }
    .next-match-countdown .time-box span { font-size: 1.3em; }
    .match-info { flex-direction: column; align-items: flex-start; gap: 10px;}
    .individual-timer { width: 100%; justify-content: center;}
    .footer-links { flex-direction: column; }
    .footer-links a { width: 100%; justify-content: center;}
}
