:root {
    /* Colors */
    --electric-blue: #0000EE;
    --bright-sky-blue: #0099FF;
    --deep-blue: #0055FF;
    --error-red: #FF0022;
    --neon-lime: #CBFF00;
    
    --pure-black: #000000;
    --very-dark-gray: #1A1A1A;
    --dark-charcoal: #212121;
    --charcoal: #242424;
    --medium-gray: #666666;
    --light-gray: #999999;
    --pure-white: #FFFFFF;
    
    --nav-bg: rgba(0, 0, 0, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-display: "GT Walsheim Framer Medium", "GT Walsheim", "Outfit", sans-serif;
    --font-body: "Inter", sans-serif;
    
    /* Spacing Base */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 32px;
    --space-7: 40px;
    --space-8: 60px;
    --space-9: 80px;
}

/* ===== Top Status Bar ===== */
.top-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 20px;
    background: var(--very-dark-gray);
    color: rgba(255,255,255,0.85);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.status-left, .status-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: statusPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(34, 197, 94, 0.6); }
    50% { opacity: 0.4; box-shadow: 0 0 2px rgba(34, 197, 94, 0.2); }
}

.status-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #22c55e;
}

#live-clock {
    font-variant-numeric: tabular-nums;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 14px; /* From template */
    color: var(--pure-black);
    background-color: #F8F9FA; /* Slightly off-white to make pure-white cards pop */
    -webkit-font-smoothing: antialiased;
}

/* Typography Hierarchy */
h1.page-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 500;
    line-height: 32px;
    margin-bottom: var(--space-4);
    color: var(--pure-black);
}

h2 {
    font-family: var(--font-display);
    font-size: 62px;
    font-weight: 500;
    line-height: 62px;
}

h3 {
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 400;
    line-height: 28.8px;
    margin-bottom: var(--space-5);
}

.icon-sm {
    width: 16px;
    height: 16px;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 64px;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--pure-white);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-links {
    display: flex;
    gap: var(--space-4);
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--medium-gray);
    font-family: var(--font-body);
    font-size: 12px;
    padding: 0 var(--space-4);
    height: 30px;
    border-radius: 40px;
    cursor: pointer;
    text-transform: lowercase;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    color: var(--pure-white);
}

.nav-btn.active {
    background: var(--glass-bg);
    color: var(--pure-white);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--pure-white);
    cursor: pointer;
    padding: 5px;
}

/* Main Container */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: var(--space-5) var(--space-7);
}

/* Tabs */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* Cards */
.content-card {
    background: var(--pure-white);
    border: 1px solid var(--charcoal);
    border-radius: 8px;
    padding: var(--space-6);
    transition: all 0.2s ease;
}

.content-card:hover {
    border-color: var(--light-gray);
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.12);
}

/* Buttons */
.btn-primary {
    background: var(--electric-blue);
    color: var(--pure-white);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    padding: 6px 10px 7px 10px;
    border-radius: 15px;
    border: none;
    height: 28px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-primary:hover {
    opacity: 0.85;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-primary:active {
    opacity: 0.7;
    box-shadow: inset 0px 2px 4px rgba(0,0,0,0.1);
}

.server-selector::-webkit-scrollbar {
    display: none;
}
.server-selector {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.server-selector .btn-primary {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.live-badge {
    background: var(--error-red);
    color: var(--pure-white);
}

/* Stream Section */
.stream-container {
    background: var(--pure-white);
    border: 1px solid var(--charcoal);
    border-radius: 12px; /* Primary container radius */
    overflow: hidden;
    max-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
}

.video-placeholder {
    background: var(--pure-black);
    flex: 1;
    min-height: 250px; /* Mencegah player collapse saat loading */
    width: 100%;
    aspect-ratio: 16/9; /* Memaksa rasio bahkan tanpa konten video */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--light-gray);
    position: relative;
}

#player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--pure-black);
}

.play-icon {
    width: 64px;
    height: 64px;
    color: var(--pure-white);
    opacity: 0.8;
}

.stream-info {
    padding: var(--space-4) var(--space-5);
    flex-shrink: 0;
}

.match-teams {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-8);
    margin-bottom: var(--space-5);
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
}

.flag-lg {
    width: 50px;
    border-radius: 4px;
    border: 1px solid var(--light-gray);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.vs-badge {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--medium-gray);
}

.match-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
    color: var(--medium-gray);
    font-size: 12px;
}

.meta-text {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Jadwal Section */
.jadwal-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-5);
}

.match-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.match-date {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--medium-gray);
    font-size: 12px;
}

.match-teams-sm {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.team-sm {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    flex: 1;
    min-width: 0; /* Crucial for text truncation */
}

.team-sm:first-child {
    justify-content: flex-end;
}
.team-sm:last-child {
    justify-content: flex-start;
}

.team-sm span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vs-text {
    flex-shrink: 0;
    text-align: center;
    width: auto;
    min-width: 40px;
}
    width: 40px;
    border-radius: 4px;
    border: 1px solid var(--light-gray);
}

.vs-text {
    color: var(--light-gray);
    font-size: 12px;
}

/* Grup Section */
.grup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--space-6);
}

.grup-card {
    padding: var(--space-6);
}

.grup-title {
    margin-bottom: var(--space-4);
}

.grup-table {
    width: 100%;
    border-collapse: collapse;
}

.grup-table th {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 12px;
    border-bottom: 2px solid var(--light-gray);
    border-left: 1px solid var(--light-gray);
}
.grup-table th:first-child {
    border-left: none;
}

.grup-table td {
    padding: var(--space-3) var(--space-2);
    border-bottom: 1px solid var(--light-gray);
    font-size: 14px;
    border-left: 1px solid var(--light-gray);
}
.grup-table td:first-child {
    border-left: none;
}

#search-filter:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 238, 0.1);
}

.grup-table tr:last-child td {
    border-bottom: none;
}

.team-table {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 500;
}

.flag-xs {
    width: 24px;
    border-radius: 2px;
    border: 1px solid var(--light-gray);
}

/* Responsive */
@media (max-width: 1023px) {
    .container {
        padding: var(--space-8) var(--space-6);
    }
    h1.page-title {
        font-size: 40px;
        line-height: 40px;
    }
}

@media (max-width: 599px) {
    .container {
        padding: var(--space-7) var(--space-3);
    }
    .match-teams {
        gap: var(--space-5);
    }
    .flag-lg {
        width: 60px;
    }
    h2 {
        font-size: 32px;
        line-height: 32px;
    }
    .grup-grid {
        grid-template-columns: 1fr;
    }
    
    /* Hamburger Menu Logic */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .nav-tabs {
        display: none; /* Disembunyikan awalnya */
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: var(--space-4) 0;
        gap: var(--space-3);
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    .nav-tabs.show {
        display: flex;
    }
    .nav-btn {
        width: 100%;
        border-radius: 0;
        padding: var(--space-3) var(--space-5);
        font-size: 14px;
        text-align: left;
    }
    
    /* Perkecil Tabel Grup */
    .grup-card {
        padding: var(--space-3);
    }
    .grup-table th, .grup-table td {
        padding: 6px 4px;
        font-size: 11px;
    }
    .team-table {
        gap: 6px;
    }
    .flag-xs {
        width: 20px;
    }
}
