/* customFeatures.css - Premium styling for interactive football features */

/* ── Section wrapper for features ────────────────────────────────── */
.features-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* ── Feature Card Base ───────────────────────────────────────────── */
.feature-card {
  background: linear-gradient(135deg, rgba(30,40,55,0.95), rgba(20,30,45,0.98));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 0;
  margin: 20px auto;
  max-width: 1200px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  color: #e0e0e0;
  overflow: hidden;
}

/* ── Countdown Timer ─────────────────────────────────────────────── */
.countdown-inner {
  padding: 24px 30px;
  text-align: center;
}
.countdown-inner h3 {
  margin: 0 0 8px;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 1.1rem;
  color: #4fc3f7;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.countdown-match {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 6px 0 2px;
}
.countdown-comp {
  font-size: 0.85rem;
  color: #90caf9;
  margin: 0 0 14px;
}
.countdown-digits {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.cd-unit {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 0.95rem;
  color: #b0bec5;
}
.cd-unit strong {
  font-size: 1.8rem;
  font-weight: 800;
  color: #4fc3f7;
  font-variant-numeric: tabular-nums;
}

/* ── Match Prediction ────────────────────────────────────────────── */
.prediction-inner {
  padding: 24px 30px;
}
.prediction-inner h3 {
  margin: 0 0 8px;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 1.1rem;
  color: #ffb74d;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
}
.pred-matchup {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin: 4px 0 16px;
}
.pred-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.pred-scores {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pred-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.pred-team label {
  font-size: 0.8rem;
  color: #90a4ae;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pred-team input[type='number'] {
  width: 70px;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  transition: border-color 0.3s;
}
.pred-team input[type='number']:focus {
  border-color: #ffb74d;
  outline: none;
}
.pred-vs {
  font-size: 1.5rem;
  font-weight: 700;
  color: #546e7a;
  margin-top: 20px;
}
.pred-submit {
  padding: 10px 28px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pred-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255,152,0,0.4);
}
.pred-submit:disabled {
  background: #388e3c;
  cursor: default;
  transform: none;
}
.pred-stats {
  font-size: 0.85rem;
  color: #78909c;
  text-align: center;
  margin: 10px 0 0;
}

/* ── Training Drill Selector ─────────────────────────────────────── */
.drill-section {
  padding: 24px 30px;
}
.drill-section h3 {
  margin: 0 0 4px;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 1.1rem;
  color: #66bb6a;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
}
.drill-subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: #78909c;
  margin: 0 0 18px;
}
.drill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.drill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.drill-card:hover {
  background: rgba(102,187,106,0.1);
  border-color: rgba(102,187,106,0.3);
  transform: translateY(-2px);
}
.drill-card.active {
  background: rgba(102,187,106,0.15);
  border-color: #66bb6a;
  box-shadow: 0 0 12px rgba(102,187,106,0.2);
}
.drill-icon {
  font-size: 1.6rem;
}
.drill-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e0e0e0;
  text-align: center;
  line-height: 1.2;
}
.drill-level {
  font-size: 0.65rem;
  color: #78909c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.drill-detail {
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 16px 20px;
  min-height: 60px;
}
.drill-hint {
  text-align: center;
  color: #546e7a;
  font-size: 0.9rem;
  margin: 0;
}
.drill-info h4 {
  margin: 0 0 8px;
  color: #66bb6a;
  font-size: 1.1rem;
}
.drill-info p {
  margin: 0 0 10px;
  color: #b0bec5;
  line-height: 1.5;
}
.drill-meta {
  display: flex;
  gap: 20px;
}
.drill-meta span {
  font-size: 0.85rem;
  color: #78909c;
}

/* ── Stadium Map Explorer Dashboard ──────────────────────────────── */
.stadium-map-explorer {
  height: 550px !important;
  min-height: 500px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  border: 1px solid rgba(255,255,255,0.08);
}

.stadium-dashboard {
  display: flex;
  height: 100%;
  width: 100%;
  background: #111827;
}

/* Sidebar styling */
.stadium-sidebar {
  width: 380px;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.08);
  background: rgba(31, 41, 55, 0.95);
  box-sizing: border-box;
}

.stadium-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.stadium-sidebar-header h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  color: #f59e0b; /* Gold Theme primary color */
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.stadium-sidebar-header p {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: #9ca3af;
}

.stadium-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stadium-search, .stadium-filter {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.3s;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}
.stadium-search:focus, .stadium-filter:focus {
  border-color: #f59e0b;
  background: rgba(255,255,255,0.08);
}

.stadium-list-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: calc(100% - 150px);
}

.stadium-scroll-list {
  height: 100%;
  overflow-y: auto;
  padding: 10px;
}
.stadium-scroll-list::-webkit-scrollbar {
  width: 6px;
}
.stadium-scroll-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

.stadium-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Outfit', sans-serif;
}
.stadium-list-item:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
  transform: translateX(3px);
}
.stadium-list-item.active {
  background: rgba(220, 38, 38, 0.15);
  border-color: #dc2626;
}
.stadium-list-item .item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stadium-list-item .item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}
.stadium-list-item .item-meta {
  font-size: 0.75rem;
  color: #9ca3af;
}
.stadium-list-item .item-arrow {
  color: #6b7280;
  font-weight: bold;
  font-size: 0.95rem;
  transition: transform 0.25s;
}
.stadium-list-item:hover .item-arrow {
  color: #f59e0b;
  transform: translateX(2px);
}

