/* === Global Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
  scroll-behavior: smooth;
  color: #fff;
}

body {
  background-color: #0e0e0e;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Header/Nav === */
header {
  background: #111;
  padding: 1rem 1.5rem 0.5rem 1.5rem; /* Adjusted padding to raise logo */
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

#navbar {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* === Row 1: Logo and Search aligned horizontally === */
.nav-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Align logo to top edge */
  flex-wrap: wrap;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'Orbitron', sans-serif;
  color: white;
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 2px; /* Added to help spacing on small screens */
}

.logo .highlight,
.logo .letter {
  color: gold;
}

.logo .letter {
  animation: strikeFlash 10s ease-in-out infinite;
  transform-origin: center;
}

@keyframes strikeFlash {
  0%, 95%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  45% {
    transform: scale(1.1) rotate(-10deg);
    opacity: 0.6;
  }
  50% {
    transform: scale(0.95) rotate(10deg);
    opacity: 0.3;
  }
  55% {
    transform: scale(1.1) rotate(-5deg);
    opacity: 0.7;
  }
}

/* === Search Bar === */
/* === Search Bar (Collapsible) === */
.search-bar {
  display: flex;
  align-items: center;
  background: #222;
  border: 1px solid #444;
  border-radius: 20px;
  padding: 5px 10px;
  position: relative;
  transition: all 0.3s ease;
  margin-left: auto;
}

.search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  width: 0;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.search-bar.active input {
  width: 160px;
  opacity: 1;
  pointer-events: auto;
  margin-left: 8px;
}

.search-bar .search-icon {
  font-size: 1rem;
  color: gold;
  cursor: pointer;
}
/* === Row 2: Navigation Links === */
.nav-links {
  display: flex;
  justify-content: space-between; /* Changed from space-around */
  list-style: none;
  width: 100%;
  flex-wrap: nowrap; /* Prevents breaking */
  overflow-x: auto; /* Scroll if needed */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  text-decoration: none;
  padding: 8px 16px;
  font-weight: 900;
  border-radius: 5px;
  color: white;
  transition: background 0.3s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: gold;
  color: #111;
}

/* === Main Section === */
main {
  flex: 1;
  padding: 2rem;
}

/* === League Section === */
.league-section {
  margin-bottom: 2rem;
  padding-left: 1rem;
}

.league-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: gold;
}

/* === Match Cards === */
.match-card {
  background-color: #1a1a1a;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #333;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.match-card:hover {
  transform: scale(1.02);
  border-color: gold;
}

.match-card .teams {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  align-items: center;
}

.team-logo {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  background: black;
  padding: 5px;
  object-fit: contain;
}

.match-card p {
  margin-top: 0.5rem;
  color: #ccc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.play-icon {
  color: white;
  font-size: 1rem;
}

.match-card.live .play-icon {
  color: red;
}

.live-tag {
  color: red;
  font-weight: bold;
  animation: pulseFade 5s infinite;
}

@keyframes pulseFade {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.2);
  }
}

/* === Highlights Grid === */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.highlight-card {
  background: #1e1e1e;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
}

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

.highlight-card video {
  width: 100%;
  display: block;
}

.highlight-card h3 {
  margin: 10px;
  font-size: 16px;
  text-align: center;
  color: white;
}

/* === News Section === */
#news-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 1rem;
}

.news-card {
  background: #1e1e1e;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
}

.news-card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 10px gold;
}

.news-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.news-card .news-info {
  padding: 10px 15px;
}

.news-card .source {
  font-size: 12px;
  color: gold;
}

.news-card h3 {
  font-size: 16px;
  margin: 6px 0;
}

.news-card p {
  font-size: 14px;
  color: #ccc;
}

/* === Footer === */
footer {
  background: #111;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  margin-top: auto;
}

footer .social-links {
  margin-top: 0.5rem;
}

footer a {
  color: gold;
  text-decoration: none;
  margin: 0 10px;
}

