/* Base styles - Mobile First */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.5;
  font-size: 0.875rem; /* Reduced base font size */
  padding-bottom: 60px; /* Space for mobile ad banner by default */
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
    color: #1d4ed8; /* Original link hover color */
}

img {
  max-width: 100%;
}

/* Layout */
.main-container {
  display: flex;
  flex-direction: column-reverse; /* Mobile: sidebar at bottom */
  min-height: calc(100vh - 180px); /* Account for header, footer and ad banner */
  position: relative;
}

/* Header: Make sticky/fixed on mobile */
.header {
  background-color: white;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}

.header h1 {
    color: #1f2937; /* Original header text color */
}

.header a {
    color: #2563eb; /* Original header link color */
}
.header a:hover {
    color: #1d4ed8;
    opacity: 1; /* Reset opacity */
}

.header .border-t {
    border-color: #e5e7eb;
}

.header .featured-match-desktop {
    background-color: #f9fafb;
    border-color: #e5e7eb;
    color: #333;
}
.header .featured-match-desktop .font-semibold {
    color: #64748b;
}
.header .featured-match-desktop .text-gray-700 {
    color: #374151;
}
.header .featured-match-desktop .text-gray-500 {
    color: #6b7280;
}


/* Filter buttons */
.filter-button {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
  background-color: #e5e7eb;
  color: #374151;
  border: none;
  cursor: pointer;
}

.filter-button:hover {
  background-color: #d1d5db;
}

.active-filter {
  background-color: #1d4ed8;
  color: white;
  font-weight: 600;
  border: none;
}

/* Desktop sidebar */
.desktop-sidebar {
  display: none;
  width: 240px;
  padding: 1rem 1rem 1rem 0;
  flex-shrink: 0;
  order: -1;
}

/* Sidebar sections (mobile and desktop) */
.sidebar-section {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  overflow: hidden;
}

.sidebar-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  padding: 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #374151;
  transition: background-color 0.2s;
}

.sidebar-link:hover {
  background-color: #f9fafb;
}

.sidebar-link.active {
  background-color: #eff6ff;
  color: #1e40af;
  font-weight: 500;
}

.sidebar-link img {
  width: 18px; /* Adjust size as needed */
  height: 18px; /* Adjust size as needed */
  margin-right: 0.75rem;
  object-fit: contain; /* Ensure aspect ratio */
  flex-shrink: 0;
}

/* Country accordion */
.country-details {
  border-bottom: 1px solid #f3f4f6;
}

.country-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.country-header:hover {
  background-color: #f9fafb;
}

.country-name {
  flex-grow: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.chevron {
  color: #6b7280;
  transition: transform 0.2s;
}

.country-header img {
  width: 18px; /* Match league logo size */
  height: 18px;
  margin-right: 0.75rem;
  object-fit: contain; /* Ensure aspect ratio */
  border-radius: 2px; /* Optional: slight rounding for flags */
  flex-shrink: 0;
}

/* Main Content Area */
main {
    width: 100%; /* Ensure main content takes full width without right column */
}

.featured-match-mobile .bg-white {
    background-color: white;
}
.featured-match-mobile .text-gray-500 {
    color: #6b7280;
}
.featured-match-mobile .font-medium {
    color: #1f2937;
}
.featured-match-mobile .score-circle-sm {
    /* Style score circle */
}

/* Game card container */
.game-card {
  margin-bottom: 0.75rem;
  display: block;
  width: 100%;
}

/* Game card */
.fm-card {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 0.5rem;
  padding: 0;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.1s, box-shadow 0.1s;
  overflow: hidden;
}

.fm-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Category Header */
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.8rem;
  color: white;
  font-weight: 600;
  position: relative; /* Needed for absolute positioning of progress bar */
  overflow: hidden; /* Hide progress bar overflow */
  /* The background color is set inline via style="background-color: ..." */
}

/* Set the CSS variable for the category color in the HTML inline style, e.g. style="background-color: #10B981; --category-color-rgb: 16,185,129;" */

.category-label {
  font-size: 0.85rem; /* Slightly smaller */
  z-index: 1; /* Ensure label is above progress bar */
}

