/* ============================================================
   AbbourySport â€” Ultra-Premium Design System v2.0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&family=Inter:wght@300;400;500;600;700;800;900&family=Rajdhani:wght@600;700&display=swap');

/* ============================================================
   CSS Variables & Design Tokens
   ============================================================ */
:root {
  /* Primary Brand Colors */
  --primary:         #00e5a0;
  --primary-dim:     #00b87d;
  --primary-dark:    #007a54;
  --primary-glow:    rgba(0, 229, 160, 0.2);
  --primary-glow-sm: rgba(0, 229, 160, 0.12);

  /* Accent Colors */
  --accent:          #f97316;
  --accent-glow:     rgba(249, 115, 22, 0.2);
  --gold:            #fbbf24;
  --gold-glow:       rgba(251, 191, 36, 0.2);

  /* Status Colors */
  --danger:          #f43f5e;
  --danger-glow:     rgba(244, 63, 94, 0.3);
  --success:         #22c55e;
  --info:            #38bdf8;
  --warning:         #fb923c;

  /* Dark Backgrounds */
  --bg-base:         #050c1a;
  --bg-surface:      #091224;
  --bg-card:         #0d1b35;
  --bg-card-2:       #102040;
  --bg-card-hover:   #162850;
  --bg-elevated:     #1a2f58;
  --bg-glass:        rgba(13, 27, 53, 0.8);
  --bg-glass-sm:     rgba(255, 255, 255, 0.04);
  --bg-glass-border: rgba(255, 255, 255, 0.07);

  /* Text Colors (High Contrast) */
  --text-primary:    #ffffff;
  --text-secondary:  #e0e0e0;
  --text-muted:      #cccccc;
  --text-inverse:    #050c1a;

  /* Borders */
  --border:          rgba(255, 255, 255, 0.07);
  --border-md:       rgba(255, 255, 255, 0.1);
  --border-strong:   rgba(255, 255, 255, 0.18);
  --border-primary:  rgba(0, 229, 160, 0.35);
  --border-accent:   rgba(249, 115, 22, 0.35);

  /* Shadows */
  --shadow-sm:       0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md:       0 8px 32px rgba(0, 0, 0, 0.55);
  --shadow-lg:       0 20px 60px rgba(0, 0, 0, 0.7);
  --shadow-xl:       0 40px 100px rgba(0, 0, 0, 0.8);
  --shadow-glow:     0 0 40px rgba(0, 229, 160, 0.18);
  --shadow-glow-lg:  0 0 80px rgba(0, 229, 160, 0.12);
  --shadow-danger:   0 0 30px rgba(244, 63, 94, 0.25);

  /* Radius */
  --radius-xs:   6px;
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   22px;
  --radius-xl:   30px;
  --radius-2xl:  40px;
  --radius-full: 9999px;

  /* Transitions */
  --transition:      0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --header-height: 76px;
  --header-bg:     rgba(5, 12, 26, 0.9);
  --footer-bg:     #030810;
  --topbar-height: 38px;
}

/* Light Theme */
[data-theme='light'] {
  --bg-base:         #f0f4fc;
  --bg-surface:      #e5eaf6;
  --bg-card:         #ffffff;
  --bg-card-2:       #f7faff;
  --bg-card-hover:   #edf2ff;
  --bg-elevated:     #dde5f7;
  --bg-glass:        rgba(255, 255, 255, 0.92);
  --bg-glass-sm:     rgba(0, 0, 0, 0.03);
  --bg-glass-border: rgba(0, 0, 0, 0.06);

  --text-primary:    #000000;
  --text-secondary:  #111111;
  --text-muted:      #333333;
  --text-inverse:    #ffffff;

  --border:          rgba(0, 0, 0, 0.07);
  --border-md:       rgba(0, 0, 0, 0.12);
  --border-strong:   rgba(0, 0, 0, 0.2);

  --shadow-sm:       0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md:       0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-lg:       0 20px 60px rgba(0, 0, 0, 0.14);

  --header-bg:       rgba(255, 255, 255, 0.92);
  --footer-bg:       #0a1628;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-surface);
  overflow-y: scroll;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary), var(--primary-dim));
  border-radius: var(--radius-full);
}

body {
  font-family: 'Tajawal', 'Inter', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  direction: rtl;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

body[dir='ltr'], html[dir='ltr'] body {
  font-family: 'Inter', 'Tajawal', sans-serif;
}

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

a:hover { color: var(--primary-dim); }
ul { list-style: none; }

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

button { font-family: inherit; cursor: pointer; }

/* ============================================================
   Layout Utilities
   ============================================================ */
.container {
  width: 94%;
  max-width: 1340px;
  margin: 0 auto;
}

.section-gap { margin: 60px 0; }

/* ============================================================
   Keyframe Animations
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse-live {
  0%, 100% { box-shadow: 0 0 0 0 var(--danger-glow); }
  70%       { box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.4); }
}

@keyframes kenBurns {
  0%   { transform: scale(1.05) translate(0, 0); }
  33%  { transform: scale(1.1) translate(-1%, 0.5%); }
  66%  { transform: scale(1.07) translate(0.5%, -1%); }
  100% { transform: scale(1.05) translate(0, 0); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes bounceIn {
  0%   { transform: scale(0.3); opacity: 0; }
  60%  { transform: scale(1.05); opacity: 1; }
  80%  { transform: scale(0.97); }
  100% { transform: scale(1); }
}

/* Animation Classes */
.animate-fade-up    { animation: fadeInUp 0.6s ease both; }
.animate-fade-down  { animation: fadeInDown 0.5s ease both; }
.animate-scale-in   { animation: scaleIn 0.4s ease both; }

/* ============================================================
   Top Announcement Bar
   ============================================================ */
.top-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.top-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    var(--bg-surface) 0%,
    transparent 15%,
    transparent 85%,
    var(--bg-surface) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.top-bar-label {
  background: linear-gradient(135deg, var(--danger), #ff6b6b);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 16px;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 2;
  box-shadow: 0 2px 12px var(--danger-glow);
}

html[dir='ltr'] .top-bar-label {
  border-radius: var(--radius-full) 0 0 var(--radius-full);
}

.ticker-wrapper {
  flex: 1;
  overflow: hidden;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.ticker-track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: tickerScroll 45s linear infinite;
  will-change: transform;
}

.ticker-track:hover { animation-play-state: paused; }

.ticker-item {
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: color var(--transition-fast);
  font-weight: 700;
}

.ticker-item:hover { color: var(--primary); }

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}

.top-bar-date {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  padding: 0 20px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

/* ============================================================
   Header / Navigation
   ============================================================ */
.header {
  background: var(--header-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition);
}

.header.scrolled {
  background: rgba(5, 12, 26, 0.98);
  border-bottom-color: var(--border-primary);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5), 0 1px 0 var(--border-primary);
}

[data-theme='light'] .header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-img {
  height: 46px;
  width: 46px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--border-primary);
  transition: all var(--transition);
  box-shadow: 0 0 20px var(--primary-glow);
}

