/*
Theme Name:  Koora Live
Theme URI:   https://koora-lives.space
Author:      Koora Live Team
Description: Free Football Live Streaming WordPress theme. Watch Champions League, Premier League, La Liga, Serie A and Bundesliga live in HD.
Version:     1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: koora-live
Tags:        sports, football, streaming, custom-menu, translation-ready
*/

/* =============================================================
   CSS VARIABLES
   ============================================================= */
:root {
  --purple-dark:  #3a0a6e;
  --purple-mid:   #6a0dad;
  --purple-light: #9b2fd6;
  --red-accent:   #c0392b;
  --light-bg:     #f4f4f8;
  --text-dark:    #1a1a2e;
  --text-muted:   #666688;
  --border:       #e0e0f0;
  --live-green:   #00c853;
  --badge-dark:   #2d2d2d;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--light-bg);
  color: var(--text-dark);
  min-height: 100vh;
}

/* =============================================================
   NAVIGATION
   ============================================================= */
.koora-nav {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-mid) 60%, var(--purple-light) 100%);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(106,13,173,.4);
}

.koora-nav .site-title a,
.koora-nav .nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: #fff;
  letter-spacing: 2px;
  text-decoration: none;
}

/* WordPress nav menu */
.koora-nav .nav-links,
.koora-nav #primary-menu {
  display: flex;
  gap: 32px;
  list-style: none;
}

.koora-nav .nav-links a,
.koora-nav #primary-menu a {
  color: rgba(255,255,255,.88);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  transition: color .2s;
}

.koora-nav .nav-links a:hover,
.koora-nav #primary-menu a:hover { color: #fff; }

.nav-moon {
  width: 36px; height: 36px;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; cursor: pointer;
  flex-shrink: 0;
}

/* =============================================================
   HERO BANNER
   ============================================================= */
.hero-banner {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-mid) 50%, var(--red-accent) 100%);
  margin: 24px 40px;
  border-radius: 14px;
  padding: 28px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  box-shadow: 0 8px 32px rgba(106,13,173,.25);
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.hero-sub { font-size: .9rem; opacity: .85; }

.hero-badge {
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 50px;
  padding: 10px 22px;
  font-weight: 600; font-size: .9rem;
  display: flex; align-items: center; gap: 8px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

/* =============================================================
   SCHEDULE BLOCK
   ============================================================= */
.schedule-block {
  margin: 0 40px 24px;
  background: #fff;
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.schedule-title {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple-mid));
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 700; font-size: .92rem;
}

/* Day tabs */
.day-tabs { display: flex; gap: 8px; }

.day-tab {
  padding: 9px 22px;
  border-radius: 8px;
  font-weight: 600; font-size: .88rem;
  cursor: pointer; border: none;
  transition: all .2s;
  font-family: 'Outfit', sans-serif;
}

.day-tab.active {
  background: linear-gradient(135deg, var(--purple-mid), var(--purple-light));
  color: #fff;
}

.day-tab:not(.active) { background: var(--light-bg); color: var(--text-dark); }
.day-tab:not(.active):hover { background: #e0e0f0; }

.timezone-select {
  padding: 9px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: .88rem; color: var(--text-dark);
  cursor: pointer; background: #fff;
}

/* Filters row */
.filters { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }

.search-box {
  flex: 1; min-width: 240px;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: .9rem; outline: none;
  transition: border .2s;
  background: var(--light-bg);
}

.search-box:focus { border-color: var(--purple-mid); background: #fff; }

.live-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer; font-size: .9rem;
  background: var(--light-bg);
  user-select: none; white-space: nowrap;
}

.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live-green);
  animation: kooraPulse 1.4s infinite;
}

@keyframes kooraPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

.league-select {
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: .9rem;
  background: var(--light-bg);
  cursor: pointer; outline: none;
}

.reset-btn {
  padding: 11px 20px;
  background: #555; color: #fff;
  border: none; border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: .88rem; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background .2s; white-space: nowrap;
}