.list-empty {
  padding: 30px;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
}

/* Detail panel styling */
.stadium-details-view {
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}
.stadium-details-view::-webkit-scrollbar {
  width: 6px;
}
.stadium-details-view::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

.stadium-back-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: #d1d5db;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 20px;
  font-family: 'Outfit', sans-serif;
}
.stadium-back-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: #f59e0b;
  color: #fff;
}

.detail-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.detail-header h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px 0;
  line-height: 1.3;
  font-family: 'Outfit', sans-serif;
}
.detail-subtitle {
  font-size: 0.85rem;
  color: #9ca3af;
}

.detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.spec-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.spec-box.full-width {
  grid-column: 1 / -1;
}
.spec-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: #6b7280;
  letter-spacing: 0.5px;
}
.spec-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e5e7eb;
}
.spec-val.green-highlight {
  color: #22c55e;
}
.spec-val.red-highlight {
  color: #ef4444;
}
.spec-val.gold-highlight {
  color: #fbbf24;
}

.detail-history {
  background: rgba(220, 38, 38, 0.04);
  border: 1px solid rgba(220, 38, 38, 0.12);
  padding: 16px;
  border-radius: 10px;
}
.detail-history h5 {
  font-size: 0.9rem;
  color: #f59e0b;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detail-history p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #d1d5db;
}

/* Map pane styling */
.stadium-map-pane {
  flex: 1;
  height: 100%;
  position: relative;
  background: #0f172a;
}

/* Vector Marker custom styling */
.custom-stadium-marker {
  transition: all 0.3s ease;
}
.marker-pin-wrapper {
  position: relative;
  width: 30px;
  height: 42px;
}
.marker-pin {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  position: absolute;
  transform: rotate(-45deg);
  left: 50%;
  top: 50%;
  margin: -15px 0 0 -15px;
}
.marker-pin-wrapper.green-theme .marker-pin {
  background: #16a34a;
  box-shadow: 0 0 10px rgba(22, 163, 74, 0.5);
  border: 1.5px solid #fff;
}
.marker-pin-wrapper.red-theme .marker-pin {
  background: #dc2626;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
  border: 1.5px solid #fff;
}

.marker-icon-dot {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.marker-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  animation: marker-pulse 2s infinite ease-out;
  pointer-events: none;
}
.marker-pin-wrapper.green-theme .marker-pulse-ring {
  border: 3px solid #22c55e;
}
.marker-pin-wrapper.red-theme .marker-pulse-ring {
  border: 3px solid #fbbf24;
}

@keyframes marker-pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Selected active state */
.marker-pin-wrapper.active {
  width: 36px;
  height: 48px;
}
.marker-pin-wrapper.active .marker-pin {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
}
.marker-pin-wrapper.green-theme.active .marker-pin {
  background: #22c55e;
  border-color: #fff;
}
.marker-pin-wrapper.red-theme.active .marker-pin {
  background: #f59e0b;
  border-color: #fff;
}
.marker-pin-wrapper.active .marker-icon-dot {
  font-size: 14px;
  top: 9px;
  left: 9px;
}

/* Popups customization */
.leaflet-popup-content-wrapper {
  background: rgba(31, 41, 55, 0.95) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;
  color: #fff !important;
}
.leaflet-popup-tip {
  background: rgba(31, 41, 55, 0.95) !important;
  border: 1px solid rgba(255,255,255,0.08);
}
.map-popup-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  min-width: 150px;
}
.map-popup-card strong {
  font-size: 0.95rem;
  color: #fff;
}
.map-popup-card span {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 8px;
}
.popup-explore-btn {
  background: #22c55e;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}
.map-popup-card.green-theme .popup-explore-btn {
  background: #16a34a;
}
.map-popup-card.green-theme .popup-explore-btn:hover {
  background: #22c55e;
}
.map-popup-card.red-theme .popup-explore-btn {
  background: #dc2626;
}
.map-popup-card.red-theme .popup-explore-btn:hover {
  background: #ef4444;
}

/* Responsive adjustment */
@media (max-width: 768px) {
  .stadium-map-explorer {
    height: auto !important;
    min-height: auto;
  }
  .stadium-dashboard {
    flex-direction: column;
    height: auto;
  }
  .stadium-sidebar {
    width: 100%;
    height: 380px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .stadium-map-pane {
    width: 100%;
    height: 320px;
  }
}

/* ── Live Ticker overrides ───────────────────────────────────────── */
.live-ticker {
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .feature-card {
    margin: 12px 10px;
    border-radius: 12px;
  }
  .countdown-inner, .prediction-inner, .drill-section {
    padding: 18px 16px;
  }
  .cd-unit strong {
    font-size: 1.4rem;
  }
  .pred-scores {
    gap: 10px;
  }
  .drill-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }
  .stadium-map-explorer {
    height: 300px !important;
    min-height: 280px;
  }
}