.logo:hover .logo-img {
  border-color: var(--primary);
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 0 30px var(--primary-glow);
}

.logo-text {
  font-family: 'Rajdhani', 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1;
}

.logo-text span {
  background: linear-gradient(135deg, var(--primary) 0%, #00ff88 50%, var(--primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* Navigation */
.header-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links li { position: relative; }

.nav-links a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
  position: relative;
  letter-spacing: 0.3px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #00ff88);
  border-radius: var(--radius-full);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-glass-sm);
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 55%; }

.nav-links a.active {
  color: var(--primary);
}

.nav-badge {
  background: linear-gradient(135deg, var(--danger), #ff6b6b);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  animation: pulse-dot 1.5s infinite;
  letter-spacing: 0.5px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  background: var(--bg-glass-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 15px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.icon-btn:hover {
  color: var(--primary);
  border-color: var(--border-primary);
  background: var(--primary-glow-sm);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--primary-glow);
}

/* Language Dropdown */
.lang-dropdown { position: relative; display: flex; align-items: center; }

.lang-btn {
  background: var(--bg-glass-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  font-weight: 500;
}

.lang-btn:hover {
  color: var(--primary);
  border-color: var(--border-primary);
  background: var(--primary-glow-sm);
}

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  z-index: 1001;
  min-width: 150px;
  box-shadow: var(--shadow-lg);
  animation: fadeInDown 0.2s ease;
}

html[dir='rtl'] .lang-menu { left: auto; right: 0; }

.lang-dropdown:hover .lang-menu,
.lang-dropdown:focus-within .lang-menu,
.lang-menu.open { display: flex; flex-direction: column; }

.lang-menu button {
  background: none;
  border: none;
  width: 100%;
  text-align: right;
  padding: 11px 18px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
}

html[dir='ltr'] .lang-menu button { text-align: left; }

.lang-menu button:hover, .lang-menu button.active {
  background: var(--primary-glow-sm);
  color: var(--primary);
}

.lang-flag { font-size: 18px; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav Drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 290px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 2000;
  padding: 90px 20px 30px;
  flex-direction: column;
  gap: 6px;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
}

html[dir='ltr'] .mobile-nav {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
}

.mobile-nav.open { transform: translateX(0); }

.mobile-nav a {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--primary);
  background: var(--primary-glow-sm);
  border-color: var(--border-primary);
}

.mobile-nav a i { width: 20px; text-align: center; }

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1999;
  backdrop-filter: blur(6px);
}

.nav-overlay.open { display: block; }

/* Search Modal */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 3000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  backdrop-filter: blur(12px);
}

.search-modal.open { display: flex; }

.search-modal-inner {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 36px;
  width: 92%;
  max-width: 640px;
  box-shadow: var(--shadow-xl), 0 0 60px var(--primary-glow);
  animation: scaleIn 0.3s ease;
}

.search-modal-inner h3 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input-wrap { display: flex; gap: 10px; }

.search-input-wrap input {
  flex: 1;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.search-input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow-sm);
}

.search-input-wrap button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  color: var(--text-inverse);
  border: none;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 15px;
  transition: all var(--transition);
  font-weight: 700;
}

.search-input-wrap button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.search-close {
  position: absolute;
  top: 18px;
  left: 18px;
  background: var(--bg-glass-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--transition-fast);
}

.search-close:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(244, 63, 94, 0.1);
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenBurns 24s ease-in-out infinite;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(5, 12, 26, 0.97) 0%, rgba(5, 12, 26, 0.75) 45%, rgba(5, 12, 26, 0.45) 100%),
    radial-gradient(ellipse at 20% 50%, rgba(0, 229, 160, 0.08) 0%, transparent 60%);
}

.hero-overlay::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(transparent, var(--bg-base));
}

/* Decorative particles */
.hero::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 55%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 700px;
  animation: fadeInUp 0.9s ease both;
  padding: 60px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 229, 160, 0.1);
  border: 1px solid var(--border-primary);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse-dot 1.2s infinite;
  box-shadow: 0 0 8px var(--primary);
}

.hero h2 {
  font-size: clamp(42px, 6.5vw, 78px);
  font-weight: 900;
  color: #fff;
  line-height: 1.05;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: -2px;
}

.hero h2 .highlight {
  display: block;
  background: linear-gradient(135deg, var(--primary) 0%, #00ff88 40%, #7affcc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(0, 229, 160, 0.4));
}

.hero p {
  font-size: 17.5px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 36px;
  line-height: 1.75;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Hero Stats */
.hero-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding-bottom: 40px;
}

.hero-stats-inner {
  display: flex;
  gap: 0;
  background: rgba(13, 27, 53, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 600px;
}

.hero-stat {
  flex: 1;
  padding: 18px 24px;
  text-align: center;
  border-left: 1px solid var(--border);
  position: relative;
  transition: background var(--transition-fast);
}

.hero-stat:last-child { border-left: none; }
html[dir='ltr'] .hero-stat { border-left: none; border-right: 1px solid var(--border); }
html[dir='ltr'] .hero-stat:last-child { border-right: none; }

.hero-stat:hover { background: var(--primary-glow-sm); }

.hero-stat .num {
  display: block;
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), #00ff88);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat .label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, #00c88a 100%);
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  border: none;
  transition: all var(--transition-bounce);
  font-family: inherit;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 24px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px var(--primary-glow);
  color: var(--text-inverse);
}

.btn-primary:active { transform: translateY(-1px); }

.btn-primary.btn-sm {
  font-size: 13px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 26px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-md);
  transition: all var(--transition);
  font-family: inherit;
}

