/* ─── TOKENS ─────────────────────────────────── */
:root {
    --bg: #080c10;
    --surface: #0e1318;
    --surface2: #131a22;
    --surface3: #1a2330;
    --border: #1e2a38;
    --border2: #243040;
    --text: #e8edf2;
    --muted: #5a7080;
    --accent: #00d4ff;
    --accent2: #ff3c5f;
    --gold: #ffc84a;
    --live-red: #ff2d55;
    --radius: 16px;
    --ease: cubic-bezier(.25, .8, .25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Barlow', sans-serif;
    overflow-x: hidden;
}

/* ─── NOISE OVERLAY ──────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: .4;
}

/* ─── HEADER ─────────────────────────────────── */
header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(8, 12, 16, .92);
    backdrop-filter: blur(24px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1440px;
    margin: auto;
    padding: 0 24px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 30px;
    letter-spacing: 1px;
    white-space: nowrap;
    line-height: 1;
}
.logo .jago {
    color: var(--text);
}
.logo .live {
    color: var(--accent);
    position: relative;
}
.logo .live::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent);
}
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.badge-live {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 45, 85, .12);
    border: 1px solid rgba(255, 45, 85, .3);
    border-radius: 40px;
    padding: 5px 12px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--live-red);
    letter-spacing: .5px;
}
.badge-live .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--live-red);
    animation: pulse-red 1.2s ease-in-out infinite;
}
@keyframes pulse-red {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: .5;
        transform: scale(1.5);
    }
}

/* ─── HERO STRIP ─────────────────────────────── */
.hero-strip {
    background: linear-gradient(135deg, #0e1a26 0%, #0a1520 50%, #0d1420 100%);
    border-bottom: 1px solid var(--border);
    padding: 40px 24px 36px;
    position: relative;
    overflow: hidden;
}
.hero-strip::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 255, .07) 0%, transparent 70%);
    pointer-events: none;
}
.hero-strip::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 10%;
    width: 300px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(255, 60, 95, .05) 0%, transparent 70%);
    pointer-events: none;
}
.hero-inner {
    max-width: 1440px;
    margin: auto;
    position: relative;
    z-index: 1;
}
.hero-inner h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(42px, 6vw, 80px);
    line-height: .95;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.hero-inner h1 em {
    font-style: normal;
    color: var(--accent);
    text-shadow: 0 0 40px rgba(0, 212, 255, .4);
}
.hero-sub {
    font-size: 16px;
    color: var(--muted);
    max-width: 480px;
    line-height: 1.5;
    margin-bottom: 28px;
}
.tz-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--muted);
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 6px 14px;
}
.tz-note i {
    color: var(--accent);
    font-size: 12px;
}

/* ─── TOOLBAR ────────────────────────────────── */
.toolbar {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 24px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}
.search-box {
    position: relative;
    flex: 1 1 300px;
    max-width: 480px;
}
.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 14px;
    pointer-events: none;
}
.search-box input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    outline: none;
    transition: .2s var(--ease);
}
.search-box input::placeholder {
    color: var(--muted);
}
.search-box input:focus {
    border-color: var(--accent);
    background: var(--surface3);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, .08);
}

.sort-group {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.sort-btn {
    padding: 10px 18px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--muted);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    transition: .18s var(--ease);
    white-space: nowrap;
}
.sort-btn:hover {
    border-color: var(--accent);
    color: var(--text);
}
.sort-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #080c10;
    box-shadow: 0 0 16px rgba(0, 212, 255, .3);
}

/* ─── MAIN CONTENT ───────────────────────────── */
main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 24px 60px;
    position: relative;
    z-index: 1;
}

/* ─── LIVE NOW SECTION ───────────────────────── */
.livenow-section {
    margin-bottom: 52px;
}
.section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.section-head-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
}
.section-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-label.live-label {
    color: var(--live-red);
    text-shadow: 0 0 20px rgba(255, 45, 85, .4);
}
.section-label.live-label .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--live-red);
    box-shadow: 0 0 12px var(--live-red);
    animation: pulse-red 1.2s ease-in-out infinite;
}
.section-label.sport-label {
    color: var(--text);
}
.section-label.sport-label i {
    color: var(--accent);
    font-size: 20px;
}

/* ─── SPORT SECTION ──────────────────────────── */
.sport-section {
    margin-bottom: 52px;
}
.league-group {
    margin-bottom: 28px;
}
.league-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.league-title::before {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent);
}

