/*
Theme Name: كورة لايف
Theme URI: https://livekoora.com
Author: Koora Live Team
Author URI: https://livekoora.com
Description: ثيم ووردبريس احترافي لعرض نتائج المباريات المباشرة ومواعيد مباريات كرة القدم مع دعم كامل للغة العربية وتحسينات SEO.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: koora-live
Tags: sports, football, rtl-language-support, dark-mode, responsive, seo
*/

/* ========================================
   GOOGLE FONTS IMPORT
======================================== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Tajawal:wght@400;500;700;800;900&display=swap');

/* ========================================
   CSS VARIABLES & DESIGN TOKENS
======================================== */
:root {
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8b8ba7;

  --brand-primary: #6b0f2a;
  --brand-secondary: #8b1538;
  --brand-gradient: linear-gradient(135deg, #6b0f2a 0%, #8b1538 50%, #a01d45 100%);
  --brand-light: #f8e8ed;

  --accent-primary: #6b0f2a;
  --accent-hover: #8b1538;
  --accent-gradient: linear-gradient(135deg, #6b0f2a 0%, #a01d45 100%);

  --status-live: #dc2626;
  --status-live-bg: rgba(220, 38, 38, 0.1);
  --status-upcoming: #16a34a;
  --status-upcoming-bg: rgba(22, 163, 74, 0.1);
  --status-finished: #6b7280;
  --status-finished-bg: rgba(107, 114, 128, 0.1);

  --tab-yesterday: #dc2626;
  --tab-today: #2563eb;
  --tab-tomorrow: #16a34a;

  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(107, 15, 42, 0.12);

  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 50px;

  --font-primary: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-arabic: 'Cairo', 'Tajawal', sans-serif;

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-primary: #0a0a1a;
  --bg-secondary: #12122a;
  --bg-card: #1a1a3e;
  --text-primary: #f0f0ff;
  --text-secondary: #b8b8d4;
  --text-muted: #7878a0;
  --border-color: #2a2a50;
  --border-light: #1e1e40;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 8px 30px rgba(107, 15, 42, 0.3);
  --brand-light: #2a1020;
  --status-live-bg: rgba(220, 38, 38, 0.2);
  --status-upcoming-bg: rgba(22, 163, 74, 0.2);
  --status-finished-bg: rgba(107, 114, 128, 0.2);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  direction: rtl;
  transition: background-color var(--transition-base), color var(--transition-base);
}

body.rtl {
  direction: rtl;
  font-family: var(--font-arabic);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--accent-primary); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ========================================
   LAYOUT
======================================== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

/* ========================================
   HEADER
======================================== */
.site-header {
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-base);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--spacing-md);
  max-width: 960px;
  margin: 0 auto;
  gap: var(--spacing-md);
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.site-logo:hover {
  color: inherit;
  transform: scale(1.04);
}

.logo-brand {
  background: var(--brand-gradient);
  color: #ffffff;
  padding: 9px 22px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(107, 15, 42, 0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: box-shadow 0.3s ease;
  border: 1px solid rgba(255,255,255,0.08);
}

.site-logo:hover .logo-brand {
  box-shadow: 0 6px 30px rgba(107, 15, 42, 0.65), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* K Monogram */
.logo-k {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  letter-spacing: -1px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

/* Main: koora live */
.logo-main {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.logo-w1 {
  color: #ffffff;
}

.logo-w2 {
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

/* Arabic subtitle */
.logo-sub {
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.6;
  letter-spacing: 1px;
}

/* Old elements - hide */
.logo-image { display: none; }
.logo-icon { display: none; }
.logo-football { display: none; }
.logo-live-badge { display: none; }
.live-dot { display: none; }

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.header-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.header-nav a:hover { color: var(--accent-primary); }

.header-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  font-size: 1rem;
}

.social-icon:hover {
  transform: scale(1.15);
  color: var(--accent-primary);
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.header-controls {
  display: none;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 1.1rem;
  border: 1px solid var(--border-color);
}

.theme-toggle:hover {
  background-color: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
  transform: rotate(20deg);
}

.telegram-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.telegram-btn:hover {
  background-color: #0088cc;
  color: white;
  border-color: #0088cc;
  transform: scale(1.1);
}

/* ========================================
   SCHEDULE TITLE BAR
======================================== */
.schedule-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.schedule-day-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  padding: 6px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.device-timezone {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ========================================
   SECTION HEADER
======================================== */
.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-primary);
}

/* ========================================
   TABS
======================================== */
.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.match-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 22px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tab-btn[data-date="yesterday"] {
  border-color: var(--tab-yesterday);
  color: var(--tab-yesterday);
}
.tab-btn[data-date="yesterday"].active,
.tab-btn[data-date="yesterday"]:hover {
  background: var(--tab-yesterday);
  color: #fff;
  border-color: var(--tab-yesterday);
}

.tab-btn[data-date="today"] {
  border-color: var(--tab-today);
  color: var(--tab-today);
}
.tab-btn[data-date="today"].active,
.tab-btn[data-date="today"]:hover {
  background: var(--tab-today);
  color: #fff;
  border-color: var(--tab-today);
}

.tab-btn[data-date="tomorrow"] {
  border-color: var(--tab-tomorrow);
  color: var(--tab-tomorrow);
}
.tab-btn[data-date="tomorrow"].active,
.tab-btn[data-date="tomorrow"]:hover {
  background: var(--tab-tomorrow);
  color: #fff;
  border-color: var(--tab-tomorrow);
}

.tab-btn[data-date="news"],
.tab-btn[data-date="schedule"] {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
.tab-btn[data-date="news"].active,
.tab-btn[data-date="news"]:hover,
.tab-btn[data-date="schedule"].active,
.tab-btn[data-date="schedule"]:hover {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

.tab-btn.active {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* ========================================
   MATCH CARDS
======================================== */
.matches-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
  box-shadow: var(--shadow-xs);
  padding: 0;
  animation: fadeInUp 0.4s ease forwards;
}

.match-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary);
  transform: translateY(-2px);
}

.match-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--brand-gradient);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.match-card:hover::before { opacity: 1; }

.match-link-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
}

.match-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  position: relative;
}

.team-home,
.team-away {
  display: flex !important;
  align-items: center !important;
  gap: 12px;
  width: 35%;
  flex-shrink: 0;
}

.team-home {
  flex-direction: row !important;
  justify-content: flex-start;
}

.team-away {
  flex-direction: row !important;
  justify-content: flex-start;
}

.team-logo {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.match-card:hover .team-logo { transform: scale(1.08); }

.team-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  font-size: 24px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
}

[data-theme="dark"] .team-logo-placeholder {
  background: var(--bg-secondary);
}

.team-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.match-center-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 110px;
}

.match-score {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.score-separator {
  color: var(--text-muted);
  font-weight: 400;
}

.status-badge {
  padding: 3px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.status-badge.status-live {
  background-color: var(--status-live);
  animation: livePulse 2s infinite;
}

.status-badge.status-upcoming {
  background-color: var(--status-upcoming);
}

.status-badge.status-finished {
  background-color: var(--status-finished);
}

.status-badge.status-halftime {
  background-color: #f59e0b;
}

.status-badge.status-second_half {
  background-color: var(--status-live);
  animation: livePulse 2s infinite;
}

.status-badge.status-starting_soon {
  background-color: #8b5cf6;
}

.status-badge.status-postponed {
  background-color: #64748b;
}

.status-badge.status-cancelled {
  background-color: #374151;
}

.match-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-primary);
}

[data-theme="dark"] .match-info-bar {
  background-color: rgba(255, 255, 255, 0.03);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-icon {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes vrm-pulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4); }
  50% { box-shadow: 0 4px 25px rgba(220, 38, 38, 0.7); }
}