/* === Fixed Bottom Navigation (All Devices) === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #111;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #333;
  padding: 8px 0;
  z-index: 999;
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.85rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  transition: color 0.3s ease;
}

.bottom-nav .nav-item i {
  font-size: 1.2rem;
  margin-bottom: 3px;
}

.bottom-nav .nav-item:hover,
.bottom-nav .nav-item.active {
  color: gold;
}

/* === Utility === */
.hidden {
  display: none;
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
  .search-bar  {
    margin-left: auto;
  }

  .match-card .teams {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .nav-top-row {
    flex-direction: row;
    align-items: space-between;
    gap: 0.6rem;
  }
}
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #111;
  padding: 0.4rem 0;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-top: 1px solid #333;
}

.nav-item {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: white;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.3rem 0;
  border: none;
  background: none;
}

.nav-item i {
  font-size: 1.2rem;
}

.nav-item.active {
  color: gold;
}
/* === HIGHLIGHTS OVERRIDES === */
#highlights-section {
  margin-top: 20px;
}

#highlights-section .highlight-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

#highlights-section .highlight-controls label {
  font-weight: bold;
  font-size: 14px;
}

#highlights-section .highlight-controls input[type="date"] {
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 6px 10px;
  color: #fff;
}

/* Grid override */
#highlights-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Card styling */
#highlights-section .highlight-card {
  background: #1e1e1e;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

#highlights-section .highlight-card:hover {
  transform: scale(1.03);
}

#highlights-section .highlight-card h3 {
  margin: 10px;
  font-size: 16px;
  text-align: center;
  color: gold;
}

#highlights-section .highlight-card p {
  margin: 0 10px 10px;
  font-size: 14px;
  color: #ccc;
}

/* Video wrapper so MP4 and YouTube look the same */
#highlights-section .video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  background: black;
}

#highlights-section .video-wrapper iframe,
#highlights-section .video-wrapper video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Empty/Error messages */
#highlights-section .highlight-empty,
#highlights-section .highlight-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px;
  font-size: 16px;
  color: #aaa;
}

/* Load More button */
#highlights-section .highlight-loadmore {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 10px;
}

#highlights-section .highlight-loadmore button {
  background: gold;
  color: #000;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

#highlights-section .highlight-loadmore button:hover {
  background: #ffcc00;
}
/* === Loader (Floating Lightning in Gold) === */
#loader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: transparent; /* no dark overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 2000;
  font-family: 'Orbitron', sans-serif;
  animation: fadeOut 1s ease forwards;
  animation-delay: 2s; /* adjust to keep it longer if needed */
}

#loader .icon {
  font-size: 3rem;
  color: gold; /* ✅ always gold */
  animation: strikeFlash 1.5s infinite;
}

#loader p {
  margin-top: 10px;
  font-size: 1rem;
  color: white;
}

/* Fade out smoothly */
@keyframes fadeOut {
  to { opacity: 0; visibility: hidden; }
}

/* Lightning flash animation */
@keyframes strikeFlash {
  0%, 95%, 100% { transform: scale(1); opacity: 1; }
  45% { transform: scale(1.1) rotate(-10deg); opacity: 0.6; }
  50% { transform: scale(0.95) rotate(10deg); opacity: 0.3; }
  55% { transform: scale(1.1) rotate(-5deg); opacity: 0.7; }
}
.match-card p {
  position: relative;
  top: 4px;   /* nudges the whole line downward */
}
/* ==========================
   SCOREBOARD TEXT
   ========================== */
.score-display {
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: 1px;
  transition: all 0.25s ease;
}

.score-display.not-started {
  color: #999; /* gray before kickoff */
}

.score-display.live {
  color: #ff9500; /* bright orange when live */
  text-shadow: 0 0 6px rgba(255, 149, 0, 0.7);
}

.score-display.ft {
  color: #fff; /* white at full time */
}