/* ─── CARDS GRID ─────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 16px;
}

/* ─── CARD ───────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all .22s var(--ease);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: .22s;
}
.card:hover {
    border-color: rgba(0, 212, 255, .3);
    background: var(--surface2);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 212, 255, .08);
}
.card:hover::before {
    opacity: 1;
}
.card.live-card {
    border-color: rgba(255, 45, 85, .2);
    background: linear-gradient(145deg, #130d10 0%, var(--surface) 100%);
}
.card.live-card::before {
    background: linear-gradient(90deg, transparent, var(--live-red), transparent);
    opacity: .6;
}
.card.live-card:hover {
    border-color: rgba(255, 45, 85, .5);
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 45, 85, .12);
}

.card-sport-tag {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 10px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface3);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 4px;
}

.match-tag {
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
    padding-right: 56px;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.datetime-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #6a8090;
    background: var(--surface3);
    border: 1px solid var(--border);
    padding: 5px 10px;
    border-radius: 6px;
    width: fit-content;
}
.datetime-badge i {
    color: var(--accent);
    font-size: 11px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px;
    padding: 5px 12px;
    border-radius: 6px;
    width: fit-content;
}
.status-badge.live {
    background: rgba(255, 45, 85, .12);
    border: 1px solid rgba(255, 45, 85, .3);
    color: var(--live-red);
}
.status-badge.live .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--live-red);
    animation: pulse-red 1s infinite;
}
.status-badge.countdown {
    background: rgba(0, 212, 255, .08);
    border: 1px solid rgba(0, 212, 255, .2);
    color: var(--accent);
}

/* ─── EMPTY / LOADING ────────────────────────── */
.state-box {
    text-align: center;
    padding: 80px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--muted);
}
.state-box i {
    font-size: 36px;
    margin-bottom: 16px;
    display: block;
}
.state-box p {
    font-size: 15px;
}

/* ─── MODAL ──────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(4, 8, 12, .94);
    justify-content: center;
    align-items: center;
    z-index: 9000;
    backdrop-filter: blur(8px);
    padding: 16px;
}
.modal-box {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 22px;
    padding: 24px;
    width: 100%;
    max-width: 1020px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface3);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 16px;
    transition: .18s;
    z-index: 10;
}
.modal-close:hover {
    background: var(--accent);
    color: #080c10;
    border-color: var(--accent);
}
.modal-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 26px;
    letter-spacing: .5px;
    margin-bottom: 16px;
    padding-right: 48px;
}
.player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 18px;
}
.player-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.servers-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}
.servers-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.server-btn {
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .18s;
    letter-spacing: .3px;
}
.server-btn:hover {
    border-color: var(--accent);
    color: var(--text);
}
.server-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #080c10;
}
.server-loading {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--accent);
    margin-top: 12px;
}

/* ─── TIPS CAROUSEL ──────────────────────────── */
.player-tips {
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--surface2);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    line-height: 1.5;
    position: relative;
}

.player-tips .tips-content {
    flex: 1;
    min-width: 0;
    position: relative;
    min-height: 40px;
}
.tips-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.tips-slide.active {
    display: block;
    opacity: 1;
}
.tips-slide span {
    display: block;
}
.tips-slide strong {
    color: #ffb400;
}

.tips-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 4px 0 2px;
}
.tips-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border2);
    cursor: pointer;
    transition: .2s;
}
.tips-dots .dot.active {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}
.tips-dots .dot:hover {
    background: var(--muted);
}
.tips-tutor-link {
    text-align: right;
    font-size: 12px;
    margin-top: 2px;
}
.tips-tutor-link a {
    color: var(--accent);
    text-decoration: underline;
    font-weight: 600;
    word-break: break-word;
}

/* Responsive mobile */
@media (max-width: 600px) {
    .player-tips {
        font-size: 12px;
        padding: 10px 12px;
    }
    .tips-slide span {
        font-size: 12px;
    }
    .tips-tutor-link {
        text-align: left;
    }
}

/* ─── ADS POPUP ──────────────────────────────── */
#adsPopup .modal-box {
    max-width: 360px;
    text-align: center;
    padding: 20px;
}
#adsPopup img {
    width: 100%;
    border-radius: 12px;
    cursor: pointer;
    display: block;
}
.ads-skip {
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    transition: .18s;
}
.ads-skip:hover {
    color: var(--text);
}
.ads-skip span {
    display: inline-block;
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 6px 18px;
    border-radius: 30px;
}

/* ─── FOOTER ─────────────────────────────────── */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 56px 24px 24px;
    position: relative;
    z-index: 1;
}
.footer-inner {
    max-width: 1440px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 40px;
}
.footer-brand .logo {
    font-size: 28px;
    margin-bottom: 12px;
}
.footer-brand p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    max-width: 280px;
}
.footer-col h4 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}
.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col a {
    font-size: 14px;
    color: #4a6070;
    text-decoration: none;
    transition: .18s;
}
.footer-col a:hover {
    color: var(--accent);
}
.socials {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}
.socials a {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--surface2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    transition: .18s;
}
.socials a:hover {
    background: var(--accent);
    color: #080c10;
    border-color: var(--accent);
}
.footer-bottom {
    max-width: 1440px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-bottom p {
    font-size: 13px;
    color: var(--muted);
}
.footer-tagline {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--border2);
}

/* ─── SCROLLBAR ──────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 600px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
    .header-inner {
        padding: 0 16px;
    }
    main {
        padding: 20px 16px 60px;
    }
    .toolbar {
        padding: 16px 16px 0;
    }
    .hero-strip {
        padding: 30px 16px 24px;
    }
}
.filter-group select {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 16px;
    border-radius: 50px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}
.league-tag {
    font-size: 11px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface3);
    padding: 3px 8px;
    border-radius: 4px;
    width: fit-content;
    margin-top: -6px;
}
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}
.tab-btn {
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--muted);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: .2s;
}
.tab-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #080c10;
}
.tab-content {
    transition: opacity 0.2s ease;
}