/* ===== Base Styles ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(to right, #eef2f3, #dbe9f4);
  padding: 0;
  min-height: 100vh;
  color: #1e293b;
  overflow-x: hidden;
}

/* 🌀 Carousel Section */
.match-carousel {
  background-color: #65a8ca;
  padding: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 15px;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: #333 #ccc;
}
.match-carousel::-webkit-scrollbar {
  height: 8px;
}
.match-carousel::-webkit-scrollbar-track {
  background: #ccc;
  border-radius: 8px;
}
.match-carousel::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 8px;
}
.carousel-container {
  display: flex;
  gap: 20px;
  min-width: fit-content;
}

/* 🧱 Match Card */
.match-card {
  min-width: 350px;
  background-color: #fff;
  border-radius: 12px;
  padding: 10px 20px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  color: #333;
  font-family: 'Segoe UI', sans-serif;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  font-weight: bold;
  gap: 1px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.match-card:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.match-card:active {
  transform: scale(0.98);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}
.match-header .match-type,
.match-location {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 200;
  color: #007b00;
}
.match-location {
  margin-bottom: 5px;
}
.team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  margin-bottom: 2px;
  font-style: normal;
}
.team-name {
  font-weight: 600;
}
.team-score {
  font-weight: bold;
  color: #222;
}
.overs {
  font-size: 12px;
  color: #888;
  margin-left: 5px;
}
.match-status {
  font-size: 13px;
  color: #007b00;
  font-weight: 200;
  font-family: 'Montserrat', sans-serif;
  border-top: 1px solid #eee;
  padding-top: 4px;
  margin-top: 1px;
  font-style: italic;
}
.match-header {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 6px;
  text-align: center;
}
.match-header .match-full-line {
  background: #e4ecf5;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  font-size: 13px;
  color: #007b00;
  font-family: 'Montserrat', sans-serif;
}
.match-place {
  width: 300px;
  text-align: center;
  font-size: 13px;
  font-family: 'Montserrat', sans-serif;
  color: #007b00;
  margin-bottom: 6px;
  margin-top: -2px;
  font-weight: 200;
}

/* 🟦 Tournament Showcase Strip */
.tournament-showcase-strip {
  background: #fff;
  color: #000000;
  font-size: 1.15em;
  font-weight: 350;
  text-align: center;
  padding: 18px 16px 15px 16px;
  margin: 28px auto 30px auto;
  border-radius: 17px;
  box-shadow: 0 2px 14px rgba(30, 64, 175, 0.07);
  letter-spacing: 0.04em;
  max-width: 1050px;
  line-height: 1.7;
}
.tournament-showcase-strip a {
  color: #4e02ff;
  font-weight: 500;
  text-decoration: underline;
  font-style: italic;
  transition: color 0.18s;
}
.tournament-showcase-strip a:hover {
  color: #2563eb;
  text-decoration: underline;
}
@media (max-width: 600px) {
  .tournament-showcase-strip {
    font-size: 0.99em;
    padding: 13px 7vw 10px 7vw;
    margin: 18px 0 18px 0;
    border-radius: 10px;
    max-width: 99vw;
  }
}

/* =================== REGISTER SECTION =================== */
.register-section {
  background: #fff;
  color: #1a2235;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 1.13rem;
  font-weight: 350;
  font-style: italic;
  text-align: center;
  padding: 2rem 2.5rem 1.25rem 2.5rem;
  margin: 2.5rem auto 1.5rem auto;
  border-radius: 1.25rem;
  box-shadow: 0 2px 14px rgba(30,64,175,0.07);
  letter-spacing: 0.03em;
  max-width: 1050px;
  width: 100%;
  transition: box-shadow 0.22s;
}
.register-section:hover {
  box-shadow: 0 4px 24px 2px rgba(30, 64, 175, 0.13);
}
.register-section p {
  color: #000000;
  font-size: 1em;
  margin-bottom: 1.25rem;
  line-height: 1.55;
}
.register-section b {
  color: #000000;
  font-weight: 450;
}
.register-btn {
  display: inline-block;
  margin-top: 0.4rem;
  background: #2563eb;
  color: #fff;
  padding: 0.8rem 2.25rem;
  border-radius: 0.6rem;
  font-size: 1.10rem;
  text-decoration: none;
  font-weight: 300;
  font-style: italic;
  transition: background 0.18s, box-shadow 0.16s, transform 0.11s;
  box-shadow: 0 1px 7px 0 rgba(30,64,175,0.09);
  border: none;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  outline: none;
  position: relative;
}
.register-btn:active {
  transform: scale(0.98);
}
.register-btn:hover, .register-btn:focus {
  background: #1d4ed8;
  box-shadow: 0 2px 10px 2px rgba(37,99,235,0.15);
}
@media (max-width: 600px) {
  .register-section {
    font-size: 1em;
    padding: 1.25rem 5vw 1rem 5vw;
    margin: 1.1rem 0 1rem 0;
    border-radius: 0.82rem;
    max-width: 99vw;
  }
}

