:root {
    --text-color: #fff;
    --theme-color: #01d902;
    --glass-bg: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-border-hover: rgba(255, 255, 255, 0.3);
    --glass-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

body {
    margin: 0; padding: 0; font-family: 'Inter', sans-serif; color: var(--text-color);
    min-height: 100vh; display: flex; flex-direction: column; align-items: center;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    background-color: #000;
    background-size: cover; background-position: center; background-attachment: fixed; background-repeat: no-repeat;
    transition: background-image 0.5s ease, background-color 0.5s ease;
}

body.lights-out-mode { background-image: none; background-color: #000000; }

body.lights-out-mode .top-bar,
body.lights-out-mode .glass-panel:not(.player-section .glass-panel),
body.lights-out-mode .ad-container,
body.lights-out-mode .ad-banner-1000x60,
body.lights-out-mode .tv-channels-row {
    opacity: 0.05; pointer-events: none; transition: opacity 0.5s ease;
}
body.lights-out-mode .player-section { z-index: 999; position: relative; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.6); }

.bg-link { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; cursor: pointer; display: block; }

.top-bar {
    width: 100%; max-width: 1400px; margin: 0 auto;
    background: var(--glass-bg); backdrop-filter: blur(6px) saturate(120%); -webkit-backdrop-filter: blur(6px) saturate(120%);
    border: 1px solid var(--glass-border); border-top: none; border-radius: 0 0 12px 12px;
    position: sticky; top: 0; z-index: 1000; display: flex; justify-content: space-between; align-items: center;
    padding: 12px 24px; font-size: 13px; font-weight: 500;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); color: var(--text-color);
}

.current-domain { color: var(--text-color); opacity: 0.7; display: flex; align-items: center; letter-spacing: 0.5px; font-weight: 600; font-size: 0.9em; }
.current-domain span.domain-name { color: var(--text-color); font-weight: 800; margin-left: 8px; display: flex; align-items: center; gap: 8px; transition: var(--transition); opacity: 1; }
.current-domain span.domain-name:hover { opacity: 0.8; }

.social-icons { display: flex; gap: 20px; }
.social-icons a { color: var(--text-color); opacity: 0.8; text-decoration: none; font-size: 16px; transition: var(--transition); display: flex; align-items: center; justify-content: center; }
.social-icons a:hover { opacity: 1; transform: translateY(-2px); }

.container {
    width: 100%; max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px;
    padding: 24px 16px 32px 16px; box-sizing: border-box; transition: opacity 0.5s ease;
    position: relative; z-index: 10;
}

.glass-panel {
    background: var(--glass-bg); backdrop-filter: blur(6px) saturate(120%); -webkit-backdrop-filter: blur(6px) saturate(120%);
    border: 1px solid var(--glass-border); border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), var(--glass-highlight); transition: var(--transition);
}

.header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; flex-wrap: wrap; gap: 16px; }
.logo img { height: 45px; display: block; object-fit: contain; transition: var(--transition); }
.logo img:hover { transform: scale(1.05); }

.hamburger-btn {
    display: none; background: transparent; border: 1px solid var(--glass-border);
    color: var(--text-color); font-size: 24px; padding: 8px 12px; border-radius: 8px;
    cursor: pointer; transition: var(--transition); line-height: 1;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.15); border-color: var(--glass-border-hover); }

.nav-menu {
    display: flex; gap: 4px; background: transparent; padding: 4px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15); backdrop-filter: blur(4px); flex-wrap: wrap;
}

.nav-menu a {
    color: var(--text-color); opacity: 0.8; text-decoration: none; font-weight: 600;
    font-size: 12px; padding: 10px 16px; border-radius: 6px; display: flex; align-items: center;
    gap: 8px; text-transform: uppercase; letter-spacing: 0.3px; transition: var(--transition); position: relative;
    white-space: nowrap;
}
.nav-menu a:hover { opacity: 1; background: rgba(255,255,255,0.12); transform: translateY(-2px) scale(1.03); box-shadow: 0 6px 16px rgba(255,255,255,0.15); }
.nav-menu a.active { color: #000; background: var(--text-color); box-shadow: 0 4px 12px rgba(255,255,255,0.2); opacity: 1; }

.pulse-anim { animation: pulseAnim 2s infinite; }
@keyframes pulseAnim { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

.shake-anim { animation: shakeAnim 2.5s infinite; }
@keyframes shakeAnim { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); } 20%, 40%, 60%, 80% { transform: translateX(2px); } }