/* Flash animation when score changes */
.score-pop {
  animation: scoreGlow 0.7s ease;
}
@keyframes scoreGlow {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ==========================
   TIME TEXT
   ========================== */
.time-display {
  font-weight: 700;
  font-size: 1rem;
  margin-left: 6px;
  transition: all 0.3s ease;
}

.time-display.live {
  color: #ff3b30; /* red while live */
  text-shadow: 0 0 6px rgba(255, 59, 48, 0.7);
  animation: timePulse 1.2s infinite;
}

.time-display.ft {
  color: #fff; /* white at full time */
  text-shadow: none;
  animation: none;
}

@keyframes timePulse {
  0%   { transform: scale(1); text-shadow: 0 0 6px rgba(255, 59, 48, 0.7); }
  50%  { transform: scale(1.2); text-shadow: 0 0 16px rgba(255, 59, 48, 1); }
  100% { transform: scale(1); text-shadow: 0 0 6px rgba(255, 59, 48, 0.7); }
}

/* ==========================
   PLAY ICON
   ========================== */
.play-icon {
  font-size: 1.2rem;
  color: #fff; /* default white */
  transition: color 0.3s ease;
}

.play-icon.live {
  color: #ff3b30; /* red during live */
}
/* === Install Button === */
.install-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  margin-left: 10px;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.install-btn:hover {
  color: #ffcc00;
}

/* Keep icon aligned beside search bar */
.nav-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Responsive */
@media (max-width: 600px) {
  .install-btn {
    font-size: 1.2rem;
    margin-left: 6px;
  }
}

/* === Toast Notification === */
.install-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #222;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.install-toast.show {
  opacity: 1;
  transform: translateY(0);
}
/* === Highlights Section Patch === */
.highlight-card {
  background: #1a1a1a;
  border-radius: 10px;
  border: 1px solid #333;
  padding: 10px;
  margin: 10px 0;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 8px;
}

.video-wrapper img,
.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.highlight-empty {
  text-align: center;
  padding: 30px;
  color: #aaa;
  font-size: 15px;
}

.highlight-loadmore {
  text-align: center;
  margin: 15px 0;
}

.highlight-loadmore button {
  background: #007bff;
  border: none;
  color: white;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease-in-out;
}

.highlight-loadmore button:hover {
  background: #0056b3;
}
/* === Highlights Fade-in Animation === */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInCard 0.4s ease-out forwards;
}

@keyframes fadeInCard {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Thumbnails smooth load === */
.video-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1 !important; /* force visible */
  transition: none !important;
}
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9; /* forces height */
  overflow: hidden;
  background: #000;
}
.video-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-wrapper img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
  opacity: 1 !important;
  background: none !important;
}

.video-wrapper {
  background: none !important;
  min-height: 180px !important; /* force visible box */
}
/* === Highlight Text Styling === */
.highlight-card {
  background: #1a1a1a;
  border-radius: 10px;
  border: 1px solid #333;
  padding: 10px;
  margin: 10px auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  text-align: center;
  max-width: 360px; /* keeps uniform width on large screens */
}

/* title – brightest white */
.highlight-card h3 {
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  margin: 10px 0 6px;
  line-height: 1.4;
}

/* description – medium white */
.highlight-card p {
  color: #ccc;
  font-size: 14px;
  margin: 0 0 6px;
  line-height: 1.3;
}

/* date – dimmest gray */
.highlight-card small {
  color: #777;
  font-size: 13px;
  display: block;
}

/* container responsive centering */
#highlights-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}
/* === Responsive Highlights Grid === */
#highlights-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  justify-items: center;
  align-items: start;
  padding: 10px 0;
  width: 100%;
  box-sizing: border-box;
}

.highlight-card {
  max-width: 360px;
  width: 100%;
  margin: 0;
}

/* Smooth scaling for desktop */
@media (min-width: 900px) {
  #highlights-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }
}

/* Tablet layout */
@media (min-width: 600px) and (max-width: 899px) {
  #highlights-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile layout (already good) */
@media (max-width: 599px) {
  #highlights-container {
    grid-template-columns: 1fr;
  }
}
/* === Force Highlight Text Colors === */
.highlight-card h3 {
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 600;
  margin: 10px 0 6px;
  line-height: 1.4;
  text-align: center;
}