.category-score-container {
  display: flex;
  align-items: baseline;
  z-index: 1; /* Ensure score is above progress bar */
  /* Use the lighter version of the category color */
  background-color: rgb(255 255 255 / 35%);
  color: #1f2937; /* Dark text for contrast */ 
  padding: 0.4rem 0.8rem;
  border-radius: 9999px; /* Full pill shape */
  font-weight: 700; /* Bolder font */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
  border: 2px solid rgba(255, 255, 255, 0.8); /* Subtle border */
  transition: all 0.2s ease; /* Smooth transition for hover effect */
  cursor: default; /* Default cursor since it's not clickable */
}

.category-score-container:hover {
  background-color: rgb(255 255 255 / 55%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
  transform: translateY(-1px); /* Subtle lift effect */
}

.category-score {
  font-size: 1rem; /* Significantly larger */
  font-weight: 800; /* Extra bold */
  color: #1f2937; /* Ensure dark color for contrast */
}

.category-score-max {
  font-size: 0.8rem; /* Larger than before but proportional */
  opacity: 0.7; /* Slightly faded */
  margin-left: 0.15rem;
  color: #6b7280; /* Lighter grey for /100 */
  font-weight: 600;
}

/* Category Progress Bar */
.category-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 5px; /* Increased height */
  background-color: rgba(255, 255, 255, 0.75); /* Made slightly more opaque */
  transition: width 0.3s ease;
  border-bottom-left-radius: 0.5rem; /* Match card corner radius */
  border-bottom-right-radius: 0.5rem; /* Match card corner radius */
}

/* Card Content Area */
.card-content {
  padding: 0.8rem;
}

/* Adjust fm-header margin */
.fm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.7rem;
  font-size: 0.65rem;
  color: #64748b;
}

/* Match row - remove old margin */
.match-row {
  display: flex;
  align-items: center;
  margin: 0.3rem 0;
  width: 100%;
}

/* Why Watch container - adjust margin */
.why-watch-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid #f1f5f9;
}

.why-text-main {
  font-size: 0.7rem;
  color: #6b7280;
  flex-grow: 1;
  margin-right: 0.8rem;
}

.why-button {
  font-size: 0.7rem;
  color: #2563eb;
  background-color: #eff6ff;
  padding: 0.2rem 0.4rem;
  border-radius: 9999px;
  font-weight: 500;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.why-button:hover {
  background-color: #dbeafe;
}

/* Ad container moved to top */
.ad-container {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  width: 100%; /* Takes full width */
  margin-bottom: 1rem; /* Added margin */
}

.ad-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.ad-content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 0.25rem;
}

.ad-placeholder {
  font-size: 0.9rem;
  color: #64748b;
  text-align: center;
}

/* Modal styles */
.modal {
  position: fixed; /* Position fixed to cover viewport */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: transparent; /* Ensure no background */
  display: flex; /* Use flexbox for centering */
  align-items: center; /* Center vertically */
  justify-content: center; /* Center horizontally */
  z-index: 100; /* Ensure it's on top */
  padding: 1rem; /* Add padding for smaller screens */
  overflow-y: auto; /* Allow scrolling if content overflows */
}

.modal-content {
  background-color: white;
  border-radius: 0.5rem; /* Match card radius */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 500px; /* Max width for the modal */
  max-height: 90vh; /* Max height */
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Clip content */
}

.modal-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-header h3 {
    color: #1e40af;
}

.modal-close {
    color: #6b7280;
}

.modal-body {
  padding: 1rem;
  overflow-y: auto; /* Allow body to scroll if needed */
  flex-grow: 1;
}

.modal-body .font-medium {
    color: #1f2937;
}

.modal-body .text-gray-400 {
    color: #9ca3af;
}

.modal-body .text-gray-700 {
    color: #374151;
}

.modal-body .text-gray-800 {
    color: #1f2937;
}

.modal-body .bg-gray-200 {
    background-color: #e5e7eb;
}

.modal-body .text-gray-500 {
    color: #6b7280;
}

.modal-footer {
  border-top: 1px solid #e5e7eb;
}