.btn-ghost:hover {
  color: var(--primary);
  border-color: var(--border-primary);
  background: var(--primary-glow-sm);
  transform: translateY(-2px);
}

/* ============================================================
   Main Grid Layout
   ============================================================ */
.main-grid {
  display: grid;
  grid-template-columns: 260px 1fr 260px;
  gap: 28px;
  padding: 40px 0 60px;
  align-items: start;
}

/* ============================================================
   Widget Box (Cards)
   ============================================================ */
.widget-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  transition: border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.widget-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.widget-box:hover { border-color: var(--border-md); }
.widget-box:hover::before { opacity: 1; }

.widget-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.widget-title i {
  color: var(--primary);
  font-size: 15px;
}

/* ============================================================
   Page Hero (Inner Pages)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, #081830 0%, var(--bg-surface) 40%, #081830 100%);
  border-bottom: 1px solid var(--border);
  padding: 50px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(0, 229, 160, 0.06) 0%, transparent 70%);
}

.page-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.page-hero h1 i { color: var(--primary); margin-left: 10px; }
html[dir='ltr'] .page-hero h1 i { margin-left: 0; margin-right: 10px; }

.page-hero p {
  font-size: 15px;
  color: var(--text-muted);
}

/* ============================================================
   Post Cards (News)
   ============================================================ */
.post-card {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  transition: all var(--transition-fast);
}

.post-card:last-child { border-bottom: none; }
.post-card:hover { padding-right: 6px; }
html[dir='ltr'] .post-card:hover { padding-right: 0; padding-left: 6px; }

.post-thumb {
  width: 120px;
  height: 86px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: transform var(--transition);
}

.post-card:hover .post-thumb { transform: scale(1.03); }

.post-info { flex: 1; min-width: 0; }

.post-category {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-glow-sm), rgba(0, 229, 160, 0.06));
  border: 1px solid var(--border-primary);
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.post-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 8px;
}

.post-title a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

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

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.post-meta i { font-size: 11px; margin-left: 3px; }
html[dir='ltr'] .post-meta i { margin-left: 0; margin-right: 3px; }

.post-snippet {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Match Cards (Home Widget)
   ============================================================ */
.match-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card-2);
  margin-bottom: 10px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

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

.match-card:last-child { margin-bottom: 0; }

.team {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.team-reverse {
  flex-direction: row-reverse;
}

.team-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 2px;
  flex-shrink: 0;
}

.team-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-status {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.match-status.live {
  background: var(--danger);
  animation: pulse-live 2s infinite;
}

.match-score {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: 2px;
}

/* Loading */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 14px;
  color: var(--text-muted);
  font-size: 14px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: rotate-slow 0.8s linear infinite;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 30px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 44px;
  margin-bottom: 16px;
  display: block;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p { font-size: 14px; }

/* ============================================================
   Tournament List (Sidebar)
   ============================================================ */
.tournament-list li {
  border-bottom: 1px solid var(--border);
}

.tournament-list li:last-child { border-bottom: none; }

.tournament-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.tournament-list a:hover {
  color: var(--primary);
  padding-right: 6px;
}

html[dir='ltr'] .tournament-list a:hover { padding-right: 0; padding-left: 6px; }

.tournament-list img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.tournament-list .arrow {
  margin-right: auto;
  font-size: 10px;
  opacity: 0.5;
  transition: all var(--transition-fast);
}

html[dir='ltr'] .tournament-list .arrow { margin-right: 0; margin-left: auto; }

.tournament-list a:hover .arrow {
  opacity: 1;
  transform: translateX(-3px);
}

html[dir='ltr'] .tournament-list a:hover .arrow { transform: translateX(3px); }

/* ============================================================
   Social Links (Sidebar)
   ============================================================ */
.social-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-fast);
  background: var(--bg-card-2);
}

.social-link:hover {
  transform: translateX(-4px);
  border-color: var(--border-md);
}

html[dir='ltr'] .social-link:hover { transform: translateX(4px); }

.social-count {
  margin-right: auto;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-glass-sm);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

html[dir='ltr'] .social-count { margin-right: 0; margin-left: auto; }

