/* ===============================
   MATCH DETAIL SIDEBAR (2Babak.com)
=============================== */
#matchDetailPanel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 650px; /* ✅ default lebar di desktop */
  max-width: 90vw; /* biar gak keluar layar di monitor kecil */
  height: 100vh;
  background: #0f131b;
  color: #fff;
  overflow-y: auto;
  transition: right 0.4s ease;
  box-shadow: -6px 0 12px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  padding: 24px;
  border-left: 1px solid #1e2432;
  scrollbar-width: thin;
  scrollbar-color: #1f2634 #0f131b;
}

#matchDetailPanel.active {
  right: 0;
}

#matchDetailPanel .close-btn {
  position: absolute;
  top: 14px;
  right: 22px;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
  transition: color 0.3s;
}
#matchDetailPanel .close-btn:hover {
  color: #fff;
}

/* ===============================
   Scrollbar & Inner Content
=============================== */
#matchDetailPanel::-webkit-scrollbar {
  width: 8px;
}
#matchDetailPanel::-webkit-scrollbar-thumb {
  background: #1f2634;
  border-radius: 5px;
}
#matchDetailPanel::-webkit-scrollbar-thumb:hover {
  background: #2b3447;
}

/* ===============================
   RESPONSIVE DESIGN
=============================== */

/* Tablet (<=1024px) */
@media (max-width: 1024px) {
  #matchDetailPanel {
    width: 480px;
    padding: 20px;
  }
  #matchDetailPanel .close-btn {
    font-size: 22px;
  }
}

/* Mobile Landscape (<=768px) */
@media (max-width: 768px) {
  #matchDetailPanel {
    width: 100%;
    max-width: 100%;
    right: -100%;
    border-left: none;
    border-top: 1px solid #1f2634;
    top: auto;
    bottom: 0;
    height: 90vh; /* ✅ supaya tetap nyaman dibaca */
    padding: 18px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -6px 12px rgba(0, 0, 0, 0.6);
  }

  #matchDetailPanel.active {
    right: 0;
    bottom: 0;
  }

  #matchDetailPanel .close-btn {
    top: 10px;
    right: 16px;
  }
}

/* Mobile Small (<=480px) */
@media (max-width: 480px) {
  #matchDetailPanel {
    height: 88vh;
    padding: 16px;
    font-size: 15px;
  }
  #matchDetailPanel .close-btn {
    font-size: 20px;
  }
}

/* ===============================
   HEADER CARD
   =============================== */
.match-card {
  background: #151a25;
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  margin-top: 40px;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.match-card .match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.match-card img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}
.match-card h3 {
  font-size: 15px;
  margin-top: 6px;
}
.match-card .score {
  font-size: 36px;
  color: #00ff88;
  font-weight: 700;
}
.match-card small {
  color: #999;
  font-size: 12px;
}

/* ===============================
   SECTION TITLE
   =============================== */
#matchDetailContent h4 {
  margin-top: 25px;
  border-left: 4px solid #00ff88;
  padding-left: 8px;
  font-size: 15px;
  color: #00ff88;
}

/* ===============================
   STATISTIK
   =============================== */
.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 10px;
  border-bottom: 1px solid #222;
  font-size: 13px;
}
.stat-row span:first-child {
  color: #00ff88;
}
.stat-row span:last-child {
  color: #ff9f40;
}

/* ===============================
   PERISTIWA (EVENT)
   =============================== */
.event-group {
  background: #161b24;
  border-radius: 8px;
  margin-top: 10px;
  padding: 8px 10px;
}
.event-group h5 {
  color: #00ff88;
  margin-bottom: 6px;
  font-size: 14px;
}
.event-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #222;
  font-size: 13px;
}
.event-item:last-child { border-bottom: none; }
.event-icon {
  width: 24px;
  text-align: center;
  font-size: 15px;
}
.event-player {
  flex: 1;
  padding: 0 6px;
}
.event-time {
  color: #888;
  font-size: 12px;
}

/* ===============================
   PREDIKSI (UNTUK BELUM MULAI)
   =============================== */
.prediction-box {
  background: #161b24;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 12px;
}
.prediction-box h5 {
  color: #00ff88;
  font-size: 14px;
  margin-bottom: 8px;
}
.prediction-box .pred-team {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #fff;
}
.prediction-box .progress-wrap {
  height: 8px;
  background: #222;
  border-radius: 5px;
  overflow: hidden;
  margin: 6px 0 10px;
  position: relative;
}
.progress-bar.home {
  position: absolute;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #0affc6);
}
.progress-bar.away {
  position: absolute;
  right: 0;
  height: 100%;
  background: linear-gradient(270deg, #ff4f4f, #ff9f40);
}
.pred-draw {
  text-align: center;
  font-size: 12px;
  color: #8b949e;
  margin: 6px 0;
}
.pred-advice {
  background: #111720;
  padding: 6px 10px;
  border-left: 3px solid #00ff88;
  border-radius: 4px;
  color: #ccc;
  font-size: 12px;
}

/* ===============================
   HEAD TO HEAD (H2H) SECTION
=============================== */
#extraDetail h4 {
  margin: 15px 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid #1e2432;
  padding-bottom: 5px;
}

.h2h-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #141a24;
  border: 1px solid #1e2432;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 5px;
  transition: background 0.2s ease;
}

.h2h-row:hover {
  background: #1a202d;
}

.h2h-date {
  font-size: 12px;
  color: #8b949e;
  width: 70px;
  text-align: left;
  flex-shrink: 0;
}

.h2h-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  color: #e6edf3;
  text-align: center;
}

.h2h-teams strong {
  color: #00ff88;
  font-weight: 600;
  min-width: 50px;
  text-align: center;
}

.h2h-teams span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