.reset-btn:hover { background: #333; }

/* =============================================================
   LEAGUE GROUPS & MATCH CARDS
   ============================================================= */
.league-group { margin-bottom: 4px; }

.league-header {
  display: flex; align-items: center; gap: 8px;
  font-size: .88rem; font-weight: 700; color: var(--text-dark);
  padding: 10px 8px 8px;
  border-bottom: 1px solid var(--border);
}

.match-card {
  display: flex; align-items: center;
  padding: 16px 8px;
  border-bottom: 1px solid #f0f0f8;
  gap: 12px; cursor: pointer;
  transition: background .15s;
  border-radius: 8px;
}

.match-card:hover { background: #faf8ff; }

.team-home,
.team-away {
  display: flex; align-items: center; gap: 12px; flex: 1;
}

.team-away { justify-content: flex-end; flex-direction: row-reverse; }

.team-logo-placeholder {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .72rem;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.team-name {
  font-weight: 600; font-size: .92rem;
  color: var(--text-dark);
  max-width: 140px; line-height: 1.3;
}

.match-center {
  text-align: center; min-width: 110px; flex-shrink: 0;
}

.match-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem; letter-spacing: 3px;
  color: var(--text-dark); line-height: 1; margin-bottom: 4px;
}

.match-time {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem; letter-spacing: 2px;
  color: var(--text-dark); line-height: 1; margin-bottom: 4px;
}

.match-status {
  display: inline-block;
  padding: 3px 12px; border-radius: 5px;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
}

.status-live        { background: var(--badge-dark); color: #fff; }
.status-not-started { background: #e8e8f0; color: #555; }
.status-finished    { background: #e8e8f0; color: #555; }
.status-postponed   { background: #fff3cd; color: #856404; }

/* =============================================================
   INFO SECTIONS
   ============================================================= */
.info-section {
  margin: 0 40px 24px;
  background: #fff;
  border-radius: 14px;
  padding: 28px 32px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.section-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple-mid));
  color: #fff;
  padding: 10px 22px; border-radius: 8px;
  font-weight: 700; font-size: .92rem;
  margin-bottom: 20px;
}

.info-text { line-height: 1.8; color: #444; font-size: .94rem; margin-bottom: 14px; }

.feature-list { list-style: none; }

.feature-list li {
  padding: 5px 0; font-size: .93rem; color: #444;
}

.feature-list li::before { content: "\26BD  "; }

.contact-email { color: var(--purple-mid); font-weight: 600; text-decoration: none; }
.contact-email:hover { text-decoration: underline; }

/* =============================================================
   STREAM EMBED (single match page)
   ============================================================= */
.stream-embed-wrap {
  margin-top: 24px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.stream-embed-wrap iframe {
  display: block; width: 100%;
  min-height: 400px; border: 0;
}

/* =============================================================
   FOOTER NAV
   ============================================================= */
.footer-nav,
.footer-terms {
  display: flex; flex-wrap: wrap;
  gap: 10px; justify-content: center;
  margin: 0 40px 16px;
}

.footer-terms { margin-bottom: 24px; }

.footer-nav-btn {
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: .87rem; font-weight: 500;
  color: var(--text-dark);
  cursor: pointer; background: #fff;
  transition: all .2s;
  text-decoration: none; display: inline-block;
}

.footer-nav-btn:hover {
  background: var(--purple-mid);
  color: #fff; border-color: var(--purple-mid);
}

/* =============================================================
   FOOTER WORLD
   ============================================================= */
.footer-world {
  margin: 0 40px 24px;
  background: var(--light-bg);
  border-radius: 12px;
  padding: 24px; text-align: center;
}

.footer-world-title {
  color: var(--purple-mid);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem; letter-spacing: 1px; margin-bottom: 10px;
}

.footer-tz    { font-size: .82rem; color: #666; margin-bottom: 10px; line-height: 1.7; }
.footer-links { font-size: .78rem; color: #999; line-height: 1.9; }

/* =============================================================
   BOTTOM FOOTER
   ============================================================= */
.bottom-footer {
  text-align: center;
  padding: 20px 40px 28px;
  color: #888; font-size: .82rem;
}

.bottom-footer strong { color: var(--purple-mid); }

/* =============================================================
   SIDEBAR WIDGETS
   ============================================================= */
.koora-sidebar { margin: 0 40px 24px; }

.koora-sidebar .widget {
  background: #fff; border-radius: 14px;
  padding: 24px; margin-bottom: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.koora-sidebar .widget-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem; color: var(--purple-dark);
  margin-bottom: 12px; letter-spacing: 1px;
}

/* =============================================================
   TEAM LOGO – real image from API
   ============================================================= */
.team-logo-img {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: contain;
  background: #f4f4f8;
  border: 1px solid var(--border);
  flex-shrink: 0;
  padding: 3px;
}

/* =============================================================
   LIVE BADGE – count of live matches shown next to schedule title
   ============================================================= */
#kooraLiveBadge {
  display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--red-accent);
  color: #fff;
  font-size: .7rem; font-weight: 700;
  width: 20px; height: 20px;
  border-radius: 50%;
  margin-left: 8px;
  animation: kooraPulse 1.2s infinite;
}

/* Live status pulse animation */
.status-live-pulse {
  animation: kooraLivePulse 1.4s infinite;
}

@keyframes kooraLivePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .75; transform: scale(.97); }
}

/* Card updating flash */
.koora-updating {
  transition: opacity .3s;
  opacity: .4;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 700px) {
  .koora-nav { padding: 0 16px; }

  .hero-banner,
  .schedule-block,
  .info-section,
  .footer-nav,
  .footer-terms,
  .footer-world,
  .bottom-footer,
  .koora-sidebar { margin-left: 16px; margin-right: 16px; }

  .hero-title  { font-size: 1.4rem; }
  .team-name   { max-width: 80px; font-size: .8rem; }

  .koora-nav .nav-links,
  .koora-nav #primary-menu { display: none; }

  .hero-badge  { display: none; }
}