.social-link.fb { --c: #1877f2; }
.social-link.ig { --c: #e4405f; }
.social-link.tw { --c: #1da1f2; }
.social-link.yt { --c: #ff0000; }
.social-link.tg { --c: #0088cc; }

.social-link.fb:hover { background: rgba(24, 119, 242, 0.08); border-color: rgba(24, 119, 242, 0.3); color: #1877f2; }
.social-link.ig:hover { background: rgba(228, 64, 95, 0.08); border-color: rgba(228, 64, 95, 0.3); color: #e4405f; }
.social-link.tw:hover { background: rgba(29, 161, 242, 0.08); border-color: rgba(29, 161, 242, 0.3); color: #1da1f2; }
.social-link.yt:hover { background: rgba(255, 0, 0, 0.08); border-color: rgba(255, 0, 0, 0.3); color: #ff0000; }
.social-link.tg:hover { background: rgba(0, 136, 204, 0.08); border-color: rgba(0, 136, 204, 0.3); color: #0088cc; }

.social-link i { font-size: 16px; color: var(--c, var(--primary)); }

/* Poll buttons */
.poll-btn {
  transition: all var(--transition-fast) !important;
}

.poll-btn:hover {
  background: var(--primary-glow-sm) !important;
  border-color: var(--border-primary) !important;
  color: var(--primary) !important;
  transform: translateX(-3px);
}

html[dir='ltr'] .poll-btn:hover { transform: translateX(3px); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  padding-top: 60px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 2fr 1.5fr;
  gap: 40px;
  padding-bottom: 50px;
}

.footer-col h3 {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-brand .logo-text { font-size: 20px; margin-bottom: 16px; color: #ffffff; }

.footer-col p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-bottom: 24px;
}

.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-social-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.05);
}

.footer-social-btn:hover { transform: translateY(-4px); }
.footer-social-btn.fb:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.footer-social-btn.ig:hover { background: linear-gradient(135deg, #e4405f, #f77737); border-color: transparent; color: #fff; }
.footer-social-btn.tw:hover { background: #000; border-color: #333; color: #fff; }
.footer-social-btn.yt:hover { background: #ff0000; border-color: #ff0000; color: #fff; }
.footer-social-btn.tg:hover { background: #0088cc; border-color: #0088cc; color: #fff; }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-links li a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13.5px;
  padding: 7px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.footer-links li a:hover {
  color: var(--primary);
  padding-right: 6px;
}

html[dir='ltr'] .footer-links li a:hover { padding-right: 0; padding-left: 6px; }

.footer-links li a i { font-size: 10px; opacity: 0.6; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  transition: color var(--transition-fast);
}

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

/* ============================================================
   Responsive Design
   ============================================================ */
@media (max-width: 1100px) {
  .main-grid {
    grid-template-columns: 220px 1fr 220px;
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-left { order: 2; }
  .main-content { order: 1; }
  .sidebar-right { order: 3; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .hero { min-height: 520px; }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .hamburger { display: flex; }

  .mobile-nav { display: flex; }

  .hero h2 { letter-spacing: -1px; }

  .hero-stats-inner {
    grid-template-columns: 1fr 1fr;
    display: grid;
  }

  .hero-stat { padding: 14px 16px; }

  .post-card { flex-direction: column; }
  .post-thumb { width: 100%; height: 180px; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
}

@media (max-width: 480px) {
  .container { width: 96%; }

  .hero-stats-inner { display: flex; flex-wrap: wrap; }
  .hero-stat { min-width: 50%; }

  .top-bar-date { font-size: 11px; padding: 0 10px; }

  .lang-dropdown { display: none; }
}

/* ============================================================
   Utility Classes
   ============================================================ */
.text-primary-color { color: var(--primary); }
.text-muted { color: var(--text-muted); }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* Section Titles */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: linear-gradient(var(--primary), var(--primary-dim));
  border-radius: var(--radius-full);
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.badge-live {
  background: var(--danger);
  color: #fff;
  animation: pulse-live 2s infinite;
}

.badge-live::before {
  content: '';
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  animation: pulse-dot 1s infinite;
}

.badge-done { background: #334468; color: var(--text-secondary); }
.badge-pre  {
  background: var(--primary-glow-sm);
  color: var(--primary);
  border: 1px solid var(--border-primary);
}

.badge-half { background: var(--accent); color: #fff; }

/* Glassmorphism Card */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* Shimmer Skeleton */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-card) 25%,
    var(--bg-card-hover) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Glow Effect */
.glow { box-shadow: 0 0 30px var(--primary-glow); }
.glow-sm { box-shadow: 0 0 15px var(--primary-glow-sm); }

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), #00ff88);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Scrollbar for horizontal elements */
.scrollable {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.scrollable::-webkit-scrollbar { height: 4px; }
.scrollable::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

/* ============================================================
   News Grid Layout (for news page)
   ============================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}

.news-card:hover {
  border-color: var(--border-md);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

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

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

.news-card-img-wrap {
  overflow: hidden;
  position: relative;
}

.news-card-body {
  padding: 20px;
}

.news-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Tournaments Grid
   ============================================================ */
.tournaments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.tournament-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-bounce);
  cursor: pointer;
}

.tournament-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-primary);
  box-shadow: var(--shadow-md), 0 0 30px var(--primary-glow-sm);
}

.tournament-card-header {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-card-2));
}

.tournament-card-header img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform var(--transition-bounce);
}

.tournament-card:hover .tournament-card-header img {
  transform: scale(1.15);
}

/* ============================================================
   Category Filter Tabs
   ============================================================ */
.category-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.cat-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-card-2);
}

.cat-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  border-color: transparent;
  color: var(--text-inverse);
  box-shadow: 0 4px 16px var(--primary-glow);
}

/* ============================================================
   Featured News Hero
   ============================================================ */
.featured-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.featured-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 360px;
  cursor: pointer;
}

.featured-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.featured-main:hover img { transform: scale(1.05); }

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 12, 26, 0.95) 0%, rgba(5, 12, 26, 0.4) 50%, transparent 100%);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.featured-main-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 12px;
}

.featured-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.featured-side-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 160px;
  cursor: pointer;
}

.featured-side-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.featured-side-item:hover img { transform: scale(1.06); }

.featured-overlay-sm {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 12, 26, 0.9) 0%, transparent 60%);
  padding: 16px;
  display: flex;
  align-items: flex-end;
}

.featured-overlay-sm p {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

/* ============================================================
   League Filter Tabs (Matches Page)
   ============================================================ */
.league-filter {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  margin-bottom: 28px;
  padding: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.lf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.lf-btn img { width: 20px; height: 20px; object-fit: contain; border-radius: 3px; }

.lf-btn:hover {
  background: var(--bg-glass-sm);
  color: var(--text-primary);
}

.lf-btn.active {
  background: var(--primary-glow-sm);
  border-color: var(--border-primary);
  color: var(--primary);
}

.lf-btn .count {
  background: currentColor;
  color: var(--bg-base);
  border-radius: var(--radius-full);
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.85;
}

/* ============================================================
   Match Row (Matches Page)
   ============================================================ */
.competition-group {
  margin-bottom: 20px;
  animation: fadeInUp 0.4s ease both;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.competition-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-card-2);
  font-weight: 800;
  font-size: 15px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  border-right: 3px solid var(--primary);
}

html[dir='ltr'] .competition-header {
  border-right-width: 1px;
  border-left: 3px solid var(--primary);
}

.competition-header img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.comp-count {
  margin-right: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

html[dir='ltr'] .comp-count { margin-right: 0; margin-left: auto; }

.competition-body { background: var(--bg-card); }

.match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.match-row:last-child { border-bottom: none; }
.match-row:hover { background: var(--bg-glass-border); }

.match-row.is-live {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.04), transparent);
  border-right: 2px solid var(--danger);
}

html[dir='ltr'] .match-row.is-live {
  border-right-width: 1px;
  border-left: 2px solid var(--danger);
}

.row-team {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.row-team img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--bg-surface);
  padding: 3px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.row-team span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-center { text-align: center; min-width: 120px; flex-shrink: 0; }

.row-score {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: 4px;
  line-height: 1;
  margin: 4px 0;
}

.row-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  color: #fff;
  margin-bottom: 4px;
}