.highlight-card p {
  color: #ccc !important;
  font-size: 14px !important;
  margin: 0 0 6px;
  line-height: 1.3;
  text-align: center;
}

.highlight-card small {
  color: #777 !important;
  font-size: 13px !important;
  display: block;
  text-align: center;
}
/* Language Selector Styling */
#langSelector {
  appearance: none;
  background-color: #111;
  color: #fff;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 6px 28px 6px 12px;
  font-size: 0.9rem;
  font-family: "Orbitron", sans-serif;
  background-image: url("https://flagcdn.com/w20/gb.png"), linear-gradient(to right, #111 50%, #111 50%);
  background-repeat: no-repeat;
  background-position: 8px center, right 8px center;
  background-size: 20px auto, auto;
  transition: all 0.2s ease;
}

/* Update hover/focus */
#langSelector:hover, #langSelector:focus {
  border-color: #2ee6b7;
  outline: none;
}

/* Small screens */
@media (max-width: 600px) {
  #langSelector {
    font-size: 0.8rem;
    padding: 4px 26px 4px 10px;
    background-size: 18px auto, auto;
  }
}
/* === Language Selector (Rounded WhatsApp Style) === */
#langSelector {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #222;
  background-color: #111;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  outline: none;
  appearance: none;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
}

/* ✅ Hover effect for desktop */
#langSelector:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* ✅ Active (pressed) feedback */
#langSelector:active {
  transform: scale(0.95);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

/* ✅ Responsive for mobile */
@media (max-width: 600px) {
  #langSelector {
    width: 34px;
    height: 34px;
    border: 1.5px solid #222;
  }
}

/* === High-Res Flag Selector with Text in Dropdown === */
#langSelector {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #222;
  background-color: #111;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  outline: none;
  appearance: none;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: transparent; /* hide text when collapsed */
}

/* ✅ Show text properly in dropdown list */
#langSelector option {
  color: #fff;
  background: #111;
  font-size: 14px;
  padding: 4px 8px;
}

/* ✅ Hover and active effects */
#langSelector:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}
#langSelector:active {
  transform: scale(0.95);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

/* ✅ Mobile scaling */
@media (max-width: 600px) {
  #langSelector {
    width: 36px;
    height: 36px;
    border: 1.5px solid #222;
  }
}
/* 🌍 Language Selector */
.lang-select-wrapper {
  margin-left: 8px;
  display: flex;
  align-items: center;
}

.lang-select-wrapper select {
  background: #000;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 0.85rem;
  cursor: pointer;
  width: auto;
  min-width: 80px;
}

@media (max-width: 768px) {
  .lang-select-wrapper {
    margin-top: 6px;
    width: 100%;
    justify-content: flex-start;
  }
  .lang-select-wrapper select {
    width: 40%;
  }
}
html[lang="ar"] {
  direction: ltr !important;
}
#broadcast-status {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 15px;
  text-align: center;
}

.status-box {
  background: #0f0f0f;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid #1f1f1f;
  max-width: 300px;
  animation: fadeIn 0.3s ease;
}

.status-loader {
  width: 38px;
  height: 38px;
  border: 3px solid #222;
  border-top: 3px solid #f5c542;
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 1s linear infinite;
}

.status-btn {
  background: #f5c542;
  color: #000;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  margin-top: 12px;
}

.hidden { display: none; }

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

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
/* === New gold pill active tab === */

.nav-links {
  gap: 6px;
}

.nav-links a {
  background: transparent;
  color: #aaa;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 14px;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a.active {
  background: gold;
  color: #111;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(255,215,0,0.4);
}

/* Smooth Tab Transitions */
.tab-section {
  animation: fadeIn 0.3s ease-in-out;
}

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