@keyframes vrm-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.match-card:nth-child(1) { animation-delay: 0.05s; }
.match-card:nth-child(2) { animation-delay: 0.1s; }
.match-card:nth-child(3) { animation-delay: 0.15s; }
.match-card:nth-child(4) { animation-delay: 0.2s; }
.match-card:nth-child(5) { animation-delay: 0.25s; }
.match-card:nth-child(6) { animation-delay: 0.3s; }

/* ========================================
   NEWS SECTION
======================================== */
.news-section {
  margin-top: var(--spacing-2xl);
  padding: var(--spacing-xl) 0;
}

.news-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
}

.news-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: var(--brand-light);
  padding: 8px 20px;
  border-radius: var(--radius-md);
  border-right: 4px solid var(--brand-primary);
}

[data-theme="dark"] .news-section-title {
  background: rgba(107, 15, 42, 0.2);
}

.news-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}

.news-nav-btn:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.news-card:hover .news-image {
  transform: scale(1.05);
}

.news-image-wrapper {
  overflow: hidden;
  height: 180px;
}

.news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.news-content {
  padding: var(--spacing-md);
  flex-grow: 1;
}

.news-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  letter-spacing: 0.5px;
}

.news-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-title a:hover { color: var(--accent-primary); }

.news-excerpt {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: var(--spacing-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--border-color);
}