.glow-anim { animation: glowAnim 1.5s infinite alternate; }
@keyframes glowAnim { from { box-shadow: 0 0 5px var(--theme-color); } to { box-shadow: 0 0 20px var(--theme-color), inset 0 0 10px var(--theme-color); background: rgba(229, 184, 80, 0.1); color: var(--theme-color); } }

.bounce-anim { animation: bounceAnim 2s infinite; }
@keyframes bounceAnim { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); } 60% { transform: translateY(-3px); } }

.flash-anim { animation: flashAnim 3s infinite; }
@keyframes flashAnim { 0%, 50%, 100% { opacity: 1; } 25%, 75% { opacity: 0.5; } }

.neon-anim { animation: neonAnim 1.5s infinite alternate; border: 1px solid transparent; }
@keyframes neonAnim { 
    from { box-shadow: 0 0 2px var(--theme-color), 0 0 4px var(--theme-color), inset 0 0 2px var(--theme-color); border-color: rgba(229, 184, 80, 0.3); color: var(--theme-color); } 
    to { box-shadow: 0 0 5px var(--theme-color), 0 0 10px var(--theme-color), inset 0 0 5px var(--theme-color); border-color: var(--theme-color); color: #fff; } 
}

.tv-channels-row { display: flex; align-items: center; gap: 8px; width: 100%; }
.tv-scroll-wrapper {
    flex: 1; overflow-x: auto; scroll-behavior: smooth; display: flex; align-items: center;
    gap: 20px; padding: 12px 8px; -ms-overflow-style: none; scrollbar-width: none; cursor: grab;
}
.tv-scroll-wrapper:active { cursor: grabbing; }
.tv-scroll-wrapper::-webkit-scrollbar { display: none; }
.tv-logo-link {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    width: 85px; height: 65px; transition: var(--transition); text-decoration: none; cursor: pointer;
    background: rgba(255, 255, 255, 0.06); backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); overflow: hidden; padding: 6px;
    user-select: none; -webkit-user-drag: none;
}
.tv-logo-link:hover {
    background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1); box-shadow: 0 6px 24px rgba(255, 255, 255, 0.15);
}
.tv-logo-link.selected-match {
    border-color: var(--text-color) !important; box-shadow: 0 0 18px rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.18) !important; transform: scale(1.08);
}
.tv-logo-img { width: 100%; height: 100%; object-fit: contain; display: block; background: transparent; border: none; pointer-events: none; }
.tv-arrow { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.15); color: var(--text-color); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); font-size: 14px; flex-shrink: 0; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.tv-arrow:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); transform: scale(1.1); }
.tv-arrow:active { transform: scale(0.95); }

.ad-container, .ad-banner-1000x60 { background: rgba(0,0,0,0.15); border-radius: 12px; border: 1px dashed var(--glass-border); overflow: hidden; }
.ad-container { width: 100%; height: auto; min-height: 70px; display: flex; justify-content: center; align-items: center; }
.ad-container img { max-width: 100%; height: auto; display: block; border-radius: 12px; }
.ad-banner-1000x60 { width: 100%; max-width: 1000px; height: auto; min-height: 60px; margin: 0 auto; display: flex; justify-content: center; align-items: center; }
.ad-banner-1000x60 img { max-width: 100%; height: auto; display: block; border-radius: 12px; }

.main-content { display: grid; grid-template-columns: 900px 480px; gap: 20px; transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); justify-content: center; }
.main-content.theater-mode { grid-template-columns: 1fr; }
.main-content.theater-mode .list-section { min-height: auto; overflow: visible; }
.main-content.theater-mode .list-section-scale-wrapper { position: relative; width: 100%; height: auto; transform: none; }
.main-content.theater-mode .matches-wrapper { max-height: none; overflow-y: visible; }
.main-content.theater-mode .list-content { height: auto; }

.player-section { display: flex; flex-direction: column; gap: 16px; }
.iframe-wrapper { width: 100%; aspect-ratio: 16 / 9; background: rgba(0,0,0,0.5); border-radius: 12px; overflow: hidden; border: 1px solid var(--glass-border); box-shadow: 0 10px 30px rgba(0,0,0,0.3); transition: var(--transition); }
.iframe-wrapper iframe { width: 100%; height: 100%; border: none; display: block; }

.player-actions-center { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.action-btn { background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.25); color: var(--text-color); opacity: 0.9; padding: 10px 24px; border-radius: 8px; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; transition: var(--transition); }
.action-btn:hover { background: rgba(255,255,255,0.15); opacity: 1; border-color: rgba(255,255,255,0.5); transform: translateY(-2px); }