/* Optional: Prevent horizontal scroll during swipe */
body {
  overflow-x: hidden;
  touch-action: pan-y; /* Allows vertical scrolling but lets JS handle horizontal */
}
/* --- 3D Tactile Favorite Badge (Logo Only) --- */
#favorite-display {
    position: fixed;
    top: 10px;
    right: 12px;
    z-index: 1001;
    
    /* 🛠️ Fixed Size: This ensures it never grows or pushes elements */
    width: 38px;
    height: 38px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Clean 3D "Inset" look - No Gold Glow */
    background: linear-gradient(145deg, #1e1e1e, #111111);
    border-radius: 50%;
    border: none;
    
    /* 3D Depth Shadows */
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.05), /* Top subtle highlight */
        0 4px 8px rgba(0, 0, 0, 0.6),             /* Outer depth shadow */
        0 0 0 1px rgba(255, 255, 255, 0.03);      /* Very faint outline */
        
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Tactile "Press" effect when clicked */
#favorite-display:active {
    transform: translateY(1px) scale(0.96);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.8),
        0 1px 2px rgba(0, 0, 0, 0.2);
}

#favorite-logo {
    width: 22px;  /* Small and centered */
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5)); /* Adds 3D pop to logo */
}

/* 🧼 Clean Up: Force-hide the elements you want scraped */
#favorite-name, 
#changeFavoriteBtn {
    display: none !important;
    visibility: hidden;
}

/* 🖥️ PC/Desktop Positioning Adjustment */
@media (min-width: 1024px) {
    #favorite-display {
        /* Move it leftward so it doesn't overlap the Search/Download buttons */
        right: 140px; 
        top: 12px;
    }
}

/* 📱 Mobile Safety: Ensure it doesn't hide behind the Search Icon */
@media (max-width: 480px) {
    #favorite-display {
        width: 34px;
        height: 34px;
        right: 10px;
    }
    #favorite-logo {
        width: 20px;
        height: 20px;
    }
}


/* =================================
   DriftWide PWA Install System
================================= */

/* Hide utility */
.hidden{
display:none !important;
}

/* =================================
   Install Popup
================================= */

.install-popup{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,.85);
display:flex;
align-items:center;
justify-content:center;
z-index:999999;
}

.install-popup-content{
background:#111;
padding:24px;
border-radius:12px;
width:90%;
max-width:420px;
text-align:center;
color:#fff;
box-shadow:0 15px 40px rgba(0,0,0,.6);
}

.install-popup-content h3{
margin:0 0 10px 0;
font-size:18px;
font-weight:600;
}

.install-popup-content p{
font-size:14px;
line-height:1.45;
opacity:.9;
}

/* Popup buttons */

.install-popup-buttons{
display:flex;
gap:10px;
margin-top:18px;
}

.install-popup-buttons button{
flex:1;
padding:12px;
border:none;
border-radius:8px;
font-weight:bold;
cursor:pointer;
transition:.15s;
}

.install-popup-buttons button:active{
transform:scale(.96);
}

#installNowBtn{
background:#ffd400;
color:#000;
}

#installLaterBtn{
background:#333;
color:#fff;
}

/* =================================
   Install Guide Overlay
================================= */

.install-guide{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,.95);
display:flex;
align-items:center;
justify-content:center;
padding:20px;
z-index:9999999;
}

/* Guide card */

.guide-content{
background:#111;
padding:22px;
border-radius:12px;
width:100%;
max-width:420px;
text-align:center;
color:white;
}

/* Browser choice buttons */

.browser-buttons{
display:flex;
gap:12px;
margin-top:15px;
}

.browser-buttons button{
flex:1;
padding:12px;
border:none;
border-radius:8px;
background:#ffd400;
color:black;
font-weight:bold;
cursor:pointer;
}

/* =================================
   Guide Step Images
================================= */

#installGuideImg{
width:100%;
max-height:55vh;
object-fit:contain;
border-radius:10px;
margin-bottom:12px;
}

/* Instruction text */

.guide-text{
font-size:14px;
line-height:1.4;
margin-top:6px;
opacity:.9;
}

/* =================================
   Guide Controls
================================= */