/* =================== MODAL POPUP (REGISTER FORM) =================== */
.modal-bg {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(18,26,43,0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.28s ease-out;
  backdrop-filter: blur(4px);
}
body.modal-open {
  overflow: auto;
}
.modal-content {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 8px 36px 4px rgba(30, 64, 175, 0.13);
  padding: 2.25rem 1.75rem 1.5rem 1.75rem;
  max-width: 380px;
  max-height: 90vh;
  width: 90vw;
  position: relative;
  animation: scaleIn 0.18s ease-out;
  display: flex;  
  font-family: 'Segoe UI', Arial, sans-serif;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.7rem;
  background: none;
  border: none;
  font-size: 2em;
  color: #8ca2b8;
  cursor: pointer;
  transition: color 0.18s, transform 0.16s;
  z-index: 10001;
  line-height: 1;
  padding: 0.18rem;
  opacity: 0.87;
}
.modal-close:hover, .modal-close:focus {
  color: #e21b1b;
  transform: rotate(90deg) scale(1.13);
  opacity: 1;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { transform: scale(0.93) translateY(14px); opacity: 0.74; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
@media (max-width: 600px) {
  .modal-content {
    padding: 1.25rem 4vw;
    border-radius: 0.95rem;
    max-width: 99vw;
  }
  .modal-close {
    font-size: 1.45em;
    top: 0.67rem;
    right: 1rem;
  }
}

/* =================== PINNED PLAYERS/SEARCH SECTION =================== */
.pinned-players-section {
  max-width: 1050px;
  margin: 32px auto 20px auto;
  padding: 0 8px;
}
.section-title {
  font-size: 30px;
  font-weight: 400;
  color: #000000;
  letter-spacing: 0.04em;
  margin-bottom: 15px;
  margin-top: 15px;
  text-align: center;
}
.player-strip {
  background: #fff;
  box-shadow: 0 2px 16px 0 rgba(30,64,175,0.06);
  border-radius: 14px;
  margin-bottom: 18px;
  padding: 16px 18px 15px 18px;
  font-family: 'Segoe UI', Arial, sans-serif;
}
.player-search-strip {
  margin-bottom: 13px;
  padding-bottom: 10px;
}
#homePlayerSearchForm {
  display: flex;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}
#homePlayerSearchBox {
  flex: 1;
  padding: 11px 15px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 15px;
  text-align: center;
  background: #f8fafc;
  outline: none;
  transition: border 0.18s;
}
#homePlayerSearchBox:focus {
  border-color: #000000;
}
#homeSuggestionList {
  position: absolute;
  top: 105%;
  left: 0;
  width: 50%;
  z-index: 12;
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 12px rgba(30,64,175,0.07);
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  max-height: 220px;  
  overflow-y: auto;
  transform: translateX(50%);
  top: 515px;
}
#homeSuggestionList li {
  padding: 11px 17px;
  font-size: 13px;
  font-style: italic;
  text-align: center;
  cursor: pointer;
  transition: background .15s, color .15s;
  border-bottom: 1px solid #f1f5f9;  
}
#homeSuggestionList li:last-child {
  border-bottom: none;
}
#homeSuggestionList li.active, #homeSuggestionList li:hover {
  background: #f0f6ff;
  color: #1e40af;
  font-weight: 600;  
}

