/* ===== gol24 — Football & NBA Streams ===== */
:root {
  --bg-dark: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #3fb950;
  --accent-dim: #238636;
  --live: #f85149;
  --nba-orange: #f0883e;
  --football-green: #3fb950;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --font: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ----- Header ----- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  color: var(--accent);
  font-size: 1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-card);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(63, 185, 80, 0.12);
}

.lang-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.lang-select {
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  min-width: 8rem;
}

.lang-select:hover,
.lang-select:focus {
  border-color: var(--accent);
  outline: none;
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.menu-btn span {
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(63, 185, 80, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(240, 136, 62, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, var(--bg-dark) 0%, #0d1117 100%);
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 1;
}

.hero-badge {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 420px;
  margin: 0 auto;
}

/* ----- Sections ----- */
.section {
  padding: 2.5rem 1.5rem;
}

.section-nba {
  background: linear-gradient(180deg, transparent 0%, rgba(240, 136, 62, 0.04) 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ----- Tabs ----- */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.tab-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.tab-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text);
}

#nba .tab-btn.active {
  background: rgba(240, 136, 62, 0.2);
  border-color: var(--nba-orange);
}

/* ----- Stream table ----- */
.stream-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.stream-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  table-layout: fixed;
}

.stream-table th,
.stream-table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.stream-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card-hover);
}

.stream-table th:first-child,
.stream-table .td-match {
  width: 50%;
}

.stream-table th:nth-child(2),
.stream-table .td-league {
  width: 28%;
}

.stream-table th.th-watch,
.stream-table .td-watch {
  text-align: right;
  width: 22%;
}

.stream-table td {
  border-bottom: 1px solid var(--border);
}

.stream-table tbody tr.stream-row {
  cursor: pointer;
  transition: background 0.15s;
}

.stream-table tbody tr.stream-row:hover {
  background: var(--bg-card-hover);
}

.stream-table .td-match {
  font-weight: 500;
}

.stream-table .td-league {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.stream-table .td-watch {
  text-align: right;
}

.btn-watch {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-watch:hover {
  background: var(--accent);
  color: #fff;
}

.stream-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ----- Footer ----- */
.footer {
  margin-top: 3rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ----- Modal ----- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s;
}

.modal.is-open .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-body {
  padding: 1.5rem;
}

.stream-embed {
  aspect-ratio: 16 / 9;
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.stream-placeholder {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.stream-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.stream-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.modal-links .modal-body {
  min-width: 280px;
}

.stream-embed-in-modal {
  aspect-ratio: 16 / 9;
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1rem;
}

.stream-embed-in-modal iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.btn-back-links {
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
}

.btn-back-links:hover {
  color: var(--text);
  border-color: var(--accent);
}

.modal-links-intro {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.links-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn-link-option {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-link-option:hover {
  background: var(--accent);
  color: #fff;
}

.stream-note-links {
  margin-bottom: 0;
}

/* ----- Mobile ----- */
@media (max-width: 768px) {
  .header-inner {
    justify-content: center;
    position: relative;
  }

  .header-inner .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .nav {
    display: none;
  }

  .menu-btn {
    display: none;
  }

  .stream-table-wrap {
    margin: 0 -0.5rem;
  }

  .lang-wrap {
    width: 100%;
  }

  .lang-select {
    flex: 1;
    min-width: 0;
  }
}

/* ----- RTL (e.g. Arabic) ----- */
[dir="rtl"] .header-inner {
  direction: rtl;
}

[dir="rtl"] .nav {
  direction: rtl;
}

@media (max-width: 768px) {
  [dir="rtl"] .nav {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
  }

  [dir="rtl"] .nav.is-open {
    transform: translateX(0);
  }
}