.modal-footer button {
    background-color: #2563eb;
    color: white;
}
.modal-footer button:hover {
    opacity: 1;
    background-color: #1d4ed8;
}

/* Load more button */
#load-more {
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

#load-more:hover {
  background-color: #2563eb;
  opacity: 1;
}

#no-games-message {
  color: #6b7280;
}

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

/* Featured match desktop */
.featured-match-desktop {
  display: none; /* Hidden on mobile */
  align-items: center;
  font-size: 0.7rem; /* Smaller font size */
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  padding: 0.3rem 0.8rem;
  background-color: #f9fafb;
  gap: 0.4rem;
  max-width: none; /* Remove max-width constraint */
  flex-wrap: wrap; /* Allow wrapping if needed */
  justify-content: center;
}

.featured-match-desktop span {
  white-space: normal; /* Allow text to wrap */
  overflow: visible; /* Ensure overflow is visible */
}

/* Featured team name */
.featured-team .team-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1e293b;
  white-space: normal; /* Allow text to wrap */
  overflow: visible;
}

/* Featured match why text */
.featured-why-text {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.75rem;
  white-space: normal;
  overflow: visible;
  -webkit-line-clamp: unset; /* Remove line clamp if it was set */
}

/* Media queries for larger screens */
@media (min-width: 768px) {
  body {
    padding-bottom: 0; /* Remove padding on desktop */
  }
  
  .main-container {
    flex-direction: row;
    min-height: calc(100vh - 120px); /* Adjust for desktop (no mobile ad) */
    align-items: flex-start; /* Align columns to the top */
    max-width: 1440px; /* Constrain overall width (adjust as needed) */
    margin: 0 auto; /* Center the constrained container */
    width: 75%; /* Ensure it takes full width *within* the centering */
  }

  .desktop-sidebar {
    display: block;
  }
  
  .featured-match-mobile {
    display: none;
  }
  
  .mobile-ad-banner {
    display: none;
  }
  
  /* Enhanced watchability score for desktop */
  .category-score {
    font-size: 1.4rem; /* Even larger on desktop */
  }
  
  .category-score-max {
    font-size: 0.85rem; /* Slightly larger on desktop */
  }
  
  .category-score-container {
    padding: 0.5rem 1rem; /* More padding on desktop */
  }
  
  /* These were accidentally removed in the previous edit */
  .why-watch {
    width: 50px;
  }

  .why-text {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    text-align: right;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .score-circle {
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }
  
  .score-progress-container {
    width: 45px;
    height: 5px;
  }

  .watchability-score {
    width: 65px;
  }

  .fm-teams-container {
    margin: 0 1rem;
  }

  .team-names {
    font-size: 1rem;
  }
  
  .score-value {
    font-size: 1rem;
  }
  
  .score-max {
    font-size: 0.6rem;
  }
  
  .team-logo, .team-logo-placeholder {
    width: 28px;
    height: 28px;
  }
  
  .team-name {
    font-size: 0.85rem;
  }

  .why-text-main {
    font-size: 0.75rem;
  }
  
  .why-button {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  /* Ensure Top Filters are visible on desktop */
  .filter-container-main {
      display: flex !important; /* Force display */
  }

  /* Ensure Top Matches Row is visible on desktop (Increased Specificity) */
  .main-container .top-matches-row { /* Added .main-container */
      display: flex !important; /* Force display */
  }
}

/* Show the featured match in header only on medium screens (tablets) but not on large screens with the right column */
@media (min-width: 768px) and (max-width: 1199px) {
  .featured-match-desktop {
    display: flex;
  }
}

/* Hide the featured match in header on larger screens where the right column is visible */
@media (min-width: 1200px) {
  .featured-match-desktop {
    display: none;
  }
}

/* Header: Time, Date, League */
.fm-time-section { /* Restore this block if removed */
  display: flex;
  align-items: center;
}

.datetime { /* Restore this block if removed */
  font-weight: 500;
  margin-right: 0.5rem;
  color: #333;
}

.date-display { /* Restore this block if removed */
  color: #94a3b8;
}

.fm-league-section {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 1;
  min-width: 0;
}

.fm-league-section img {
  width: 14px;
  height: 14px;
  max-width: 14px;
  max-height: 14px;
  object-fit: contain;
}

.competition-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.league-round {
  color: #64748b;
  white-space: nowrap;
}

/* Teams row */
.match-row {
  display: flex;
  align-items: center;
  margin: 0.3rem 0;
  width: 100%;
}

/* Teams section */
.teams-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
}

/* Team block (home/away) */
.team-block {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-basis: 0;
    flex-grow: 1;
    min-width: 0;
}

.team-block.home-team {
    justify-content: flex-start;
}

.team-block.away-team {
    justify-content: flex-end;
    text-align: right;
}

.team-logo, .team-logo-placeholder {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.team-logo-placeholder {
    background-color: #f0f0f0;
    border-radius: 50%;
}

.team-name {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.team-standing {
    font-size: 0.7rem;
    color: #6b7280;
    margin: 0 0.2rem;
    white-space: nowrap;
}

/* Adjustments for home/away specifics if needed */
.home-team .team-name span:first-child {
    order: 1;
}
.home-team .team-name span:last-child {
    order: 2;
}

.away-team .team-name span:first-child {
     order: 2;
}
.away-team .team-name span:last-child {
     order: 1;
}

.vs-indicator {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
    flex-shrink: 0;
}

/* Why Watch container */
.why-watch-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid #f1f5f9;
  gap: 0.5rem;
}

/* Ensure these are correctly defined for the featured card as well */
.featured-team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.featured-team .team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.featured-team .team-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.featured-team:last-of-type .team-info {
     align-items: flex-start;
}

.featured-team .team-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1e293b;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  font-family: inherit;
  line-height: 1.3;
}

.featured-team .team-standing {
  font-size: 0.8rem;
  color: #94a3b8;
  font-family: inherit;
}

.team-name {
    font-size: 0.85rem;
}

.featured-match-league img.league-logo {
  width: 20px; /* Adjust size */
  height: 20px; /* Adjust size */
  margin-right: 0.5rem;
  object-fit: contain; /* Ensure aspect ratio */
}

/* Filter buttons in Main Content */
.filter-container-main {
  border-bottom: 1px solid #e5e7eb; /* Add a bottom border to the container */
  margin-bottom: 1rem; /* Adjust margin */
}

.filter-container-main .filter-button {
  background-color: transparent; /* Remove default background */
  color: #6b7280; /* Default text color */
  border: none;
  border-bottom: 3px solid transparent; /* Placeholder for active border */
  border-radius: 0; /* Remove border-radius */
  padding: 0.6rem 0.5rem; /* Adjust padding */
  font-weight: 500;
  transition: color 0.2s, border-color 0.2s;
  margin-right: 1rem; /* Add spacing between buttons */
}

.filter-container-main .filter-button:hover {
  background-color: transparent; /* No background on hover */
  color: #1f2937; /* Darken text on hover */
}

.filter-container-main .active-filter {
  color: #1d4ed8; /* Active color */
  font-weight: 600;
  border-bottom-color: #1d4ed8; /* Active bottom border */
  background-color: transparent; /* Ensure no background */
}

/* Alternative Mobile Featured Match - Visibility controlled by HTML classes */
.featured-match-mobile-alt .bg-white {
    background-color: white;
}
.featured-match-mobile-alt .text-gray-500 {
    color: #6b7280;
}
.featured-match-mobile-alt .text-gray-800 {
    color: #1f2937;
}
.featured-match-mobile-alt .text-gray-400 {
    color: #9ca3af;
}
.featured-match-mobile-alt .text-blue-600 {
    color: #2563eb;
}
.featured-match-mobile-alt .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Bottom Navigation Bar - Visibility controlled by HTML classes */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px; /* Adjust height as needed */
    background-color: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-around; /* Distribute items evenly */
    align-items: stretch; /* Make items fill height */
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
    z-index: 50;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 0.5rem 0.25rem;
    font-size: 0.65rem; /* Smaller font size */
    color: #6b7280; /* Default color */
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    text-align: center;
}