.badge-live  { background: var(--danger); animation: pulse-live 2s infinite; }
.badge-live::before { content: ''; width: 5px; height: 5px; background: #fff; border-radius: 50%; animation: pulse-dot 1s infinite; }
.badge-half  { background: var(--accent); }
.badge-done  { background: #334468; color: var(--text-muted); }
.badge-pre   { background: var(--primary-glow-sm); color: var(--primary); border: 1px solid var(--border-primary); }

.row-minute { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Matches Stats Bar */
.matches-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-secondary);
}

.stat-chip i { color: var(--primary); font-size: 14px; }

.stat-chip.live-chip {
  background: rgba(244, 63, 94, 0.1);
  color: var(--danger);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  transition: all var(--transition-fast);
}

.stat-chip.live-chip:hover {
  background: rgba(244, 63, 94, 0.2);
}

.stat-chip.live-chip.active-live {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.stat-chip.live-chip i { color: var(--danger); animation: pulse-dot 1s infinite; }
.stat-chip.live-chip.active-live i { color: #fff; }

.source-badge {
  margin-right: auto;
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

html[dir='ltr'] .source-badge { margin-right: 0; margin-left: auto; }

.source-badge i { color: var(--success); }

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 12px;
  transition: all var(--transition-fast);
}

.refresh-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow-sm);
}

/* ============================================================
   Match Details Panel, H2H & Polls
   ============================================================ */
.match-row {
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
}
.match-row:hover {
  background: var(--bg-card-hover);
}
.match-details-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-top: none;
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeInDown 0.3s ease-out;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 8px; /* space before next row */
}

/* Make sure the match row above details doesn't have a bottom border if expanded */
.match-row.expanded {
  border-bottom-color: transparent;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: var(--bg-card-2);
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .details-grid { grid-template-columns: 1fr; }
}

.details-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.details-section-title {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.details-section-title i { color: var(--primary); }

/* Team Stats Bars */
.stat-item {
  margin-bottom: 12px;
}
.stat-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.stat-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  display: flex;
  overflow: hidden;
}
.stat-bar-fill-home {
  height: 100%;
  background: var(--primary);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}
.stat-bar-fill-away {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full) 0 0 var(--radius-full);
}

html[dir="ltr"] .stat-bar-fill-home { border-radius: var(--radius-full) 0 0 var(--radius-full); }
html[dir="ltr"] .stat-bar-fill-away { border-radius: 0 var(--radius-full) var(--radius-full) 0; }

/* H2H Matches */
.h2h-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.h2h-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}
.h2h-item .h2h-team {
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.h2h-item .h2h-score {
  font-weight: 800;
  padding: 2px 8px;
  background: var(--bg-card-2);
  border-radius: 4px;
  letter-spacing: 1px;
}
.h2h-item .home-team { text-align: left; }
.h2h-item .away-team { text-align: right; }
html[dir="ltr"] .h2h-item .home-team { text-align: right; }
html[dir="ltr"] .h2h-item .away-team { text-align: left; }

.h2h-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  font-weight: 700;
}
.h2h-badge.w { background: var(--success); }
.h2h-badge.d { background: var(--warning); }
.h2h-badge.l { background: var(--danger); }

/* Poll Section */
.poll-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}
.poll-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.poll-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow-sm);
}
.poll-btn:disabled {
  cursor: default;
  color: var(--text-secondary);
}
.poll-fill {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  background: var(--primary-glow);
  z-index: 0;
  width: 0%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
html[dir="ltr"] .poll-fill { right: auto; left: 0; }

.poll-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.poll-percent {
  font-weight: 800;
  color: var(--primary);
}
.poll-btn.selected {
  border-color: var(--primary);
  background: var(--primary-glow-sm);
}
.poll-btn.selected .poll-fill {
  background: var(--primary-glow-sm);
}
.poll-thank-you {
  text-align: center;
  font-size: 13px;
  color: var(--success);
  margin-top: 8px;
  animation: fadeInDown 0.3s ease;
}

/* ============================================================
   Match State Tabs (Live, Pre, Post)
   ============================================================ */
.league-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 18px;
  background: var(--bg-surface);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
@media (max-width: 480px) {
  .league-tabs { margin: 12px; }
}
.league-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.league-tab:hover {
  color: var(--text-primary);
  background: var(--bg-glass-sm);
}
.league-tab.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.league-tab .count-badge {
  background: var(--bg-surface);
  color: inherit;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}
.league-tab.active .count-badge {
  background: var(--primary-glow-sm);
  border-color: var(--border-primary);
}
.state-group {
  display: none;
}
.state-group.active {
  display: block;
  animation: fadeInDown 0.3s ease;
}

/* ============================================================
   Post-Match Stats & MOTM
   ============================================================ */
.match-stat-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.match-stat-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.match-stat-center {
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
}
.match-stat-bar-container {
  display: flex;
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.match-stat-bar-home {
  height: 100%;
  background: var(--primary);
}
.match-stat-bar-away {
  height: 100%;
  background: var(--accent);
}

.motm-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-card-2));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.motm-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; width: 4px; height: 100%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}
html[dir="ltr"] .motm-card::before { right: auto; left: 0; }
.motm-avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  background: var(--bg-card);
}
.motm-info {
  display: flex;
  flex-direction: column;
}
.motm-title {
  font-size: 11px;
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.motm-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.motm-team {
  font-size: 12px;
  color: var(--text-secondary);
}
.motm-rating {
  margin-right: auto;
  margin-left: 0;
  background: var(--gold);
  color: #000;
  font-weight: 800;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}
html[dir="ltr"] .motm-rating { margin-right: 0; margin-left: auto; }

/* ============================================================
   Matches Sections & League Options
   ============================================================ */
.matches-section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 30px 0 16px;
  padding-right: 12px;
  border-right: 4px solid var(--primary);
}
html[dir="ltr"] .matches-section-title {
  padding-right: 0;
  padding-left: 12px;
  border-right: none;
  border-left: 4px solid var(--primary);
}