.guide-controls{
display:flex;
align-items:center;
justify-content:space-between;
margin-top:14px;
gap:10px;
}

#guideStepIndicator{
font-size:13px;
opacity:.85;
}

.guide-controls button{
padding:9px 14px;
border:none;
border-radius:7px;
background:#ffd400;
color:black;
font-weight:bold;
cursor:pointer;
}

/* Close guide button */

#closeInstallGuide{
margin-top:15px;
padding:10px 16px;
border:none;
border-radius:8px;
background:#333;
color:white;
font-weight:600;
cursor:pointer;
}

/* =================================
   Animations
================================= */

@keyframes installFadeIn{
from{
opacity:0;
transform:scale(.95);
}
to{
opacity:1;
transform:scale(1);
}
}

.install-popup-content,
.guide-content{
animation:installFadeIn .25s ease;
}
/* ===== ROBUST MATCH CARD LAYOUT FIX ===== */

@media (max-width:768px){

.match-card{
  min-height:70px !important;
  overflow:hidden !important;
}

/* lock structure */
.match-card .teams{
  display:grid !important;
  grid-template-columns:30px 1fr auto 1fr 30px !important;
  align-items:center !important;
  gap:8px !important;
  width:100% !important;
}

/* logos never stretch */
.match-card .team-logo{
  width:28px !important;
  height:28px !important;
  object-fit:contain !important;
  flex-shrink:0 !important;
}

/* team names never break layout */
.match-card .teams span{
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}

/* keep score centered */
.match-card .score-display{
  min-width:60px !important;
  text-align:center !important;
  font-weight:600 !important;
}

/* prevent internal wrapping */
.match-card .teams *{
  min-width:0 !important;
}

}
/* ===== LARGER + MODERN MATCH CARDS ===== */

@media (max-width:768px){

.match-card{
  min-height:100px !important;
  padding:20px 18px !important;
  border-radius:20px !important;
}

.match-card .teams{
  padding:4px 0 !important;
}

.match-card .team-logo{
  width:34px !important;
  height:34px !important;
}

.match-card .score-display{
  font-size:18px !important;
  font-weight:700 !important;
}

#matches-container{
  gap:16px !important;
}

}

/* ===== FINAL MOBILE MATCH CARD LAYOUT ===== */

@media (max-width:768px){

/* allow cards to use almost full screen width */
main{
  padding-left:6px !important;
  padding-right:6px !important;
}

#home-section{
  padding-left:0 !important;
  padding-right:0 !important;
}

#matches-container{
  padding-left:0 !important;
  padding-right:0 !important;
  gap:14px !important;
}

/* card size */
.match-card{
  width:100% !important;
  min-height:92px !important;
  padding:18px 16px !important;
}

/* stable layout */
.match-card .teams{
  display:grid !important;
  grid-template-columns:32px 1fr auto 1fr 32px !important;
  align-items:center !important;
  gap:10px !important;
}

/* logos */
.match-card .team-logo{
  width:30px !important;
  height:30px !important;
  object-fit:contain !important;
  flex-shrink:0 !important;
}

/* FotMob style dynamic text sizing */
.match-card .teams span{
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:clamp(0.85rem,2.6vw,1rem) !important;
}

/* score styling */
.match-card .score-display{
  min-width:58px !important;
  text-align:center !important;
  font-weight:700 !important;
  font-size:clamp(1rem,3vw,1.15rem) !important;
}

}

.match-card:hover {
  transform: scale(1.02);
  border-color: black;
}

/* ===== Modern top navigation tabs ===== */

.nav-links a {
  color: #8a8a8a;
  background: none;
  border-radius: 0;
  position: relative;
  padding: 8px 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: color 0.25s ease;
}

/* hover feel */
.nav-links a:hover {
  color: #dcdcdc;
}

/* active tab text */
.nav-links a.active {
  color: #ffffff;
}

/* animated underline base */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg,#ffffff,#cfcfcf);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.25s ease;
}

/* active underline */
.nav-links a.active::after {
  width: 100%;
}