.bottom-nav-item i {
    font-size: 1.1rem; /* Icon size */
    margin-bottom: 0.2rem;
}

.bottom-nav-item:hover {
    color: #374151; /* Darken on hover */
}

.bottom-nav-item.active-filter {
    color: #1d4ed8; /* Active color */
    font-weight: 600;
}

/* Mobile Ad Banner */
.mobile-ad-banner {
  position: fixed;
  /* Set bottom to nav height (adjust if nav height changes) */
  bottom: 60px; 
  left: 0;
  right: 0;
  background-color: white;
  padding: 0.5rem 1rem;
  border-top: 1px solid #e5e7eb;
  z-index: 49; /* Below bottom nav */
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  body {
    /* Ensure padding-bottom is reset for desktop */
    padding-bottom: 0 !important; 
  }
  
  /* Hide mobile-specific elements on desktop */
  .featured-match-mobile-alt {
      display: none !important; /* Ensure it's hidden */
  }
  .bottom-nav {
      display: none !important; /* Ensure it's hidden */
  }
  .mobile-ad-banner {
      display: none !important; /* Hide mobile ad banner on desktop */
  }

  /* Show desktop-specific elements */
  .desktop-right-column { /* Show right column on desktop */
      display: block !important;
  }

  /* These styles should only apply >= 768px */
  .why-watch {
    width: 50px;
  }

  .why-text {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    text-align: right;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .score-circle {
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }
  
  .score-progress-container {
    width: 45px;
    height: 5px;
  }

  .watchability-score {
    width: 65px;
  }

  .fm-teams-container {
    margin: 0 1rem;
  }

  .team-names {
    font-size: 1rem;
  }
  
  .score-value {
    font-size: 1rem;
  }
  
  .score-max {
    font-size: 0.6rem;
  }
  
  .team-logo, .team-logo-placeholder {
    width: 28px;
    height: 28px;
  }
  
  .team-name {
    font-size: 0.85rem;
  }

  .why-text-main {
    font-size: 0.75rem;
  }
  
  .why-button {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}
  
/* Set height for ad content specifically in the right column */
.desktop-right-column .ad-content {
    height: 250px; /* Standard sidebar ad height */
}

/* Desktop Top Matches Snippets */
.top-matches-row {
    /* Uses flex and gap from HTML classes */
}

.top-match-snippet {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent content overflow */
    position: relative; /* Keep for potential future use, or remove if unused */
}

.snippet-star {
    font-size: 0.7rem;
    color: #F59E0B; /* Amber color - or choose another */
    margin-right: 0.4rem; /* Add margin to space it from text */
    vertical-align: middle; /* Align better with text */
}

.snippet-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0.3rem;
    line-height: 1;
}

.snippet-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem; /* Space between main info and score */
    flex-grow: 1;
}

