/* ================================================================
   PredictPro AI — Complete Dark Sports Theme
   This file is the single source of truth for all public + admin styles.
   ================================================================ */

/* ── CSS Variables ─────────────────────────────────────────────── */
:root {
  --green:      #22c55e;
  --green-d:    #16a34a;
  --green-glow: rgba(34,197,94,.25);
  --gold:       #f59e0b;
  --red:        #ef4444;
  --blue:       #3b82f6;
  --purple:     #a78bfa;
  --navy:       #0b1120;
  --navy-2:     #111827;
  --navy-3:     #1e293b;
  --slate:      #0d1117;
  --border:     rgba(255,255,255,.07);
  --border-d:   rgba(255,255,255,.07);
  --radius:     14px;
  --radius-sm:  8px;
  --shadow:     0 4px 24px rgba(0,0,0,.35);
  --shadow-lg:  0 12px 48px rgba(0,0,0,.5);
  --text:       #e2e8f0;
  --text-m:     #94a3b8;
  --text-dim:   #64748b;
  --card-bg:    #111827;
}

/* ── Base ──────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #080c14;
  color: #e2e8f0;
  line-height: 1.6;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* Override Bootstrap light theme completely */
.text-muted     { color: #94a3b8 !important; }
.text-white     { color: #f1f5f9 !important; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fw-900 { font-weight: 900; }
.text-green { color: var(--green) !important; }
.text-gold  { color: var(--gold)  !important; }
.text-red   { color: var(--red)   !important; }

/* ── Typography ────────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { color: #f1f5f9; }
p { color: #cbd5e1; }
small { color: #94a3b8; }

/* ── Public Navbar ─────────────────────────────────────────────── */
.navbar-pp {
  background: rgba(8,12,20,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(34,197,94,.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-link { color: #94a3b8 !important; font-size: .875rem; padding: .5rem .85rem !important; }
.nav-link:hover, .nav-link.active { color: #fff !important; }
.nav-link.active { color: var(--green) !important; font-weight: 600; }
.navbar-brand { color: #fff !important; font-weight: 800; letter-spacing: -.02em; }
.tier-chip { font-size: .65rem; font-weight: 800; padding: .15rem .5rem; border-radius: 50px; }
.dropdown-menu {
  background: #111827 !important;
  border: 1px solid rgba(255,255,255,.08) !important;
}
.dropdown-item { color: #e2e8f0 !important; }
.dropdown-item:hover { background: rgba(255,255,255,.06) !important; }
.dropdown-divider { border-color: rgba(255,255,255,.08) !important; }
.dropdown-item-text { color: #64748b !important; }
.navbar-toggler { border-color: rgba(255,255,255,.2) !important; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn-green {
  background: var(--green);
  color: #050810;
  border: none;
  font-weight: 700;
  border-radius: 50px;
  padding: .55rem 1.5rem;
  transition: all .2s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.btn-green:hover {
  background: var(--green-d);
  color: #050810;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--green-glow);
}
.btn-outline-green {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
  font-weight: 700;
  border-radius: 50px;
  padding: .5rem 1.5rem;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.btn-outline-green:hover {
  background: var(--green);
  color: #050810;
}
.btn-outline-secondary {
  border-color: rgba(255,255,255,.18) !important;
  color: #94a3b8 !important;
}
.btn-outline-secondary:hover {
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
}

/* ── Cards ─────────────────────────────────────────────────────── */
.pp-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.pp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pp-card-dark {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
}

/* ── Bootstrap overrides for dark site ─────────────────────────── */
.form-control, .form-select {
  background: #0b1120 !important;
  border-color: rgba(255,255,255,.1) !important;
  color: #f1f5f9 !important;
  border-radius: var(--radius-sm) !important;
}
.form-control::placeholder { color: #475569 !important; }
.form-control:focus, .form-select:focus {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 3px rgba(34,197,94,.12) !important;
  outline: none !important;
}
.form-label { color: #94a3b8; font-size: .85rem; font-weight: 600; }
.form-check-input { background-color: #0b1120 !important; border-color: rgba(255,255,255,.2) !important; }
.form-check-input:checked { background-color: var(--green) !important; border-color: var(--green) !important; }
.input-group-text {
  background: #111827 !important;
  border-color: rgba(255,255,255,.1) !important;
  color: #64748b !important;
}
.alert {
  border-radius: 10px !important;
}
.alert-success { background: rgba(34,197,94,.1) !important; border-color: rgba(34,197,94,.25) !important; color: #4ade80 !important; }
.alert-danger  { background: rgba(239,68,68,.1)  !important; border-color: rgba(239,68,68,.25)  !important; color: #fca5a5 !important; }
.alert-warning { background: rgba(245,158,11,.1) !important; border-color: rgba(245,158,11,.25) !important; color: #fcd34d !important; }
.alert-info    { background: rgba(59,130,246,.1)  !important; border-color: rgba(59,130,246,.25)  !important; color: #93c5fd !important; }
.modal-content {
  background: #1e293b !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  color: #e2e8f0 !important;
}
.modal-header, .modal-footer { border-color: rgba(255,255,255,.08) !important; }
.modal-title { color: #f1f5f9 !important; }
.btn-close { filter: invert(1) opacity(.6); }
.table { color: #cbd5e1; --bs-table-bg: transparent; --bs-table-border-color: rgba(255,255,255,.06); }
.table th { color: #64748b !important; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.badge.bg-secondary { background: #334155 !important; }
.nav-tabs { border-color: rgba(255,255,255,.08); }
.nav-tabs .nav-link { color: #64748b; border-color: transparent; }
.nav-tabs .nav-link.active { background: #111827; border-color: rgba(255,255,255,.1); color: #fff; }
.pagination .page-link { background: #111827; border-color: rgba(255,255,255,.08); color: #94a3b8; }
.pagination .page-item.active .page-link { background: var(--green); border-color: var(--green); color: #050810; }

/* ── Live Ticker (public) ──────────────────────────────────────── */
.live-ticker {
  background: #0d1117;
  border-bottom: 1px solid rgba(34,197,94,.15);
  overflow: hidden;
  height: 40px;
  display: flex;
  align-items: center;
}
.live-ticker-label {
  background: var(--green);
  color: #050810;
  font-weight: 800;
  font-size: .7rem;
  padding: .25rem .75rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-shrink: 0;
  height: 100%;
}
.live-ticker-label .dot {
  width: 7px; height: 7px; background: #050810;
  border-radius: 50%; animation: blink 1s ease infinite;
}
@keyframes blink { 50%{opacity:0} }
.ticker-scroll { display:flex; gap:0; animation:scroll-x 30s linear infinite; white-space:nowrap; }
.ticker-scroll:hover { animation-play-state:paused; }
@keyframes scroll-x { from{transform:translateX(0)} to{transform:translateX(-50%)} }
.ticker-item {
  color: #e2e8f0; font-size: .8rem; padding: 0 1.5rem;
  border-right: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: .5rem;
}
.ticker-score { color: var(--green); font-weight: 700; }
.ticker-live  { color: var(--red); font-weight: 800; font-size: .65rem; }

/* ── Match Cards (predictions page) ───────────────────────────── */
.match-card {
  background: linear-gradient(135deg, #0d1117, #111827);
  border: 1px solid rgba(34,197,94,.12);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
  position: relative;
}
.match-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--green), #3b82f6, var(--green));
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
.match-card:hover { border-color: rgba(34,197,94,.35); box-shadow: 0 0 30px rgba(34,197,94,.1); }
.match-card .league-badge {
  background: rgba(34,197,94,.1);
  color: var(--green);
  padding: .2rem .6rem;
  border-radius: 50px;
  font-size: .7rem;
  font-weight: 700;
}
.match-card .team-name { color: #fff; font-weight: 700; font-size: .95rem; }
.match-card .vs-badge {
  background: rgba(255,255,255,.05);
  color: #475569;
  padding: .2rem .5rem;
  border-radius: 6px;
  font-size: .75rem;
}
.prob-bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.06); overflow: hidden; }
.prob-bar-home { height: 100%; background: var(--green); border-radius: 3px; transition: width .6s; }
.prob-bar-draw  { height: 100%; background: var(--gold); border-radius: 3px; transition: width .6s; }
.prob-bar-away  { height: 100%; background: var(--blue); border-radius: 3px; transition: width .6s; }

/* Tier badges */
.tier-badge { padding: .2rem .65rem; border-radius: 50px; font-size: .65rem; font-weight: 800; }
.tier-free    { background: rgba(100,116,139,.15); color: #94a3b8; }
.tier-premium { background: rgba(34,197,94,.15); color: var(--green); }
.tier-vip     { background: rgba(245,158,11,.15); color: var(--gold); }

/* Confidence ring */
.confidence-ring {
  width: 56px; height: 56px; border-radius: 50%;
  background: conic-gradient(var(--green) var(--pct,0%), rgba(255,255,255,.06) 0);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.confidence-ring::before {
  content: ''; position: absolute; inset: 6px; background: #1e293b; border-radius: 50%;
}
.confidence-ring span { position: relative; z-index: 1; font-weight: 800; font-size: .75rem; color: #fff; }

/* Locked overlay */
.locked-overlay { position: relative; overflow: hidden; }
.locked-overlay::after {
  content: '🔒'; position: absolute; inset: 0;
  background: rgba(11,17,32,.88); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; border-radius: var(--radius);
}

/* ── Ads ────────────────────────────────────────────────────────── */
.ad-slot { position: relative; overflow: hidden; border-radius: var(--radius); }
.ad-slot img, .ad-slot video { border-radius: var(--radius); }
.ad-label {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.55); color: rgba(255,255,255,.5);
  font-size: .6rem; padding: .15rem .4rem; border-radius: 4px;
  pointer-events: none;
}
.ad-banner  { width: 100%; min-height: 90px;  background: #111827; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.ad-sidebar { width: 100%; min-height: 250px; background: #111827; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }

/* ── League cards ───────────────────────────────────────────────── */
.league-card {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  transition: all .2s;
  color: #e2e8f0;
  display: block;
}
.league-card:hover { border-color: rgba(34,197,94,.3); background: #111827; color: #fff; }
.league-icon { font-size: 2rem; margin-bottom: .4rem; }

/* ── Stat pills (hero) ──────────────────────────────────────────── */
.stat-pill {
  display: inline-flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: .75rem 1.25rem;
  gap: .1rem;
}
.stat-pill .num { color: #fff; font-weight: 800; font-size: 1.5rem; }
.stat-pill .lbl { color: #64748b; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }

/* ── Pred row ───────────────────────────────────────────────────── */
.pred-row {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  transition: all .2s;
}
.pred-row:hover { border-color: rgba(34,197,94,.25); box-shadow: 0 0 20px rgba(34,197,94,.06); }

/* ── Tables (public + admin) ────────────────────────────────────── */
.pp-table thead th {
  background: #0b1120 !important;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b !important;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.07) !important;
  padding: .65rem 1rem;
}
.pp-table td {
  padding: .65rem 1rem;
  vertical-align: middle;
  font-size: .875rem;
  border-bottom: 1px solid rgba(255,255,255,.05) !important;
  color: #cbd5e1;
}
.pp-table tr:hover td { background: rgba(255,255,255,.02) !important; }

/* ── Stat cards (admin) ─────────────────────────────────────────── */
.stat-card {
  background: #111827;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.07);
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--green);
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .val { font-size: 1.7rem; font-weight: 900; color: #f1f5f9; }
.stat-card .lbl { font-size: .72rem; color: #64748b; text-transform: uppercase; letter-spacing: .04em; margin-top: .1rem; }

/* ── Admin Layout ───────────────────────────────────────────────── */
/* Note: admin pages use sidebar.php CSS for theming */
.admin-sidebar {
  width: 240px;
  background: #0b1120;
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,.06);
}
.admin-sidebar-head { padding: 1rem 1.4rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.sidebar-section {
  padding: .65rem 1.4rem .15rem;
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #334155;
  font-weight: 700;
}
.sidebar-link {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1.4rem;
  color: #64748b;
  text-decoration: none;
  font-size: .82rem;
  transition: all .14s;
  border-left: 3px solid transparent;
}
.sidebar-link i { width: 15px; text-align: center; font-size: .8rem; }
.sidebar-link span { flex: 1; }
.sidebar-link:hover { background: rgba(34,197,94,.05); color: #cbd5e1; border-left-color: rgba(34,197,94,.3); }
.sidebar-link.active { color: var(--green) !important; border-left-color: var(--green); background: rgba(34,197,94,.07); }
.badge-pill {
  background: rgba(255,255,255,.08);
  color: #94a3b8;
  padding: .1rem .45rem;
  border-radius: 50px;
  font-size: .65rem;
  font-weight: 700;
  margin-left: auto;
}
.admin-main { margin-left: 240px; min-height: 100vh; background: #0d1117; }
.admin-topbar {
  background: #111827;
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: .75rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-content { padding: 1.4rem; }

/* ── Utilities ──────────────────────────────────────────────────── */
.bg-navy   { background: var(--navy) !important; }
.bg-navy-2 { background: var(--navy-2) !important; }
.rounded-xl { border-radius: var(--radius) !important; }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-100%); transition: .22s; z-index: 1050; }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}
@media (max-width: 768px) {
  .live-ticker { display: none; }
  .match-card .team-name { font-size: .82rem; }
}
@media print {
  .admin-sidebar, .live-ticker { display: none !important; }
  .admin-main { margin-left: 0; }
}

/* ── Global text visibility boost ─────────────────────────────── */
/* Ensure no text is invisible on dark backgrounds */
label { color: #cbd5e1 !important; }
th    { color: #94a3b8 !important; }
td    { color: #cbd5e1; }
.form-label  { color: #cbd5e1 !important; }
.form-check-label { color: #cbd5e1 !important; }
select option { background: #0b1120; color: #f1f5f9; }
::-webkit-input-placeholder { color: #475569 !important; }

/* Admin sidebar section headers */
.sidebar-section { color: #64748b !important; }
.sidebar-link    { color: #94a3b8 !important; }
.sidebar-link:hover { color: #f1f5f9 !important; }

/* All dim text elements boosted */
[style*="color:#334155"] { color: #64748b !important; }
[style*="color:#475569"] { color: #64748b !important; }

/* Table td visibility */
.pp-table td, .table td { color: #cbd5e1 !important; }
.pp-table th, .table th { color: #94a3b8 !important; }

/* Match card text */
.match-card .team-name { color: #f1f5f9 !important; font-weight: 700; }
.league-badge { color: #94a3b8 !important; }

/* Live indicator */
.live-dot { 
  display: inline-block; width: 8px; height: 8px;
  background: #ef4444; border-radius: 50%;
  animation: pulse 1s infinite;
}
