:root {
    --bg: #0e1117;
    --surface: #161b27;
    --surface2: #1e2538;
    --border: #2a3248;
    --accent: #f5c518;
    --accent2: #e8392a;
    --green: #22c55e;
    --text: #e8eaf0;
    --muted: #7b8399;
    --sidebar-w: 240px;
  }

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

  body {
    font-family: 'Barlow', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  /* TOPBAR */
  nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .logo {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    letter-spacing: -0.5px;
  }

  .logo span { color: var(--accent); }

  .logo-icon {
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
  }

  .logo-img {
    height: 36px;
    max-width: 160px;
    object-fit: contain;
    display: block;
  }

  .logo-text-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .nav-links {
    display: flex;
    gap: 4px;
    margin-left: 8px;
  }

  .nav-links a {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s;
  }

  .nav-links a:hover { color: var(--text); background: var(--surface2); }
  .nav-links a.active { color: var(--accent); }

  .nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    gap: 8px;
    width: 200px;
  }

  .search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13px;
    font-family: 'Barlow', sans-serif;
    width: 100%;
  }

  .search-box input::placeholder { color: var(--muted); }

  .btn {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 7px 18px;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
  }

  .btn-premium {
    background: var(--accent);
    color: #000;
  }

  .btn-premium:hover { background: #e0b014; transform: translateY(-1px); }

  .btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
  }

  .btn-outline:hover { border-color: var(--accent); color: var(--accent); }

  /* LAYOUT */
  .layout {
    display: flex;
    flex: 1;
  }

  /* SIDEBAR */
  aside {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    flex-shrink: 0;
    overflow-y: auto;
    height: calc(100vh - 56px);
    position: sticky;
    top: 56px;
  }

  .sidebar-section {
    margin-bottom: 24px;
  }

  .sidebar-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 18px;
    margin-bottom: 8px;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    cursor: pointer;
    transition: all 0.18s;
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
  }

  .sidebar-item:hover { background: var(--surface2); color: var(--text); }
  .sidebar-item.active { color: var(--text); background: var(--surface2); border-right: 2px solid var(--accent); }

  .league-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
  }

  .league-icon svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  /* MAIN CONTENT */
  main {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
  }

  /* BANNER */
  .banner {
    background: linear-gradient(135deg, #c0392b 0%, #1a2540 45%, #1e3a6e 100%);
    border-radius: 14px;
    padding: 28px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    border: 1px solid #2a3a5c;
  }

  .banner::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 180px;
    height: 180px;
    background: rgba(192,57,43,0.3);
    border-radius: 50%;
    filter: blur(60px);
  }

  .banner-text h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 26px;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
  }

  .banner-text p {
    font-size: 14px;
    color: #aab4cc;
    line-height: 1.5;
    max-width: 420px;
  }

  .banner-text p strong { color: var(--text); }
  .banner-text p .vip { color: var(--accent); font-weight: 700; }

  .banner-trophy {
    font-size: 80px;
    opacity: 0.9;
    line-height: 1;
    position: relative;
    z-index: 1;
  }

  .banner-badge {
    position: absolute;
    bottom: 14px;
    right: 36px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 60px;
    color: var(--accent);
    opacity: 0.15;
    letter-spacing: -4px;
    line-height: 1;
  }

  /* SECTION HEADER */
  .section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
  }

  .section-header h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.3px;
  }

  .live-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    50% { opacity: 0.8; box-shadow: 0 0 0 5px rgba(34,197,94,0); }
  }

  /* MATCH CARDS */
  .match-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
    transition: all 0.2s;
    cursor: pointer;
  }

  .match-card:hover {
    border-color: var(--accent);
    background: var(--surface2);
    transform: translateX(2px);
  }

  .match-league-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
  }

  .match-meta {
    min-width: 130px;
  }

  .match-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px;
  }

  .live-label { color: var(--green); }
  .time-label { color: var(--muted); }

  .match-competition {
    font-size: 11px;
    color: var(--muted);
    font-style: italic;
  }

  /* MATCH TEAMS - grid layout untuk score selalu center */
  .match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    flex: 1;
  }

  .team {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
  }

  .match-teams .team:first-child {
    justify-content: flex-end;
    text-align: right;
    flex-direction: row-reverse;
  }

  .match-teams .team:last-child {
    justify-content: flex-start;
    text-align: left;
  }

  .team-flag {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
  }

  .score-box {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 16px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text);
    min-width: 70px;
    text-align: center;
    flex-shrink: 0;
  }

  .score-box.live {
    border-color: var(--green);
    color: var(--green);
  }

  .btn-watch {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 9px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s;
    flex-shrink: 0;
    text-decoration: none;
  }

  .btn-watch-live {
    background: var(--green);
    color: #000;
  }
  .btn-watch-live:hover { background: #16a34a; transform: scale(1.03); }

  .btn-watch-upcoming {
    background: #ef4444;
    color: #fff;
  }
  .btn-watch-upcoming:hover { background: #c0392b; transform: scale(1.03); }

  .btn-watch-finished {
    background: #6b7280;
    color: #fff;
  }
  .btn-watch-finished:hover { background: #4b5563; transform: scale(1.03); }

  /* GRID FOR HOT MATCHES */
  .matches-list {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  /* TABS */
  .tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
  }

  .tab {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    color: var(--muted);
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    text-transform: uppercase;
  }

  .tab:hover { color: var(--text); }
  .tab.active { color: var(--accent); border-bottom-color: var(--accent); }

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

  /* FOOTER */
  footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
  }

  .flag-emoji { font-size: 20px; }

  /* ANIMATIONS */
  .match-card {
    animation: fadeUp 0.3s ease both;
  }

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

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


@media (max-width: 768px) {

  /* NAV */
  nav { padding: 0 14px; height: 52px; gap: 8px; z-index: 1000 !important; }
  .nav-links { display: none; }
  .search-box { display: none; }
  .btn-premium { padding: 6px 14px; font-size: 12px; }
  .btn-outline { padding: 6px 10px; font-size: 12px; }
  .logo { font-size: 18px; }
  .logo-icon { width: 24px; height: 24px; font-size: 13px; }
  .logo-img { height: 28px; }
  .mobile-hamburger {
    display: flex !important;
    align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 8px; cursor: pointer; color: var(--text); flex-shrink: 0;
  }

  /* SIDEBAR DRAWER */
  .layout { flex-direction: column; }
  aside {
    display: block !important;
    position: fixed; top: 52px; left: 0; bottom: 0; width: 260px;
    z-index: 999; background: var(--surface); border-right: 1px solid var(--border);
    transform: translateX(-100%); transition: transform 0.3s ease;
    overflow-y: auto; padding: 10px 0;
  }
  aside.mobile-open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.5); }
  .sidebar-label { padding: 6px 16px 4px; font-size: 10px; }
  .sidebar-item { padding: 10px 16px; font-size: 13px; gap: 10px; flex-direction: row; border-left: 2px solid transparent; }
  .sidebar-item.active { border-left-color: var(--accent); background: var(--surface2); }
  .league-icon { width: 22px; height: 22px; flex-shrink: 0; }

  main { padding: 12px; }

  /* BANNER */
  .banner { padding: 14px 16px; margin-bottom: 14px; border-radius: 10px; }
  .banner-text h2 { font-size: 16px; margin-bottom: 6px; }
  .banner-text p { font-size: 12px; }
  .banner-trophy { font-size: 36px; }
  .banner-badge { font-size: 30px; }

  .section-header { margin-bottom: 10px; }
  .section-header h3 { font-size: 15px; }

  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; gap: 0; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; font-size: 12px; padding: 8px 14px; }

  /* MATCH CARD MOBILE */
  .matches-list { gap: 0; display: flex; flex-direction: column; }

  .match-card {
    display: flex !important;
    flex-direction: column !important;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px !important;
    padding: 12px 14px;
    margin-bottom: 8px;
    gap: 6px;
    transform: none !important;
    animation: none !important;
    cursor: pointer;
  }
  .match-card:hover { background: var(--surface2); transform: none !important; }

  .match-league-icon { display: none; }
  .match-meta {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: unset;
    max-width: unset;
  }
  .match-status { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
  .live-label { font-size: 12px; font-weight: 700; }
  .live-dot { width: 7px; height: 7px; }
  .time-label { font-size: 12px; font-weight: 600; color: var(--text); }
  .match-competition { font-size: 12px; color: var(--muted); font-style: italic; }

  .match-teams {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .match-teams .team:first-child {
    justify-content: flex-end;
    text-align: right;
    flex-direction: row-reverse;
  }

  .match-teams .team:last-child {
    justify-content: flex-start;
    text-align: left;
  }

  .team {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    min-width: 0;
  }

  .team > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .team-flag { font-size: 18px; flex-shrink: 0; }

  .score-box {
    font-size: 15px !important;
    padding: 5px 10px !important;
    min-width: 54px !important;
    border-radius: 8px !important;
    letter-spacing: 2px;
    flex-shrink: 0;
    font-weight: 700;
    text-align: center;
  }
  .score-box.live { color: var(--green) !important; border-color: rgba(34,197,94,0.4) !important; }

  .btn-watch {
    padding: 9px 14px !important;
    font-size: 12px !important;
    flex-shrink: 0;
    border-radius: 8px !important;
    gap: 5px;
    white-space: nowrap;
    min-width: 80px;
    justify-content: center;
    align-self: center;
    margin-top: 4px;
  }
  .btn-watch svg { width: 11px; height: 11px; }

  footer { font-size: 12px; padding: 14px; text-align: center; margin-bottom: 10px; }
}

.team-flag-img {
    font-size: 24px !important;
    line-height: 1 !important;
    display: inline-block !important;
    flex-shrink: 0;
}

@media (min-width: 769px) {
  .mobile-hamburger { display: none !important; }
}

@media (max-width: 400px) {
  .team { font-size: 12px; }
  .team-flag { font-size: 16px; }
  .score-box { font-size: 13px !important; min-width: 46px !important; }
  .btn-watch { min-width: 70px; padding: 8px 10px !important; }
  .banner-trophy { display: none; }
}

@media (max-width: 480px) { .hide-mobile { display: none; } }