.snippet-main {
    flex-grow: 1;
    min-width: 0; /* Allow shrinking */
}

.snippet-teams {
    display: flex;
    align-items: center;
    font-size: 0.8rem; /* Reduced font size */
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
    gap: 0.3rem;
}

.snippet-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.snippet-teams .vs {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 400;
    margin: 0 0.1rem;
}

.snippet-teams .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.snippet-league,
.snippet-date {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.snippet-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    flex-shrink: 0; /* Prevent score from shrinking */
    line-height: 1;
}

/* Mobile Top Matches Stack */
.mobile-top-matches-stack {
    /* Uses space-y from HTML classes for vertical spacing */
}

/* Remove Desktop Top Match Snippet styles - Ensure removed */
/* .featured-match-desktop-main { ... } */
  
/* Restore Desktop right column styles */
.desktop-right-column {
  display: none; /* Hidden by default */
  width: 300px; /* Adjust width as needed */
  padding: 1rem; /* Base padding for the column */
  flex-shrink: 0;
  order: 1; /* Ensure it comes after main content visually if flex order matters */
}

/* Ad container styles (general, used in right column now) */
.desktop-right-column .ad-container {
  /* Match top padding of main content (p-4 -> 1rem) */
  margin-top: 0; /* Remove potential default margins */
  /* Add other specific styles if needed */
}

/* Set height for ad content specifically in the right column */
.desktop-right-column .ad-content {
    height: 250px; /* Standard sidebar ad height */
}

