@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;800&family=Inter:wght@400;600;700&display=swap');

:root {
  --hub-pitch: #1b4332;
  --hub-pitch-light: #2d6a4f;
  --hub-gold: #f4a261;
  --hub-cyan: #00f5ff;
  --hub-bg: #02040a;
  --hub-card: rgba(255,255,255,0.05);
  --hub-border: rgba(0,245,255,0.15);
  --hub-text: #f8f9fa;
  --hub-muted: rgba(255,255,255,0.55);
  --hub-live: #ff4757;
  --hub-radius: 16px;
}

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

body.soccer-hub-body {
  font-family: 'Inter', sans-serif;
  background: var(--hub-bg);
  color: var(--hub-text);
  min-height: 100vh;
  overflow-x: hidden;
}

.hub-bg-pitch {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, transparent 0%, rgba(27,67,50,0.25) 40%, rgba(27,67,50,0.4) 100%),
    repeating-linear-gradient(90deg, rgba(45,106,79,0.08) 0, rgba(45,106,79,0.08) 80px, transparent 80px, transparent 160px);
}

.hub-bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 10%, rgba(0,245,255,0.08), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(244,162,97,0.06), transparent 40%);
  pointer-events: none;
}

/* Header */
.hub-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(2,4,10,0.85);
  border-bottom: 1px solid var(--hub-border);
  padding: 12px 16px 0;
}

.hub-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hub-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.hub-brand-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.hub-share-page-btn {
  flex-shrink: 0;
  margin-top: 4px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--hub-cyan);
  background: rgba(0,245,255,0.08);
  border: 1px solid rgba(0,245,255,0.35);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.hub-share-page-btn:hover {
  background: rgba(0,245,255,0.15);
  border-color: var(--hub-cyan);
}

.hub-brand-logo,
.hub-brand .site-logo-text {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 3vw, 26px);
  letter-spacing: 3px;
  color: var(--hub-cyan);
  text-shadow: 0 0 12px rgba(0,245,255,0.5);
}

.hub-brand-sub {
  font-size: 12px;
  color: var(--hub-gold);
  letter-spacing: 1px;
  margin-top: 2px;
}

.hub-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}
.hub-tabs::-webkit-scrollbar { display: none; }

.hub-tab {
  flex: 0 0 auto;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  padding: 8px 14px;
  border: 1px solid var(--hub-border);
  border-radius: 999px;
  background: var(--hub-card);
  color: var(--hub-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.hub-tab:hover { color: var(--hub-text); border-color: rgba(0,245,255,0.35); }
.hub-tab.active {
  color: var(--hub-bg);
  background: linear-gradient(135deg, var(--hub-cyan), #7bff00);
  border-color: transparent;
  font-weight: 700;
}

/* Hero */
.hub-hero {
  padding: 24px 16px 8px;
  max-width: 1100px;
  margin: 0 auto;
}

.hub-hero-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: var(--hub-radius);
  padding: 20px;
}

.hub-hero-icon {
  font-size: 48px;
  filter: drop-shadow(0 0 12px rgba(244,162,97,0.5));
}

.hub-hero-text h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(16px, 3vw, 22px);
  font-weight: 700;
  line-height: 1.3;
}

.hub-hero-text p {
  font-size: 13px;
  color: var(--hub-muted);
  margin-top: 6px;
}

.hub-hero-stats {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.hub-stat-pill {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(27,67,50,0.5);
  border: 1px solid rgba(45,106,79,0.6);
}
.hub-stat-pill strong { color: var(--hub-gold); }

/* Main */
.hub-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 16px 80px;
}

.hub-panel[hidden] { display: none !important; }
.hub-panel.active { display: block; }

.hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.hub-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--hub-muted);
  font-family: 'Orbitron', sans-serif;
}
.hub-filter select,
.hub-filter input[type="search"],
.hub-filter input[type="date"] {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--hub-border);
  background: rgba(0,0,0,0.4);
  color: var(--hub-text);
  font-family: 'Inter', sans-serif;
  min-width: 160px;
}
.hub-filter input[type="search"]::placeholder {
  color: var(--hub-muted);
  opacity: 0.7;
}
.hub-filter input[type="date"] {
  color-scheme: dark;
  min-width: 150px;
}
.hub-filter-search {
  flex: 1 1 140px;
  min-width: 140px;
}
.hub-filter-clear {
  align-self: flex-end;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--hub-border);
  background: rgba(244,162,97,0.12);
  color: var(--hub-gold);
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.hub-filter-clear:hover {
  background: rgba(244,162,97,0.22);
  border-color: var(--hub-gold);
}