.list-section { position: relative; overflow: hidden; min-height: 506px; }
.list-section-scale-wrapper { width: 125%; height: 125%; transform: scale(0.8); transform-origin: top left; position: absolute; top: 0; left: 0; display: flex; flex-direction: row; }

.tabs { display: flex; flex-direction: column; width: 70px; flex-shrink: 0; border-right: 1px solid var(--glass-border); background: rgba(0,0,0,0.1); padding: 12px 0; gap: 6px; align-items: center; }
.tab-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--text-color); opacity: 0.6; cursor: pointer; transition: var(--transition); font-size: 16px; }
.tab-btn:hover { opacity: 1; background: rgba(255,255,255,0.15); transform: scale(1.1); }
.tab-btn.active { color: #000; background: var(--text-color); box-shadow: 0 4px 12px rgba(255,255,255,0.25); transform: scale(1.05); opacity: 1; }
.search-tab-btn { margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); border-radius: 0; width: 100%; }

.list-content { display: flex; flex-direction: column; flex-grow: 1; padding: 20px; gap: 16px; }
.search-container { position: relative; width: 100%; display: none; animation: slideDown 0.3s ease forwards; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.search-container i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-color); opacity: 0.6; font-size: 14px; }
.search-container input { width: 100%; background: rgba(0,0,0,0.15); border: 1px solid var(--glass-border); padding: 14px 16px 14px 44px; border-radius: 8px; color: var(--text-color); font-family: 'Inter', sans-serif; font-size: 13px; box-sizing: border-box; outline: none; transition: var(--transition); }
.search-container input:focus { border-color: rgba(255,255,255,0.4); background: rgba(0,0,0,0.3); }

.matches-wrapper { flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 6px; max-height: calc(100% - 20px); }
.match-item { display: flex; align-items: center; background: rgba(0,0,0,0.1); border: 1px solid rgba(255,255,255,0.05); padding: 12px 16px; border-radius: 8px; cursor: pointer; transition: var(--transition); color: var(--text-color); }
.match-item:hover { background: rgba(255,255,255,0.15); border-color: var(--glass-border-hover); transform: translateX(4px); }
.match-item.selected-match { border-color: var(--text-color) !important; box-shadow: 0 0 12px rgba(255,255,255,0.2); }

.m-time { 
    font-weight: 600; width: 50px; font-size: 12px; text-align: center; 
    color: var(--text-color); 
}