.league-options-wrapper {
  position: relative;
  margin-right: auto;
  margin-left: 0;
}
html[dir="ltr"] .league-options-wrapper {
  margin-right: 0;
  margin-left: auto;
}
.league-options-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.league-options-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.league-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 8px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}
html[dir="ltr"] .league-dropdown-menu {
  left: auto;
  right: 0;
}
.league-options-wrapper.open .league-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.league-dropdown-item {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: right;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}
html[dir="ltr"] .league-dropdown-item { text-align: left; }
.league-dropdown-item:hover {
  background: var(--bg-surface);
  color: var(--primary);
}
.league-dropdown-item i {
  width: 16px;
  text-align: center;
}

/* ============================================================
   Standings Modal
   ============================================================ */
.standings-modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.standings-modal.show {
  opacity: 1;
  visibility: visible;
}
.standings-modal-content {
  background: var(--bg-card);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid var(--border);
}
.standings-modal.show .standings-modal-content {
  transform: translateY(0);
}
.standings-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}
.standings-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
}
.standings-header-title img {
  width: 32px; height: 32px;
  object-fit: contain;
}
.standings-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s;
}
.standings-close:hover { color: var(--danger); }
.standings-body {
  padding: 0;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}
.standings-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 13px;
}
.standings-table th {
  background: var(--bg-body);
  position: sticky;
  top: 0;
  padding: 10px;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.standings-table th:nth-child(2) {
  text-align: right;
}
html[dir="ltr"] .standings-table th:nth-child(2) { text-align: left; }

.standings-table td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.standings-table td:nth-child(2) {
  text-align: right;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
html[dir="ltr"] .standings-table td:nth-child(2) { text-align: left; }

.standings-table tr:hover td {
  background: var(--bg-surface);
}
.standings-team-logo {
  width: 20px; height: 20px;
  object-fit: contain;
}
.standings-table td.points {
  font-weight: 800;
  color: var(--primary);
}
.standings-loading {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
}
.standings-loading i {
  font-size: 30px;
  color: var(--primary);
  margin-bottom: 10px;
  animation: spin 1s linear infinite;
}

.footer-links-horizontal {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links-horizontal li a {
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 13.5px;
  padding: 7px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}
.footer-links-horizontal li a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}
.footer-links-horizontal li a i { font-size: 10px; opacity: 0.6; }

/* Admin Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 95%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  color: var(--text-primary);
  margin: 0;
}

.close-modal {
  color: var(--text-muted);
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: var(--danger);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.admin-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.admin-tab:hover {
  color: var(--text-primary);
}

.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

.admin-input-group {
  margin-bottom: 15px;
}

.admin-input-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.admin-input-group input[type="text"],
.admin-input-group textarea {
  width: 100%;
  padding: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.admin-input-group input[type="text"]:focus,
.admin-input-group textarea:focus {
  border-color: var(--primary);
}

/* Login/Register Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  width: 90%;
  max-width: 400px;
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 15px;
  left: 15px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover {
  color: var(--danger, #ef4444);
}
.modal-header {
  text-align: center;
  margin-bottom: 25px;
}
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-family: var(--font-cairo);
  text-align: right;
}
.form-group input {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-default);
  color: var(--text-primary);
  font-family: var(--font-inter);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus {
  border-color: var(--primary);
}
.login-btn {
  background: rgba(var(--primary-rgb, 37, 99, 235), 0.1);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb, 37, 99, 235), 0.2);
  transition: all 0.2s;
}
.login-btn:hover {
  background: var(--primary);
  color: white;
}

/* =========================================
   MATCH HUB DETAILS (TIMELINE, STATS, VIDEOS)
   ========================================= */

.match-hub-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.match-hub-final-score {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 10px 0;
  letter-spacing: 2px;
}
.match-hub-status {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}

/* TIMELINE */
.timeline-container {
  position: relative;
  margin: 20px 0;
  padding-right: 20px; /* RTL */
  border-right: 2px solid var(--border);
}
.timeline-event {
  position: relative;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--bg-surface);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease;
}
.timeline-event:hover {
  transform: translateX(-5px); /* RTL */
}
.timeline-event::before {
  content: '';
  position: absolute;
  right: -27px; /* RTL */
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-default);
}
.timeline-minute {
  font-weight: 800;
  color: var(--primary);
  min-width: 40px;
  font-size: 16px;
}
.timeline-icon {
  font-size: 18px;
  color: var(--text-muted);
}
.timeline-icon.goal { color: #27ae60; }
.timeline-icon.yellow-card { color: #f1c40f; }
.timeline-icon.red-card { color: #e74c3c; }
.timeline-icon.sub { color: #3498db; }
.timeline-text {
  flex-grow: 1;
}
.timeline-text strong {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
}
.timeline-text span {
  font-size: 12px;
  color: var(--text-muted);
}

/* STATS GRID */
.detailed-stats-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}
.stat-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-labels {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}
.stat-labels span:nth-child(2) {
  color: var(--text-muted);
  font-size: 13px;
}
.stat-bar-wrapper {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--border);
}
.stat-bar-home {
  height: 100%;
  background: var(--primary);
  transition: width 1s ease-out;
}
.stat-bar-away {
  height: 100%;
  background: var(--secondary);
  transition: width 1s ease-out;
}

/* SCORERS & PLAYERS */
.scorers-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.scorer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.scorer-item:last-child {
  border-bottom: none;
}
.scorer-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.scorer-goals {
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

/* MATCH VIDEOS HUB */
.match-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.match-video-card {
  background: var(--bg-surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.match-video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.match-video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.match-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.match-video-card:hover .match-video-thumb img {
  transform: scale(1.05);
}
.match-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.match-video-card:hover .match-video-overlay {
  opacity: 1;
}
.match-video-overlay i {
  color: #fff;
  font-size: 40px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.match-video-badge {
  position: absolute;
  top: 10px;
  right: 10px; /* RTL */
  background: var(--primary);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.match-video-duration {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  z-index: 2;
}
.match-video-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}
.match-video-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
.match-video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}
.match-video-channel {
  font-weight: 600;
  color: #e74c3c;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   Homepage Vertical Layout (NEW)
   ============================================================ */
.vertical-homepage {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 40px 0 20px;
  width: 100%;
}

.vertical-homepage .widget-box {
  margin-bottom: 0;
}

.horizontal-tournament-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.horizontal-tournament-list li {
  margin-bottom: 0;
}
.horizontal-tournament-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}
.horizontal-tournament-list a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.horizontal-tournament-list img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.news-horizontal-grid, .videos-horizontal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 24px;
}

/* Article Cards Styling (Horizontal Editorial Style) */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
  gap: 24px;
}
.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: row;
  height: 160px;
}
.article-card:hover {
  transform: translateX(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  background: var(--bg-card-hover);
}
.article-thumb {
  width: 130px;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.5s ease;
}
.article-card:hover .article-thumb {
  transform: scale(1.08);
}
.article-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.article-source {
  font-size: 10px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-block;
  background: rgba(34, 197, 94, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  align-self: flex-start;
}
.article-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: auto;
}

/* Mobile Responsiveness for Homepage Grids */
@media (max-width: 600px) {
  .news-horizontal-grid, .videos-horizontal-grid {
    grid-template-columns: 1fr;
  }
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .article-card {
    height: auto;
    min-height: 130px;
  }
  .article-thumb {
    width: 110px;
  }
  .article-body {
    padding: 12px;
  }
  .article-title {
    font-size: 13px;
    -webkit-line-clamp: 3;
  }
  .article-source {
    font-size: 9px;
    padding: 3px 6px;
    margin-bottom: 6px;
  }
}

/* ============================================================
   Comprehensive Responsive Overrides (320px - 1440px)
   ============================================================ */

/* Global Resets for Responsive Media */
img, video, iframe, embed, object {
  max-width: 100%;
}

/* Ensure no horizontal scroll on all screens */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Base Mobile Touch Improvements */
button, .btn, .nav-link, .mobile-nav-link {
  min-height: 44px;
}

/* 1440px */
@media (max-width: 1440px) {
  .container {
    width: 96%;
    max-width: 1200px;
  }
}

/* 1024px (Tablets Landscape / Small Laptops) */
@media (max-width: 1024px) {
  .container {
    max-width: 960px;
  }
  .main-grid {
    grid-template-columns: 200px 1fr 200px;
    gap: 15px;
  }
  .hero-stats-inner {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* 768px (Tablets Portrait / Large Phones) */
@media (max-width: 768px) {
  .container {
    width: 98%;
  }
  .main-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .sidebar-left { order: 2; }
  .main-content { order: 1; }
  .sidebar-right { order: 3; }
  
  .header-nav { display: none; }
  .hamburger { display: flex; }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .post-card {
    flex-direction: column;
  }
  .post-thumb {
    width: 100%;
    height: 200px;
  }
  
  .page-title {
    font-size: 24px;
  }
}

/* 480px (Mobile Phones) */
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
  }
  .footer-bottom-links {
    flex-direction: column;
    gap: 10px;
  }
  .hero h2 {
    font-size: 22px;
  }
  .hero-stats-inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hero-stat {
    width: 100%;
  }
  .top-bar-date {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
  }
  .top-bar-social {
    justify-content: center;
    width: 100%;
  }
  .top-bar .container {
    flex-direction: column;
    height: auto;
    padding: 10px 0;
  }
}

/* 320px (Small Mobile Phones) */
@media (max-width: 320px) {
  .hero h2 {
    font-size: 18px;
  }
  .news-horizontal-grid, .videos-horizontal-grid, .articles-grid {
    grid-template-columns: 1fr;
  }
  .article-thumb {
    width: 90px;
  }
  .article-title {
    font-size: 11px;
  }
}

/* ============================================================
   LINEUPS SECTION
   ============================================================ */
.lineups-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 12px;
}

.lineup-team {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.lineup-team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.lineup-formation {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.lineup-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.lineup-players {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lineup-bench { opacity: 0.8; }

.lineup-player {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-primary);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.lineup-player:hover { background: var(--bg-hover); }

.lineup-pos {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 1px 5px;
  border-radius: 3px;
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.lineup-name { flex: 1; }

.lineup-coach {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 640px) {
  .lineups-grid { grid-template-columns: 1fr; }
}

/* --- COMPLETE MOBILE & LIGHT MODE FIXES --- */
@media (max-width: 768px) {
  .top-bar { height: var(--topbar-height) !important; padding-bottom: 0; }
  .top-bar-inner, .top-bar .container { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; justify-content: space-between !important; align-items: center !important; padding: 0 10px !important; height: 100% !important; gap: 10px !important; }
  .top-bar-label { display: none !important; }
  .ticker-wrapper { display: flex; align-items: center; overflow: hidden; flex: 1; min-width: 0; height: 100%; margin: 0; position: relative; z-index: 2; }
  .ticker-track { display: flex; align-items: center; height: 100%; }
  .top-bar-date { flex-shrink: 0; display: flex; align-items: center; height: 100%; font-size: 11px; padding: 0; color: var(--primary) !important; white-space: nowrap; font-weight: 700; position: relative; z-index: 2; }
  
  .header { background: var(--bg-base) !important; border-bottom: none !important; }
  .header-inner { flex-wrap: wrap; height: auto !important; padding: 12px 0 5px; gap: 0; justify-content: space-between; align-items: center; }
  
  /* Fit logo and actions on one line */
  .logo { gap: 6px; flex-shrink: 1; }
  .logo-img { width: 34px; height: 34px; border-width: 1.5px; }
  .logo-text { font-size: 17px; letter-spacing: 1px; }
  
  .header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .icon-btn, .lang-btn { width: 34px; height: 34px; font-size: 14px; padding: 0; display: flex; align-items: center; justify-content: center; }
  .lang-dropdown { display: flex !important; }
  .lang-btn span { display: none; }
  .login-btn { padding: 0 !important; width: 34px !important; height: 34px !important; gap: 0; justify-content: center; }
  .login-btn span { display: none !important; }
  
  .header-nav { display: block !important; width: 100%; order: 3; margin-top: 15px; }
  .nav-links { display: flex !important; flex-direction: row !important; overflow-x: auto; white-space: nowrap; width: 100%; gap: 8px; padding-bottom: 5px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { color: var(--text-secondary) !important; background: transparent; padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 13.5px; }
  .nav-links a.active { background: transparent !important; color: var(--primary) !important; border-color: var(--primary); }
  .nav-links a::after { display: none !important; }
  .hamburger { display: none !important; }
}

@media (min-width: 769px) {
  html[data-theme='light'] .header:not(.scrolled) .nav-links a,
  html[data-theme='light'] .header:not(.scrolled) .logo-text,
  html[data-theme='light'] .header:not(.scrolled) .icon-btn { color: var(--text-primary) !important; }
}


/* Tournaments Table & Loader */
.standings-table { width: 100%; border-collapse: collapse; text-align: center; font-size: 14px; }
.standings-table th { background: var(--bg-body); color: var(--text-muted); padding: 12px; font-weight: 600; font-size: 13px; }
.standings-table td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text-primary); }
.standings-table tr:hover { background: rgba(255,255,255,0.02); }
.standings-table .team-cell { text-align: right; display: flex; align-items: center; gap: 10px; font-weight: 600; justify-content: flex-start; }
.standings-table .team-logo { width: 24px; height: 24px; object-fit: contain; }
.standings-table .pts { font-weight: 800; color: var(--primary); }
.match-subtabs { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 5px; }
.match-subtab { background: var(--bg-body); border: 1px solid var(--border); color: var(--text-muted); padding: 8px 16px; border-radius: 20px; cursor: pointer; white-space: nowrap; font-weight: 600; font-size: 14px; transition: all 0.3s; }
.match-subtab.active { background: var(--primary); color: #000; border-color: var(--primary); }
.loader-spinner { font-size: 32px; color: var(--primary); animation: spin 1s linear infinite; margin-bottom: 15px; display: inline-block; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ============================================================
   100% Responsiveness Guarantee (Global Fixes)
   ============================================================ */
html, body {
  overflow-x: hidden; /* Prevent horizontal scrolling */
  max-width: 100%;
  width: 100vw;
  -webkit-text-size-adjust: 100%;
}

img, video, iframe, canvas {
  max-width: 100% !important;
  height: auto;
}

iframe {
  max-width: 100%;
}

* {
  box-sizing: border-box;
  word-wrap: break-word;
}

/* Ensure containers don't overflow */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }
  .main-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  .sidebar-left, .sidebar-right, .main-content {
    width: 100%;
    margin-bottom: 20px;
  }
  /* Fix sticky elements taking too much space on mobile */
  .sidebar-left > div, .sidebar-right > div {
    position: static !important;
  }
  .matches-stats {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  .stat-chip {
    font-size: 11px;
    padding: 4px 8px;
  }
  /* Fix footer overflow */
  .footer::before {
    width: 90%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-stats-inner {
    flex-direction: column;
  }
  .hero-stat {
    width: 100%;
  }
  .news-grid, .videos-grid, .tournaments-grid {
    grid-template-columns: 1fr !important;
  }
  .league-tabs {
    flex-wrap: wrap;
    gap: 4px;
  }
  .league-tab {
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 8px 4px;
  }
  .match-row {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
  }
  .row-team {
    justify-content: center;
    width: 100%;
  }
  .row-team.away {
    flex-direction: row-reverse;
  }
  .row-center {
    width: 100%;
    justify-content: center;
  }
  .match-details-panel {
    grid-template-columns: 1fr !important;
  }
}


/* Global Header Fix: Always show navigation links on mobile */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap !important;
  }
  .hamburger {
    display: none !important;
  }
  .header-nav {
    display: block !important;
    width: 100% !important;
    order: 3 !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
    margin-top: 10px;
    scrollbar-width: none; /* Hide scrollbar Firefox */
  }
  .header-nav::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
  }
  .nav-links {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    gap: 15px !important;
  }
  .nav-links li {
    display: inline-block;
  }
  .nav-links li a {
    font-size: 13px !important;
    padding: 6px 10px !important;
  }
}


/* Mobile Customization: Top Bar and Header Actions */
@media (max-width: 768px) {
  /* Date on left, ticker passing and disappearing */
  .top-bar {
    height: var(--topbar-height) !important;
    padding-bottom: 0;
  }
  .top-bar-inner, .top-bar .container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 10px !important;
    height: 100% !important;
    gap: 10px !important;
  }
  .top-bar-label {
    display: none !important; /* Hide 'Urgent' on mobile to give space to ticker */
  }
  .ticker-wrapper {
    display: flex;
    align-items: center;
    overflow: hidden; /* This makes the ticker disappear when reaching the date */
    flex: 1;
    min-width: 0;
    height: 100%;
    margin: 0;
    position: relative;
    z-index: 2;
  }
  .ticker-track {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap !important;
    width: max-content !important;
    animation: tickerScroll 45s linear infinite !important;
  }
  .top-bar-date {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: 100%;
    font-size: 11px;
    padding: 0;
    color: var(--primary) !important;
    white-space: nowrap;
    font-weight: 700;
    position: relative;
    z-index: 2;
  }


  /* Header Actions on far left */
  .header-inner {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px !important;
  }
  .header-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    margin-right: auto !important; /* Pushes to far left in RTL */
    margin-left: 0 !important;
  }
  /* Simplify buttons to fit nicely on mobile */
  .login-btn span, .lang-btn span {
    display: none !important;
  }
  .login-btn, .lang-btn {
    padding: 8px !important;
    width: auto !important;
    min-width: 0 !important;
  }
  #searchBtn {
    display: flex !important;
  }
}


#loginBtn { display: none !important; }


/* Admin Settings Button Visibility */
#adminSettingsBtn { display: none !important; }
body.admin-mode-unlocked #adminSettingsBtn { display: flex !important; }
