/* TollyMad Sports Main Site Stylesheet - Cloudflare Pages Ready */

:root {
  --bg-main: #070c16;
  --bg-[#0b1220]: #0b1220;
  --bg-card: #0e172a;
  --bg-card-hover: #132038;
  --accent-cyan: #06b6d4;
  --accent-blue: #0066ff;
  --accent-[#0088cc]: #0088cc;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-cyan: rgba(6, 182, 212, 0.25);
  --border-slate: rgba(51, 65, 85, 0.7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(9, 15, 27, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-cyan);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo-container {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(0, 102, 255, 0.25));
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.brand-logo {
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.6));
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 900;
  background: linear-gradient(to right, #22d3ee, #e0f2fe, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-admin {
  background: #111c2e;
  color: #22d3ee;
  border: 1px solid var(--border-cyan);
}

.btn-admin:hover {
  background: #172640;
  color: #ffffff;
  border-color: #22d3ee;
}

.btn-telegram {
  background: #0088cc;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4);
}

.btn-telegram:hover {
  background: #0099e6;
  transform: translateY(-1px);
}

/* App Install Banner */
.app-banner {
  max-width: 1280px;
  margin: 1.5rem auto 0.5rem;
  padding: 0 1rem;
}

.app-banner-btn {
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: linear-gradient(to right, #0066ff, #0052cc, #0066ff);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.1rem;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 102, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-transform: uppercase;
}

/* Container & Filter Pills */
.main-card {
  max-width: 1280px;
  margin: 1rem auto;
  padding: 1.5rem;
  background-color: #0b1220;
  border: 1px solid var(--border-slate);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-slate);
}

.card-title {
  font-size: 1.35rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #111c2e;
  color: #94a3b8;
  border: 1px solid var(--border-slate);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.category-pill.active {
  background: linear-gradient(135deg, #0891b2, #2563eb);
  color: #ffffff;
  border-color: #22d3ee;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.category-pill.active-live {
  background: linear-gradient(135deg, #dc2626, #e11d48);
  color: #ffffff;
  border-color: #f87171;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.badge-count {
  padding: 0.15rem 0.5rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 9999px;
  font-size: 0.7rem;
}

/* Match Cards Grid */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.match-card {
  position: relative;
  background: linear-gradient(to bottom, #111b2e, #0c1322);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 20px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.match-card:hover {
  border-color: rgba(6, 182, 212, 0.6);
  transform: translateY(-2px);
}

.tag-ribbon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(to right, #f59e0b, #facc15, #f59e0b);
  color: #020617;
  font-weight: 900;
  font-size: 0.65rem;
  text-transform: uppercase;
  padding: 0.2rem 1rem;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.league-tag {
  font-size: 0.7rem;
  font-weight: 800;
  background: #1e293b;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  color: #cbd5e1;
}

.live-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 900;
}

.teams-vs-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.5rem 0;
}

.team-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.team-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #020617;
  border: 2px solid #334155;
  padding: 0.35rem;
  object-fit: contain;
}

.team-name {
  font-size: 0.8rem;
  font-weight: 800;
  margin-top: 0.4rem;
  color: #f1f5f9;
}

.vs-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1e293b;
  color: #94a3b8;
  font-weight: 900;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-slate);
}

.btn-watch {
  background: linear-gradient(to right, #0891b2, #0284c7, #2563eb);
  color: #ffffff;
  padding: 0.45rem 1.25rem;
  border-radius: 12px;
  font-weight: 900;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-box {
  background: #0c1424;
  border: 1px solid var(--border-cyan);
  border-radius: 20px;
  width: 100%;
  max-width: 800px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.8);
}