/* Desktop Top Matches Snippets */
.top-matches-row {
    /* Uses flex and gap from HTML classes */
}

.top-match-snippet {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent content overflow */
    position: relative; /* Keep for potential future use, or remove if unused */
}

.snippet-star {
    font-size: 0.7rem;
    color: #F59E0B; /* Amber color - or choose another */
    margin-right: 0.4rem; /* Add margin to space it from text */
    vertical-align: middle; /* Align better with text */
}

.snippet-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0.3rem;
    line-height: 1;
}

.snippet-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem; /* Space between main info and score */
    flex-grow: 1;
}

.snippet-main {
    flex-grow: 1;
    min-width: 0; /* Allow shrinking */
}

.snippet-teams {
    display: flex;
    align-items: center;
    font-size: 0.8rem; /* Reduced font size */
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
    gap: 0.3rem;
}

.snippet-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.snippet-teams .vs {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 400;
    margin: 0 0.1rem;
}

.snippet-teams .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.snippet-league,
.snippet-date {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.snippet-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    flex-shrink: 0; /* Prevent score from shrinking */
    line-height: 1;
}

/* Mobile Top Matches Stack */
.mobile-top-matches-stack {
    /* Uses space-y from HTML classes for vertical spacing */
}

/* Remove Desktop Top Match Snippet styles - Ensure removed */
/* .featured-match-desktop-main { ... } */
  
/* Mobile Sidebar Modal Overlay */
#mobile-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
}

#mobile-sidebar {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  max-width: 400px;
  max-height: 80vh;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  z-index: 1001;
  overflow-y: auto;
  padding-bottom: 0;
}

@media (min-width: 768px) {
  #mobile-sidebar, #mobile-sidebar-overlay {
    display: none !important;
  }
}

.mobile-sidebar-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
}

.mobile-sidebar-header .close-button {
  margin-left: auto;
  padding: 0.3rem 0.6rem;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 0.375rem;
  transition: background 0.2s;
}

.mobile-sidebar-header .close-button:hover {
  background: #f3f4f6;
}
  
/* Watchability Category Rings - Smaller for header legend */
.watchability-legend-row {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}
.watchability-label {
  font-size: 0.7rem;
  font-weight: 500;
  margin-right: 0.2rem;
  vertical-align: middle;
  color: #000000;
}
.watchability-range {
  color: #94a3b8;
  font-size: 0.7rem;
}
.watchability-ring {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 0.25rem;
  vertical-align: middle;
  border: none;
  background-color: #ccc;
}
.ring-must-watch {
  background-color: #10B981;
}
.ring-highly-recommended {
  background-color: #3B82F6;
}
.ring-recommended {
  background-color: #F59E0B;
}
.ring-consider-watching {
  background-color: #6B7280;
}
@media (min-width: 768px) {
  .watchability-legend-row {
    font-size: 0.7rem;
    margin-bottom: 1rem;
  }
  .watchability-label {
    font-size: 0.7rem;
  }
}
  
/* 7 Days Notice Rectangle */
.seven-days-notice {
  /* Uses Tailwind classes primarily, minimal custom CSS needed */
}

