/* =============================================
   COMPONENTS.CSS - Green Park Stadium Portal
   Reusable card, scorecard, and UI components
   ============================================= */

/* =============================================
   ENTERPRISE CARDS
   ============================================= */

.enterprise-card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  overflow: hidden;
  border-bottom: 3px solid transparent;
}

.enterprise-card:hover {
  transform: translateY(-8px);
  border-bottom: 3px solid var(--accent-color);
  box-shadow: 0 15px 40px rgba(30, 58, 138, 0.12);
}

.enterprise-card .text-muted {
  color: var(--text-muted) !important;
}

/* Scorecard Card */
.scorecard-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  border-top: 5px solid var(--primary-color);
  transition: all 0.3s ease;
  overflow: hidden;
}

.scorecard-card:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(30, 58, 138, 0.15);
}

/* Border top variants */
.border-t-4 {
  border-top: 4px solid !important;
}

.border-top-4 {
  border-top: 4px solid !important;
}

/* =============================================
   AI PANELS
   ============================================= */

.ai-panel {
  background: linear-gradient(145deg, #ffffff, #F4F7FF);
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-xl);
  padding: 50px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.ai-output-box {
  background: white;
  border-left: 6px solid var(--dark-green);
  border-radius: 8px;
  padding: 30px;
  box-shadow: inset 0 2px 15px rgba(0,0,0,0.03);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.8;
}

/* =============================================
   VIDEO PLAYER COMPONENT
   ============================================= */

.video-wrapper {
  position: relative;
}

.video-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.video-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Click-to-load video thumbnail */
.video-thumbnail-wrapper {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.video-thumbnail-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(30, 58, 138, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.video-thumbnail-wrapper:hover .video-play-overlay {
  background: var(--primary-color);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-play-overlay svg {
  width: 32px;
  height: 32px;
  fill: white;
  margin-left: 4px;
}

/* Decorative corners */
.video-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  pointer-events: none;
}

.video-corner-tl { top: -2px; left: -2px; border-top: 4px solid var(--saffron-gold); border-left: 4px solid var(--saffron-gold); }
.video-corner-tr { top: -2px; right: -2px; border-top: 4px solid var(--saffron-gold); border-right: 4px solid var(--saffron-gold); }
.video-corner-bl { bottom: -2px; left: -2px; border-bottom: 4px solid var(--saffron-gold); border-left: 4px solid var(--saffron-gold); }
.video-corner-br { bottom: -2px; right: -2px; border-bottom: 4px solid var(--saffron-gold); border-right: 4px solid var(--saffron-gold); }

/* Video caption bar */
.video-caption-bar {
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Video stat cards */
.video-stat-card {
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.video-stat-card:hover {
  transform: translateY(-2px);
}

/* =============================================
   STATS CARDS
   ============================================= */

.stat-card {
  padding: 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  font-family: var(--font-heading);
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* =============================================
   BADGES & LABELS
   ============================================= */

.badge {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5em 1em;
  border-radius: 50px;
}

.badge-test { background-color: var(--dark-green); }
.badge-odi { background-color: var(--saffron-gold); color: #333; }
.badge-t20i { background-color: #6D28D9; }
.badge-ipl { background-color: #0891B2; }
.badge-fc { background-color: var(--dark-bg); }

/* =============================================
   FILTER BUTTONS
   ============================================= */

.filter-btn {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  padding: 10px 20px;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  color: white;
}

/* =============================================
   YEAR NAVIGATION
   ============================================= */

.year-btn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 16px;
  border: none;
  background: #E2E8F0;
  color: var(--dark-bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.year-btn:hover,
.year-btn.active {
  background: var(--primary-color);
  color: white;
}

/* =============================================
   LOADING SKELETON
   ============================================= */

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 200px;
  margin-bottom: 1rem;
}

/* =============================================
   FORMAT INDICATORS
   ============================================= */

.format-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.format-dot.test { background: var(--dark-green); }
.format-dot.odi { background: var(--saffron-gold); }
.format-dot.t20i { background: #6D28D9; }
.format-dot.ipl { background: #0891B2; }
.format-dot.fc { background: var(--dark-bg); }

/* =============================================
   MATCH RESULT BADGES
   ============================================= */

.result-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
}

.result-win { background: #DCFCE7; color: #166534; }
.result-loss { background: #FEE2E2; color: #991B1B; }
.result-draw { background: #F3F4F6; color: #374151; }

/* =============================================
   EMPTY STATES
   ============================================= */

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* =============================================
   RESPONSIVE GRID
   ============================================= */

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .matches-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   SECTION HEADERS
   ============================================= */

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-divider {
  width: 80px;
  height: 6px;
  background: var(--accent-color);
  margin: 1.5rem auto;
  border-radius: 3px;
}

/* =============================================
   ANIMATIONS
   ============================================= */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

.animate-slide-up {
  animation: slideUp 0.5s ease forwards;
}