/* Trending Player Chips */
.player-trending-strip {
  margin-bottom: 12px;
  padding-bottom: 8px;
}
#homeTrendingList {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 15px;
  margin-bottom: 0;
  list-style: none;
  padding: 0;  
}
#homeTrendingList li {
  background: #DFEBF4;
  color: #1e40af;
  padding: 7px 15px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 400;
  text-align: center;
  font-style: italic;
  cursor: pointer;
  border: 1.1px solid #e0e7ff;
  transition: background 0.16s, color 0.16s;
  box-shadow: 0 1px 5px 0 rgba(30,64,175,0.04);
}
#homeTrendingList li:hover {
  background: linear-gradient(90deg, #1e40af 70%, #6366f1 100%);
  color: #fff;
  border-color: #6366f1;
}
@media (max-width: 600px) {
  .pinned-players-section {
    padding: 0 2vw;
    margin: 15px auto 10px auto;
  }
  .section-title {
    font-size: 1.13rem;
    margin-bottom: 7px;
  }
  .player-strip {
    padding: 12px 3vw 11px 3vw;
    border-radius: 10px;
  }
  #homeTrendingList li {
    font-size: 13.5px;
    padding: 7px 9px;
    border-radius: 9px;
  }
}

/* =================== PINNED UPCOMING SERIES =================== */
.pinned-upcoming-section {
  max-width: 1200px;
  margin: 36px auto;
  padding: 0 18px;
}
.series-info-horizontal {
  display: flex;
  flex-direction: row;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  margin-top: 8px;
  background: transparent;
}
.series-info-horizontal::-webkit-scrollbar {height: 7px; background: #e7eaf3;}
.series-info-horizontal::-webkit-scrollbar-thumb {background: #bdd1ff; border-radius: 4px;}

.series-info {
  flex: 0 0 340px;
  min-width: 310px;
  max-width: 365px;
  background: #FFFFFF;
  border-radius: 17px;
  padding: 22px 25px 18px 25px;
  box-shadow: 0 2px 18px rgba(44,62,80,0.11);
  transition: box-shadow 0.21s, transform 0.19s;
  margin-bottom: 60px;  
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  scroll-snap-align: start;
}
.series-info:hover {
  transform: translateY(-5px) scale(1.017);
  box-shadow: 0 8px 32px rgba(44,62,80,0.18);
}
.series-info h2 {
  font-size: 20px;
  margin-bottom: 14px;
  color: #2563eb;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.12;
  min-height: 2.2em;
}
.series-info p {
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.1;
  color: #26324b;
  font-weight: 350;
  word-break: break-word;
  font-style: italic;
}
.series-info p b {
  color: #000000;
  font-weight: 600;
}
.series-info a {
  color: #2563eb;
  text-decoration: underline;
  transition: color 0.18s;
  word-break: break-word;
}
.series-info a:hover {
  color: #1d4ed8;
}

/* Responsive: Mobile */
@media (max-width: 700px) {
  .pinned-upcoming-section {
    padding: 0 2vw;
    margin: 22px auto 20px auto;
  }
  .series-info-horizontal {
    gap: 20px;
    margin-left: 10px;
    padding-bottom: 7px;
  }
  .series-info {
    flex: 0 0 87vw;
    min-width: 87vw;
    max-width: 98vw;
    scroll-snap-align: start;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(30,30,47,0.11);
    background: #FFFFFF;
    margin-bottom: 0;
    text-align: left;
    padding: 12px 15px 15px 15px;
    margin-top: 10px;
  }
  .series-info h2 {
    font-size: 1.50em;
    padding-bottom: 12px;
    padding-top: 10px;
    min-height: 35px;
    text-align: center;
  }
  .series-info p { font-size: 16px; }
  .series-info-horizontal::-webkit-scrollbar {height: 0;}
  .series-info-horizontal {scrollbar-width: none;}
}
@media (max-width: 500px) {
  .series-info {
    min-width: 70vw;
    max-width: 99vw;
    padding: 8px 6px 10px 20px;
  }
  .series-info-horizontal { gap: 15px; margin-left: 1px; }
}

/* =================== RESPONSIVE FIX =================== */
/* Desktop: footer sticks to bottom */
@media (min-width: 768px) {
  #footer-container {
    margin-top: auto;
  }
}

/* Mobile: footer sits above bottom nav */
@media (max-width: 767px) {
  #footer-container {
    margin-bottom: 55px;
  }
}
