@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@400;500;600;700;800&display=swap');

/* ── TOKENS ─────────────────────────────── */
:root {
  --bg:        #080c14;
  --surface:   #101520;
  --card:      #141a28;
  --card2:     #1a2035;
  --border:    #1f2a40;
  --border2:   #263045;
  --accent:    #e63946;
  --accent2:   #ff6b74;
  --primary:   #3b82f6;
  --gold:      #f59e0b;
  --green:     #22c55e;
  --text:      #edf2f7;
  --muted:     #64748b;
  --muted2:    #94a3b8;
  --nav-h:     72px;
  --header-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

/* ── RESET ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  padding-bottom: calc(var(--nav-h) + 16px);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}

/* ── SCROLLBARS ──────────────────────────── */
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

/* ── BRAND TYPOGRAPHY ────────────────────── */
.brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 2px;
  color: var(--text);
  line-height: 1;
}
.brand em { color: var(--accent); font-style: normal; }

/* ── HEADER ──────────────────────────────── */
.main-header {
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--header-shadow);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  position: relative;
}

.header-action {
  position: absolute;
  right: 20px;
  color: var(--muted2);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.header-action:active { color: var(--text); background: var(--border); }

/* ── SEARCH PANEL ────────────────────────── */
.search-panel {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 0 16px 12px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 12px;
  animation: slideDown 0.2s ease;
}
.search-panel.open { display: flex; }
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
}
.search-input::placeholder { color: var(--muted); }

@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ── TABS ────────────────────────────────── */
.tabs-row {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
}

.tab-btn {
  flex: 1;
  padding: 9px 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: var(--card);
  color: var(--muted2);
  transition: all 0.2s;
}
.tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(230,57,70,0.35);
}

/* ── CONTAINER ───────────────────────────── */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ── SECTION TITLE ───────────────────────── */
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 2px;
  color: var(--text);
  margin: 22px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

/* ── MATCH CARD (list style) ─────────────── */
.match-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}
.match-card:active { transform: scale(0.98); border-color: var(--border2); }

.match-card-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 8px;
}

.match-league {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

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

.match-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.team-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  padding: 3px;
  object-fit: contain;
  flex-shrink: 0;
}

.team-name {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-score {
  width: 72px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--muted2);
  background: var(--bg);
  padding: 6px 4px;
  border-radius: 8px;
  flex-shrink: 0;
}
.match-score.live { color: var(--accent); animation: blink 1.8s infinite; }

@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── LIVE BADGE ──────────────────────────── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(230,57,70,0.12);
  border: 1px solid rgba(230,57,70,0.3);
  color: var(--accent);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}
.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1s infinite;
}

/* ── BOTTOM NAV ──────────────────────────── */
.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 300;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 10px;
  transition: color 0.2s;
  text-decoration: none;
}
.nav-item i { font-size: 1.15rem; }
.nav-item.active { color: var(--accent); }

/* ── RIPPLE ──────────────────────────────── */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-anim 0.55s linear;
  background: rgba(255,255,255,0.12);
  pointer-events: none;
}
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }



/* ── GATEKEEPER MODAL ────────────────────── */
#gatekeeper-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,12,20,0.88);
  backdrop-filter: blur(8px);
  z-index: 9000;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.gk-card {
  width: 100%;
  max-width: 340px;
  text-align: center;
  animation: fadeUp 0.5s ease;
}

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

.gk-icon-wrap {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.8rem;
  color: var(--gold);
  animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.gk-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 8px;
}
.gk-text {
  font-size: 0.9rem;
  color: var(--muted2);
  line-height: 1.6;
  margin-bottom: 28px;
}

.gk-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), #c1121f);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(230,57,70,0.4);
  animation: pulse-btn 2s infinite;
}
.gk-btn:active { transform: scale(0.98); }
@keyframes pulse-btn {
  0% { box-shadow: 0 0 0 0 rgba(230,57,70,0.5); }
  70% { box-shadow: 0 0 0 14px rgba(230,57,70,0); }
  100% { box-shadow: 0 0 0 0 rgba(230,57,70,0); }
}

/* ── TELEGRAM BTN ────────────────────────── */
.tg-btn {
  position: fixed;
  bottom: calc(var(--nav-h) + 14px);
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #229ED9, #0088cc);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,136,204,0.5);
  z-index: 500;
  border: 2px solid rgba(255,255,255,0.15);
  animation: pulse-tg 2.5s infinite;
}
@keyframes pulse-tg {
  0% { box-shadow: 0 0 0 0 rgba(34,158,217,0.6); }
  70% { box-shadow: 0 0 0 12px rgba(34,158,217,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,158,217,0); }
}

/* ── EMPTY STATE ─────────────────────────── */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
}
.empty-state i { font-size: 2rem; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 0.85rem; line-height: 1.6; }
