/* ===== 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;
}

/* === Custom Dropdown Wrapper === */
.custom-dropdown-wrapper {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 20px 10px;
  font-family: 'Segoe UI', sans-serif;
}

/* === Dropdown Button === */
.custom-dropdown {
  padding: 12px 16px;
  background-color: #fff;
  border: 1px solid #333;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  user-select: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-dropdown:hover,
.custom-dropdown:focus {
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
  outline: none;
}

/* === Dropdown Options List === */
.custom-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-top: 6px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.custom-dropdown-list li {
  padding: 10px 14px;
  font-size: 14px;
  color: #1e293b;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.custom-dropdown-list li:hover {
  background-color: #e0ecff;
  color: #1e40af;
}

/* === Search Button === */
.search-btn {
  margin-left: 10px;
  padding: 12px 340px;
  background-color: #1e40af;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-btn:hover {
  background-color: #1a3a95;
}

/* Layout */
.series-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;  
  margin: 20px 10px 60px 10px;
}

.left-column {
  flex: 2;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  column-gap: 24px;
  row-gap: 20px;
  padding-right: 10px;
}

.right-column {
  flex: 1.5;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Match Card */
.match-card { 
  background: #B9C0C5;
  border-left: 6px solid #945034;
  border-radius: 12px;
  padding: 12px 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;  
}

.match-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.1);
}

.match-header-pill {
  color: #007b00;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 2px;
}

.match-location {
  font-size: 13px;
  color: #007b00;
  font-style: italic;
  font-weight: 500;
  text-align: center;
  margin-bottom: 5px;  
}

.team-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  padding: 2px 4px;
}

.team-score {
  font-weight: 600;
}

.match-result {
  font-size: 13px;
  font-style: italic;
  color: green;
  margin-top: 1px;
  margin-bottom: 1px;
  text-align: left;
}

/* Stats Section */
.right-strip {
  background-color: #2563eb;
  color: white;
  font-size: 18px;
  text-align: center;
  padding: 12px;
  font-weight: 700;
  border-radius: 8px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-subheading {
  font-size: 18px;
  margin-bottom: 15px;
  color: #1e293b;
  border-left: 5px solid #2563eb;
  padding-left: 10px;
  font-weight: 600;
}

.boundary-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 15px 0 25px;
}

.boundary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f5f9;
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  min-height: 40px;
}

.boundary-icon {
  height: 26px;
  width: auto;
  margin-right: 10px;
}

.boundary-value {
  font-size: 18px;
  font-weight: 700;
  color: #2563eb;
  margin-left: auto;
}

.boundary-row:hover {
  background-color: #e0e7ff;
  cursor: default;
}

/* Stat Tables */
.dual-table {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
}

.stat-table {
  flex: 1;
  background: #ffffff;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
  margin-bottom: 20px;
}

.stat-table h4 {
  font-size: 15px;
  margin-bottom: 10px;
  color: #1e293b;
  font-weight: 600;
  border-left: 4px solid #2563eb;
  padding-left: 10px;
}

.stat-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border-radius: 8px;
  overflow: hidden;
}

.stat-table th {
  background-color: #2563eb;
  color: #fff;
  font-weight: 600;
  padding: 10px 12px;
  text-align: center;
  border: none;
}

.stat-table td {
  padding: 10px 12px;
  text-align: center;
  background-color: #fff;
  color: #1e293b;
  border-bottom: 1px solid #e5e7eb;
}

.stat-table td:first-child {
  text-align: center;
  padding-left: 12px;
}

.stat-table tr:last-child td {
  border-bottom: none;
}

.stat-table tr:nth-child(even) td {
  background-color: #f9fafb;
}

/* ====== Mobile Tab Bar ====== */
.mobile-tab-bar {
  display: none;
}
.tab-btn {
  flex: 1;
  padding: 12px 0;
  border: none;
  background: #e0e7ff;
  color: #1e293b;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-bottom: 3px solid transparent;
}
.tab-btn.active {
  background: #2563eb;
  color: #fff;
  border-bottom: 3px solid #1e40af;
}

/* === Optional Animation === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ✅ Mobile Responsive Layout */
@media (max-width: 600px) {
  .series-content {
    flex-direction: column;
    gap: 20px;
  }

  .left-column {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding-right: 0;
  }

  .right-column {
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin-top: 10px;
  }

  .match-card {
    padding: 10px 12px;
    font-size: 13px;
  }

  .match-header-pill,
  .match-location {
    font-size: 13px;
    text-align: center;
  }

  .match-result {
    font-size: 13px;
    text-align: left;
  }

  .team-row {
    font-size: 13px;
    padding: 2px;
    justify-content: space-between;
  }

  .right-strip {
    font-size: 16px;
    padding: 10px;
    text-align: center;
  }

  .stat-table h4 {
    font-size: 14px;
    padding-left: 8px;
  }

  .stat-table table {
    font-size: 12px;
  }

  .stat-table th,
  .stat-table td {
    padding: 8px 10px;
  }

  .boundary-row {
    padding: 8px 12px;
  }

  .boundary-icon {
    height: 24px;
  }

  .styled-dropdown,
  .search-btn {
    width: 95%;
    font-size: 14px;
    padding: 10px;
  }

  .series-search-section {
    flex-direction: column;
    align-items: stretch;
  }

  .dual-table {
    flex-direction: column;
  }

  .stat-table {
    width: 100%;
    margin-bottom: 15px;
  }
}

/* === Mobile Responsive === */
@media (max-width: 768px) {
  .custom-dropdown-wrapper {
    max-width: 95%;
    margin-left: 10px;
    margin-right: 10px;
  }

  .custom-dropdown,
  .custom-dropdown-list li {
    font-size: 14px;
  }

  .custom-dropdown {
    width: 100%;
  }

  .mobile-tab-bar {
    display: flex;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  }
  
  .right-column, .left-column {
    width: 100%;
    display: none;
  }
  
  .right-column.tab-visible,
  .left-column.tab-visible {
    display: block;
  }
}

/* =================== 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;
  }
}