.show-more-btn {
  display: block;
  margin: var(--spacing-xl) auto 0;
  padding: 10px 40px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.show-more-btn:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ========================================
   AD BANNERS
======================================== */
.ad-banner {
  text-align: center;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ad-banner-top { margin-bottom: var(--spacing-lg); }
.ad-banner-bottom { margin-top: var(--spacing-lg); }
.ad-banner-article { margin: var(--spacing-xl) 0; }

.ad-banner img,
.ad-banner iframe {
  max-width: 100%;
  height: auto;
}

/* ========================================
   SINGLE MATCH PAGE
======================================== */
.match-page {
  padding: var(--spacing-xl) 0;
}

.match-hero {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.match-hero-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

.hero-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.hero-team-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.hero-team-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.hero-score {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.hero-vs {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Video Player */
.video-player-container {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--spacing-xl);
  border: 1px solid var(--border-color);
}

.video-player {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-player-container:fullscreen,
.video-player-container:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  margin: 0;
  padding: 0;
}

.video-player-container:fullscreen .video-player,
.video-player-container:-webkit-full-screen .video-player {
  padding-bottom: 0;
  height: 100vh;
}

.video-player-container:fullscreen .video-player iframe,
.video-player-container:-webkit-full-screen .video-player iframe {
  width: 100vw;
  height: 100vh;
}

.video-player iframe:fullscreen,
.video-player iframe:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
}

.embed-code-player {
  padding-bottom: 56.25%;
  position: relative;
  height: 0;
  overflow: hidden;
}

.embed-code-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Match Details */
.match-details {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.detail-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ========================================
   SCHEDULE MATCH CARDS
======================================== */
#scheduleGrid {
  display: none;
  gap: 16px !important;
  grid-template-columns: repeat(3, 1fr) !important;
}

.schedule-match-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.schedule-match-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--brand-primary);
}

.schedule-match-card h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
  background: var(--bg-secondary);
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
  margin-top: var(--spacing-2xl);
  border-top: 3px solid var(--brand-primary);
}

.footer-content {
  text-align: center;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: var(--spacing-md);
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-sm);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--accent-primary); }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: var(--spacing-lg);
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  transform: translateY(-3px);
}

.footer-social a svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
}

/* ========================================
   UTILITIES
======================================== */
.text-center { text-align: center; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }
.hidden { display: none; }

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(107, 15, 42, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-primary);
  animation: spin 1s linear infinite;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--brand-primary);
  border-radius: var(--radius-md);
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-secondary); }