.hub-hint, .hub-subhead {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  color: var(--hub-muted);
  margin-bottom: 12px;
}
.hub-subhead { margin-top: 24px; color: var(--hub-gold); }

/* Match cards */
.hub-match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-match-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: var(--hub-radius);
  transition: border-color 0.2s;
}
.hub-match-card:hover { border-color: rgba(0,245,255,0.3); }
.hub-match-card.live { border-color: rgba(255,71,87,0.5); box-shadow: 0 0 20px rgba(255,71,87,0.1); }
.hub-match-card.finished { border-color: rgba(244,162,97,0.35); }
.hub-match-card--detail {
  cursor: pointer;
}
.hub-match-card--detail:focus-visible {
  outline: 2px solid var(--hub-cyan);
  outline-offset: 2px;
}
.hub-match-detail-hint {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 10px;
  color: var(--hub-muted);
  letter-spacing: 0.3px;
}

.hub-ft-badge {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--hub-gold);
  margin-bottom: 4px;
  letter-spacing: 1px;
}
.hub-ht-badge {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--hub-gold);
  margin-bottom: 4px;
}
.hub-match-clock {
  font-size: 10px;
  color: var(--hub-live);
  margin-top: 2px;
}

.hub-match-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--hub-muted);
  margin-bottom: 4px;
}
.hub-match-meta span {
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: 6px;
}
.hub-time-label {
  font-size: 10px;
  color: var(--hub-muted);
  font-weight: 400;
}
.hub-time-utc {
  color: var(--hub-gold) !important;
  font-size: 10px;
}

.hub-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}
.hub-team.away { flex-direction: row-reverse; text-align: right; }
.hub-team img {
  width: 32px;
  height: 22px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.hub-team-placeholder { opacity: 0.6; font-style: italic; }

.hub-score {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  min-width: 64px;
}
.hub-score .vs { font-size: 12px; color: var(--hub-muted); font-weight: 400; }

.hub-live-badge {
  display: inline-block;
  background: var(--hub-live);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  animation: pulse-live 1.5s ease-in-out infinite;
}
@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Standings */
.hub-standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.hub-group-card {
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: var(--hub-radius);
  overflow: hidden;
}
.hub-group-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  padding: 12px 14px;
  background: rgba(27,67,50,0.5);
  border-bottom: 1px solid var(--hub-border);
  color: var(--hub-gold);
}

.hub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.hub-table th, .hub-table td {
  padding: 8px 6px;
  text-align: center;
}
.hub-table th {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  color: var(--hub-muted);
  border-bottom: 1px solid var(--hub-border);
}
.hub-table td:first-child, .hub-table th:first-child { text-align: left; padding-left: 12px; }
.hub-table tr.qualify td { background: rgba(45,106,79,0.2); }
.hub-table tr:hover td { background: rgba(255,255,255,0.03); }

/* Teams grid */
.hub-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.hub-team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: var(--hub-radius);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.hub-team-card:hover {
  border-color: var(--hub-cyan);
  transform: translateY(-2px);
}
.hub-team-card img {
  width: 48px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.hub-team-card h3 { font-size: 13px; font-weight: 600; }
.hub-team-card span { font-size: 11px; color: var(--hub-muted); }

/* History */
.hub-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-history-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: var(--hub-radius);
}
.hub-history-year {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--hub-gold);
}
.hub-history-host { font-size: 12px; color: var(--hub-muted); margin-top: 2px; }
.hub-history-winner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.hub-history-winner img,
.hub-history-runner img {
  width: 48px;
  height: 32px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.hub-history-flag-fallback { font-size: 28px; line-height: 1; }
.hub-history-name { line-height: 1.3; }
.hub-history-final { text-align: right; }
.hub-history-score {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  color: var(--hub-cyan);
  display: block;
}
.hub-history-runner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 11px;
  color: var(--hub-muted);
  margin-top: 6px;
}

/* News */
.hub-news-list { display: flex; flex-direction: column; gap: 10px; }