.m-logos { display: flex; align-items: center; margin-right: 12px; }
.team-logo { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.1); background: #fff; object-fit: cover; }
.team-logo.overlap { margin-left: -10px; z-index: 2; }
.m-info { flex-grow: 1; display: flex; flex-direction: column; gap: 4px; }
.m-league { font-size: 10px; color: var(--text-color); opacity: 0.6; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.m-teams { font-size: 13px; font-weight: 600; color: var(--text-color); }
.m-icons { color: var(--text-color); opacity: 0.5; font-size: 14px; transition: var(--transition); }
.match-item:hover .m-icons { opacity: 1; transform: translateX(0); }

.footer { padding: 32px 24px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; color: var(--text-color); }
.footer-seo { color: var(--text-color); opacity: 0.6; font-size: 12px; line-height: 1.6; max-width: 800px; }
.footer-social-icons { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-social-icons a { color: var(--text-color); opacity: 0.8; text-decoration: none; font-size: 20px; transition: var(--transition); display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); }
.footer-social-icons a:hover { color: #000; background: var(--text-color); border-color: var(--text-color); transform: translateY(-2px); opacity: 1; }
.footer-menu { display: flex; gap: 32px; font-size: 13px; font-weight: 500; flex-wrap: wrap; justify-content: center; }
.footer-menu a { color: var(--text-color); opacity: 0.8; text-decoration: none; transition: var(--transition); }
.footer-menu a:hover { opacity: 1; }
.footer-linktree { margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 24px; width: 100%; }
.transparent-linktree { display: inline-flex; align-items: center; gap: 8px; color: var(--text-color); opacity: 0.35; text-decoration: none; font-size: 12px; font-weight: 500; padding: 8px 16px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px; background: rgba(0, 0, 0, 0.2); transition: var(--transition); letter-spacing: 0.5px; }
.transparent-linktree i { font-size: 14px; }
.transparent-linktree:hover { opacity: 0.8; border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.05); transform: translateY(-2px); }

.popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); z-index: 9999; display: flex; justify-content: center; align-items: center; opacity: 1; transition: opacity 0.3s ease; }
.popup-content { position: relative; max-width: 380px; width: 85%; animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes popIn { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.popup-content img { width: 100%; border-radius: 12px; display: block; box-shadow: 0 15px 50px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); }
.close-popup { position: absolute; top: -12px; right: -12px; background: #111; color: var(--text-color); border: 2px solid rgba(255,255,255,0.3); width: 30px; height: 30px; border-radius: 50%; font-size: 14px; cursor: pointer; display: flex; justify-content: center; align-items: center; z-index: 10; transition: var(--transition); box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.close-popup:hover { background: var(--text-color); color: #000; transform: scale(1.1) rotate(90deg); }

@media (max-width: 1460px) {
    .top-bar, .container { max-width: 100%; padding-left: 20px; padding-right: 20px; }
    .main-content { grid-template-columns: minmax(0, 900px) minmax(0, 480px); gap: 16px; }
    .list-section-scale-wrapper { width: 100%; height: 100%; transform: scale(0.8); }
}
@media (max-width: 1100px) {
    .main-content { grid-template-columns: 1fr; }
    .list-section { min-height: auto; height: auto; }
    .list-section-scale-wrapper { position: relative; width: 100%; height: auto; transform: none; flex-direction: column; }
    .tabs { flex-direction: row; width: 100%; overflow-x: auto; padding: 8px; gap: 8px; border-right: none; border-bottom: 1px solid var(--glass-border); }
    .tab-btn { width: auto; height: 40px; padding: 0 12px; font-size: 14px; flex-shrink: 0; }
    .search-tab-btn { border-bottom: none; margin-bottom: 0; }
    .list-content { padding: 12px; }
    .header { flex-direction: column; align-items: flex-start; }
    .nav-menu { width: 100%; justify-content: flex-start; overflow-x: auto; }
    .tv-logo-link { width: 70px; height: 55px; }
}
@media (max-width: 768px) {
    .top-bar { flex-direction: column; align-items: flex-start; padding: 10px 16px; gap: 8px; }
    .current-domain { font-size: 11px; }
    .social-icons { gap: 12px; }
    .social-icons a { font-size: 14px; }
    .container { padding: 16px 10px; gap: 16px; }
    .header { padding: 16px; flex-direction: row; justify-content: space-between; align-items: center; }
    .logo img { height: 35px; }
    .hamburger-btn { display: block; }
    .nav-menu { display: none; flex-direction: column; width: 100%; border: none; background: rgba(0,0,0,0.3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 12px; padding: 8px; position: absolute; top: 70px; left: 0; right: 0; z-index: 1001; }
    .nav-menu.active { display: flex; }
    .nav-menu a { padding: 12px 16px; font-size: 13px; justify-content: flex-start; width: 100%; }
    .main-content { grid-template-columns: 1fr; gap: 12px; }
    .player-section { gap: 12px; }
    .player-actions-center { gap: 10px; }
    .action-btn { padding: 8px 16px; font-size: 12px; }
    .list-section { min-height: auto; }
    .list-section-scale-wrapper { position: relative; width: 100%; height: auto; transform: none; flex-direction: column; }
    .tabs { flex-direction: row; width: 100%; overflow-x: auto; padding: 6px; gap: 6px; border-right: none; border-bottom: 1px solid var(--glass-border); justify-content: flex-start; }
    .tab-btn { width: auto; height: 36px; padding: 0 10px; font-size: 13px; flex-shrink: 0; }
    .search-tab-btn { border-bottom: none; margin-bottom: 0; }
    .list-content { padding: 10px; }
    .match-item { padding: 10px 12px; }
    .m-time { width: 40px; font-size: 11px; }
    .m-teams { font-size: 12px; }
    .m-league { font-size: 9px; }
    .tv-channels-row { gap: 4px; }
    .tv-scroll-wrapper { gap: 12px; }
    .tv-logo-link { width: 60px; height: 45px; }
    .tv-arrow { width: 30px; height: 30px; font-size: 12px; }
    .ad-container { min-height: 50px; }
    .ad-banner-1000x60 { min-height: 40px; }
    .footer { padding: 24px 16px; gap: 16px; }
    .footer-menu { gap: 16px; font-size: 12px; }
    .footer-social-icons a { width: 36px; height: 36px; font-size: 16px; }
    .popup-content { width: 90%; max-width: 300px; }
}
@media (max-width: 480px) {
    .top-bar { padding: 8px 12px; }
    .current-domain { font-size: 10px; }
    .header { padding: 12px; }
    .logo img { height: 30px; }
    .nav-menu a { font-size: 11px; padding: 10px 12px; }
    .action-btn { padding: 6px 12px; font-size: 11px; }
    .match-item { padding: 8px 10px; }
    .m-teams { font-size: 11px; }
}