/* ========================================
   VRM Article Content
======================================== */
.vrm-article-heading {
  font-size: 20px;
  color: var(--text-primary, #1a202c);
  border-right: 4px solid var(--brand-primary);
  padding-right: 12px;
  margin-top: 25px;
  margin-bottom: 15px;
}

.vrm-article-text {
  color: var(--text-secondary, #4a5568);
  font-size: 15px;
  line-height: 2;
}

.vrm-match-card-table {
  border: 1px solid var(--border-color, #e2e8f0);
}

.vrm-match-card-table tr {
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.vrm-match-card-table tr:nth-child(odd) {
  background: var(--bg-secondary, #f7fafc);
}

.vrm-table-label {
  padding: 12px 16px;
  color: var(--text-muted, #718096);
  font-weight: 600;
  width: 40%;
}

.vrm-table-value {
  padding: 12px 16px;
  color: var(--text-primary, #1a202c);
}

[data-theme="dark"] .vrm-article-heading,
[data-theme="dark"] .vrm-ai-article .vrm-article-heading,
[data-theme="dark"] .vrm-single-match .vrm-article-heading {
  color: #f7fafc !important;
}

[data-theme="dark"] .vrm-article-text,
[data-theme="dark"] .vrm-ai-article .vrm-article-text,
[data-theme="dark"] .vrm-single-match .vrm-article-text,
[data-theme="dark"] .vrm-article-body p,
[data-theme="dark"] .vrm-ai-article p {
  color: #cbd5e0 !important;
}

[data-theme="dark"] .vrm-article-body strong,
[data-theme="dark"] .vrm-ai-article strong {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .vrm-match-card-table { border-color: #334155 !important; }
[data-theme="dark"] .vrm-match-card-table tr { border-color: #334155 !important; }
[data-theme="dark"] .vrm-match-card-table tr:nth-child(odd) { background: #162032 !important; }
[data-theme="dark"] .vrm-table-label { color: #94a3b8 !important; }
[data-theme="dark"] .vrm-table-value { color: #e2e8f0 !important; }

/* Fix old articles */
.article-content h2[style*="color:#e2e8f0"],
.article-content h2[style*="color: #e2e8f0"],
.article-content h2[style*="color:#f1f5f9"],
.entry-content h2[style*="color:#e2e8f0"],
.entry-content h2[style*="color: #e2e8f0"],
.entry-content h2[style*="color:#f1f5f9"],
.vrm-article-content h2[style*="color:#e2e8f0"],
.vrm-article-content h2[style*="color:#f1f5f9"],
.vrm-ai-article h2[style*="color:#e2e8f0"],
.vrm-ai-article h2[style*="color:#f1f5f9"] {
  color: var(--text-primary) !important;
}

.article-content p[style*="color:#cbd5e1"],
.article-content p[style*="color: #cbd5e1"],
.entry-content p[style*="color:#cbd5e1"],
.entry-content p[style*="color: #cbd5e1"],
.vrm-article-content p[style*="color:#cbd5e1"],
.vrm-ai-article p[style*="color:#cbd5e1"] {
  color: var(--text-secondary) !important;
}

.article-content td[style*="color:#94a3b8"],
.entry-content td[style*="color:#94a3b8"],
.vrm-article-content td[style*="color:#94a3b8"],
.vrm-ai-article td[style*="color:#94a3b8"] {
  color: var(--text-muted) !important;
}

.article-content td[style*="color:#e2e8f0"],
.entry-content td[style*="color:#e2e8f0"],
.vrm-article-content td[style*="color:#e2e8f0"],
.vrm-ai-article td[style*="color:#e2e8f0"] {
  color: var(--text-primary) !important;
}

.article-content table[style*="border:1px solid #334155"],
.entry-content table[style*="border:1px solid #334155"],
.vrm-article-content table[style*="border:1px solid #334155"],
.vrm-ai-article table[style*="border:1px solid #334155"] {
  border-color: var(--border-color) !important;
}

.article-content tr[style*="border-bottom:1px solid #334155"],
.entry-content tr[style*="border-bottom:1px solid #334155"],
.vrm-article-content tr[style*="border-bottom:1px solid #334155"],
.vrm-ai-article tr[style*="border-bottom:1px solid #334155"] {
  border-color: var(--border-color) !important;
}

.article-content tr[style*="background:#162032"],
.entry-content tr[style*="background:#162032"],
.vrm-article-content tr[style*="background:#162032"],
.vrm-ai-article tr[style*="background:#162032"] {
  background: var(--bg-secondary) !important;
}

/* ========================================
   RESPONSIVE - TABLET
======================================== */
@media (max-width: 1024px) {
  .container { padding: 0 var(--spacing-md); }
  #scheduleGrid { grid-template-columns: repeat(2, 1fr) !important; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .details-grid { grid-template-columns: repeat(2, 1fr); }
  .header-nav { display: none; }
}

/* ========================================
   RESPONSIVE - MOBILE
======================================== */
@media (max-width: 768px) {
  .header-container { padding: 8px var(--spacing-sm); }
  .logo-brand { padding: 7px 14px; gap: 9px; }
  .logo-k { width: 30px; height: 30px; font-size: 1.1rem; border-radius: 8px; }
  .logo-main { font-size: 1.05rem; }
  .logo-sub { font-size: 0.55rem; }
  .header-social { display: none; }
  .header-controls { display: flex; }

  .tabs, .match-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px !important;
    justify-content: flex-start !important;
    padding-bottom: 4px;
  }
  .tabs::-webkit-scrollbar,
  .match-tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; padding: 7px 16px; font-size: 0.82rem; white-space: nowrap; }
  .section-title { font-size: 1.3rem; }

  #scheduleGrid { grid-template-columns: 1fr !important; }
  .match-main-row { padding: 12px 14px; }
  .team-home, .team-away { width: auto; gap: 8px; }
  .team-logo { width: 38px !important; height: 38px !important; min-width: 38px; min-height: 38px; }
  .team-name { font-size: 0.85rem; }
  .match-center-info { min-width: 80px; }
  .match-score { font-size: 1.3rem !important; }
  .status-badge { font-size: 0.68rem; padding: 3px 8px; }
  .match-info-bar { padding: 6px 14px; font-size: 0.75rem; }
  .info-item { gap: 4px; }
  .info-icon { width: 14px; height: 14px; }

  .match-hero { padding: var(--spacing-md); }
  .match-hero-teams { flex-direction: column; gap: var(--spacing-md); }
  .hero-team { flex-direction: row; gap: var(--spacing-md); }
  .hero-team-logo { width: 60px; height: 60px; }
  .hero-team-name { font-size: 1.1rem; }
  .hero-score { font-size: 2rem; }
  .hero-vs { font-size: 1rem; }
  .video-player-container { border-radius: var(--radius-md); margin-bottom: var(--spacing-md); }
  .match-details { padding: var(--spacing-md); }
  .details-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .news-image-wrapper { height: 140px; }
  .news-title { font-size: 0.82rem; }
  .site-footer { padding: var(--spacing-lg) 0 var(--spacing-md); }
  .footer-links { gap: var(--spacing-md); }
  .section { padding: var(--spacing-md) 0; }
  .schedule-title-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ========================================
   RESPONSIVE - SMALL PHONE
======================================== */
@media (max-width: 480px) {
  .container { padding: 0 8px; }
  .header-container { padding: 6px 8px; }
  .logo-brand { padding: 5px 10px; gap: 6px; }
  .logo-k { width: 26px; height: 26px; font-size: 0.95rem; border-radius: 7px; }
  .logo-main { font-size: 0.88rem; }
  .logo-sub { display: none; }
  .theme-toggle, .telegram-btn { width: 30px; height: 30px; }
  .section-title { font-size: 1.1rem; }
  .tab-btn { padding: 6px 12px; font-size: 0.78rem; }

  .match-main-row { padding: 10px; }
  .team-home, .team-away { gap: 6px; }
  .team-logo { width: 32px !important; height: 32px !important; min-width: 32px; min-height: 32px; }
  .team-name { font-size: 0.75rem; max-width: 75px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .match-center-info { min-width: 56px; }
  .match-score { font-size: 1.1rem !important; gap: 6px; }
  .status-badge { font-size: 0.6rem; padding: 2px 6px; }
  .match-info-bar { padding: 4px 10px; font-size: 0.68rem; }
  .info-icon { width: 12px; height: 12px; }

  .hero-team-logo { width: 48px; height: 48px; }
  .hero-team-name { font-size: 1rem; }
  .hero-score { font-size: 1.75rem; }
  .match-hero { padding: var(--spacing-sm); border-radius: var(--radius-md); }
  .match-details { padding: var(--spacing-sm); border-radius: var(--radius-md); }
  .detail-value { font-size: 1rem; }
  .news-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .news-image-wrapper { height: 110px; }
  .news-content { padding: 8px; }
  .news-title { font-size: 0.75rem; -webkit-line-clamp: 2; line-clamp: 2; }
  .footer-links { flex-direction: column; gap: var(--spacing-sm); }
}