.hub-news-card {
  padding: 14px 16px;
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: var(--hub-radius);
}
.hub-news-card a {
  color: var(--hub-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
}
.hub-news-card a:hover { color: var(--hub-cyan); }
.hub-news-meta {
  font-size: 11px;
  color: var(--hub-muted);
  margin-top: 6px;
}

/* Modal */
.hub-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hub-modal-overlay[hidden] { display: none !important; }

.hub-modal {
  position: relative;
  width: min(480px, 100%);
  max-height: 80vh;
  overflow-y: auto;
  background: #0a1628;
  border: 1px solid var(--hub-border);
  border-radius: var(--hub-radius);
  padding: 24px;
}
.hub-modal--wide { width: min(560px, 100%); }

.hub-match-detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.hub-match-detail-status {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--hub-gold);
  margin: 0;
}
.hub-share-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--hub-cyan);
  background: rgba(0,245,255,0.08);
  border: 1px solid rgba(0,245,255,0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.hub-share-btn:hover {
  background: rgba(0,245,255,0.15);
  border-color: var(--hub-cyan);
}
.hub-match-detail-status.live { color: var(--hub-live); }
.hub-match-detail-status.finished { color: var(--hub-gold); }

.hub-match-detail h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(15px, 3vw, 18px);
  margin-bottom: 16px;
  line-height: 1.3;
}

.hub-match-detail-scoreline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  border: 1px solid var(--hub-border);
}
.hub-match-detail-scoreline--vs { padding: 20px 16px; }

.hub-match-detail-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
}
.hub-match-detail-team.away { justify-self: end; }
.hub-match-detail-team img {
  width: 48px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
}

.hub-match-detail-score {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
}
.hub-match-detail-score.vs {
  font-size: 16px;
  color: var(--hub-muted);
  font-weight: 600;
}

.hub-match-detail-ht {
  text-align: center;
  font-size: 12px;
  color: var(--hub-muted);
  margin-bottom: 16px;
}

.hub-match-detail-meta {
  margin-top: 8px;
}
.hub-match-detail-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.hub-match-detail-row dt {
  color: var(--hub-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hub-match-detail-row dd { margin: 0; }

.hub-toolbar--teams {
  margin-bottom: 14px;
}

.hub-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  padding: 10px 18px;
  background: rgba(10,22,40,0.95);
  border: 1px solid var(--hub-border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--hub-text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  pointer-events: none;
}
.hub-toast[hidden] { display: none !important; }

.hub-match-events {
  margin: 16px 0;
}
.hub-match-events h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--hub-gold);
  margin-bottom: 8px;
}
.hub-match-events h3 + .hub-match-event-list {
  margin-bottom: 14px;
}
.hub-match-event-list {
  list-style: none;
}
.hub-match-event {
  display: grid;
  grid-template-columns: 44px 28px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.hub-match-event-min {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  color: var(--hub-muted);
  text-align: right;
}
.hub-match-event-icon { font-size: 16px; line-height: 1; }
.hub-match-event-body strong { font-weight: 600; }
.hub-match-event-team {
  color: var(--hub-muted);
  font-size: 12px;
}
.hub-match-event--red .hub-match-event-body strong { color: #ff6b6b; }
.hub-match-event--yellow .hub-match-event-body strong { color: #ffd93d; }
.hub-match-events-empty {
  margin: 12px 0 16px;
  font-size: 12px;
  color: var(--hub-muted);
  text-align: center;
  font-style: italic;
}

.hub-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--hub-muted);
  font-size: 18px;
  cursor: pointer;
}
.hub-modal-close:hover { color: var(--hub-text); }

.hub-squad-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.hub-squad-header img { width: 56px; height: 38px; border-radius: 4px; }
.hub-squad-header h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
}

.hub-squad-list { list-style: none; }
.hub-squad-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.hub-squad-list .num {
  font-family: 'Orbitron', sans-serif;
  color: var(--hub-gold);
  min-width: 28px;
}
.hub-squad-list .pos { color: var(--hub-muted); font-size: 11px; }

.hub-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--hub-muted);
  font-size: 14px;
}

.hub-loading {
  text-align: center;
  padding: 32px;
  color: var(--hub-cyan);
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
}

/* Footer */
.hub-footer {
  text-align: center;
  padding: 24px 16px 32px;
  border-top: 1px solid var(--hub-border);
  font-size: 12px;
  color: var(--hub-muted);
}
.hub-disclaimer { max-width: 640px; margin: 0 auto 12px; line-height: 1.5; }
.hub-footer a { color: var(--hub-cyan); text-decoration: none; }
.hub-footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .hub-match-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hub-team, .hub-team.away { flex-direction: column; text-align: center; }
  .hub-history-card { grid-template-columns: 1fr; text-align: center; }
  .hub-history-winner { justify-content: center; }
}