.notice-content {
  /* Uses Tailwind classes, but add custom enhancements */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.notice-text {
  font-size: 0.875rem;
  line-height: 1.4;
}

.notice-close-btn {
  padding: 0.25rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
 
.notice-close-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments for notice */
@media (max-width: 640px) {
  .notice-text {
    font-size: 0.8rem;
  }
  
  .seven-days-notice .notice-content {
    padding: 0.75rem;
  }
}
  
/* Pagination Controls */
.pagination-container {
  /* Container uses Tailwind classes primarily */
}

.pagination-wrapper {
  /* Uses Tailwind flex classes, minimal custom CSS needed */
}

.pagination-btn {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
  background-color: white;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  min-width: 2.5rem;
  justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f9fafb;
  border-color: #d1d5db;
  color: #1f2937;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f9fafb;
  color: #9ca3af;
}

.pagination-btn-nav {
  /* Navigation buttons (prev/next) */
  padding: 0.5rem 1rem;
}

.pagination-btn-page {
  /* Individual page number buttons */
  min-width: 2.5rem;
  height: 2.5rem;
}

.pagination-btn-page.active {
  background-color: #2563eb;
  color: white;
  border-color: #2563eb;
  font-weight: 600;
}

.pagination-btn-page.active:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

.pagination-ellipsis {
  padding: 0.5rem 0.25rem;
  color: #9ca3af;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
}

.pagination-info {
  font-size: 0.7rem;
  color: #6b7280;
}

/* Responsive adjustments for pagination */
@media (max-width: 640px) {
  .pagination-btn-nav {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .pagination-btn-page {
    min-width: 0.5rem;
    height: 2.25rem;
    font-size: 0.7rem;
  }
  
  .pagination-info {
    font-size: 0.7rem;
  }
}
  
@media (max-width: 639px) {
  .watchability-legend-row {
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
    font-size: 0.65rem;
    margin-bottom: 0.3rem;
    justify-content: center; /* Center the items */
  }
  .watchability-label {
    font-size: 0.65rem;
    margin-right: 0.1rem;
    color: #222;
    font-weight: 500;
    line-height: 1.1;
  }
  .watchability-range {
    font-size: 0.6rem;
  }
  .watchability-ring {
    width: 10px;
    height: 10px;
    margin-right: 0.15rem;
  }
  .watchability-legend-row > div {
    margin-bottom: 0.2rem;
    min-width: 120px;
    display: flex;
    align-items: center;
  }
}
  
@media (max-width: 640px) {
  .category-header, .snippet-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
  }
  .category-header .category-label, .snippet-header .category-label {
    margin-bottom: 0 !important;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
  }
  .category-header .category-score-container, .snippet-header .category-score-container {
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
  }
  .snippet-score {
    display: flex;
    align-items: center;
    height: 100%;
  }
}
  
/* Live Match Ticker Styles */
.live-ticker {
    font-family: inherit;
}

.live-ticker-container {
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #d1d5db;
}

@keyframes subtle-pulse {
    from { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
    to { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); }
}

.live-ticker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    background-color: #dc2626;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.live-text {
    color: #374151;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-count {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
}

.live-ticker-content {
    padding: 0.75rem 1rem 1rem;
}

.live-matches-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding-bottom: 0.25rem;
}

.live-matches-scroll::-webkit-scrollbar {
    display: none; /* WebKit browsers */
}

.live-match-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.5rem;
    padding: 0.75rem;
    min-width: 280px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.live-match-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.live-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.live-league-info {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.live-league-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.live-league-name {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 500;
}

.live-watchability-badge {
    background-color: #3b82f6;
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.65rem;
    font-weight: 600;
}

.live-teams-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.live-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}

.live-team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.live-team-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    line-height: 1.2;
}

.live-score-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0 0.5rem;
}

.live-score {
    font-size: 1.5rem;
    font-weight: 800;
    color: #dc2626;
    line-height: 1;
}

.live-status {
    background: #dc2626;
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.no-live-matches {
    padding: 1rem;
    text-align: center;
}

.no-matches-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.no-matches-content i {
    color: #9ca3af;
}

.live-ticker-footer {
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.025);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.refresh-note {
    color: #9ca3af;
    font-size: 0.5rem;
    font-style: italic;
}

/* Live indicator dot for game cards */
.live-indicator-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #dc2626;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Match status styles */
.match-status {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.match-status.live {
    background-color: #dc2626;
    color: white;
}

.match-status.finished {
    background-color: #6b7280;
    color: white;
}

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

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .live-ticker-container {
        border-radius: 0.5rem;
    }
    
    .live-ticker-header {
        padding: 0.625rem 0.75rem;
    }
    
    .live-ticker-content {
        padding: 0.625rem 0.75rem 0.75rem;
    }
    
    .live-match-item {
        min-width: 240px;
        padding: 0.625rem;
    }
    
    .live-team-logo {
        width: 24px;
        height: 24px;
    }
    
    .live-score {
        font-size: 1.25rem;
    }
    
    .live-text {
        font-size: 0.8rem;
    }
}
  
  