/* Base overrides and helpers for the converted PHP version */

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Hero CTA buttons - futuristic, compact */
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 9999px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.hero-btn-gold {
  background: linear-gradient(135deg, #c9a227 0%, #e5c04b 50%, #c9a227 100%);
  color: #0a192f;
  box-shadow:
    0 0 20px rgba(201, 162, 39, 0.25),
    0 0 40px rgba(201, 162, 39, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.hero-btn-gold:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 24px rgba(201, 162, 39, 0.4),
    0 0 48px rgba(201, 162, 39, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.hero-btn-underline {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero-btn-lg {
  padding: 0.625rem 1.5rem;
  font-size: 1.3rem;
}

.hero-btn-glass {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 4px 16px rgba(0, 0, 0, 0.2);
}

.hero-btn-glass:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #0a192f;
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
  box-shadow:
    0 0 20px rgba(255, 255, 255, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.25);
}

@media (min-width: 640px) {
  .hero-btn-glass {
    width: auto;
  }
}

/* Hero background to match original gradient + image */
#hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, #0a192f, #1e3a5f, #0d2137);
}

#hero-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  mix-blend-mode: overlay;
}

/* Simple fade / slide-in utilities (used instead of framer-motion) */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Navbar - glass effect, same color scrolled or not */
#main-navbar,
#main-navbar.navbar-scrolled {
  background-color: rgba(10, 25, 47, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

/* Mobile menu drawer - yellow/amber + indigo gradient */
.mobile-menu-drawer {
  background: linear-gradient(
    160deg,
    #fefce8 0%,
    #dddab0 15%,
    #f7edc6 25%,
    #c3cdec 75%,
    #fefce8 100%
  );
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-right: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    -4px 0 24px rgba(0, 0, 0, 0.06);
}

/* Gallery lightbox */
.lightbox-open {
  overflow: hidden;
}

/* Past date modal - ash header */
#booking-modal.booking-modal--past .booking-modal-header {
  background: linear-gradient(to right, #4b5563, #6b7280, #4b5563) !important;
}

/* Booking calendar - same design as slot release */
.booking-calendar-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.booking-calendar-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
  color: #fff;
}

.booking-calendar-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.booking-calendar-body {
  padding: 0.5rem 0.5rem;
}

.booking-calendar-body .calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.booking-calendar-body .calendar-nav-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  color: #374151;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}

.booking-calendar-body .calendar-nav-btn:hover {
  background: #e5e7eb;
  color: #0a1628;
}

.booking-calendar-body .calendar-month-label {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.booking-calendar-body .calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.booking-calendar-body .calendar-weekdays span {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
}

.booking-calendar-body .calendar-dates {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.booking-date-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 36px;
  border: 1px solid transparent;
}

.booking-date-cell--empty {
  visibility: hidden;
  pointer-events: none;
}

.booking-date-cell--past {
  background: rgba(243, 244, 246, 0.7);
  color: #6b7280;
}

.booking-date-cell--past:hover {
  background: rgba(229, 231, 235, 0.95);
}

.booking-date-cell--available {
  background: rgba(209, 250, 229, 0.85);
  color: #374151;
}

.booking-date-cell--available:hover {
  background: rgba(167, 243, 208, 0.95);
}

.booking-date-cell--partial {
  background: rgba(254, 243, 199, 0.85);
  color: #374151;
}

.booking-date-cell--partial:hover {
  background: rgba(253, 230, 138, 0.95);
}

.booking-date-cell--full {
  background: rgba(254, 226, 226, 0.85);
  color: #374151;
  cursor: not-allowed;
}

/* Not released - light grey, still clickable */
.booking-date-cell--unreleased {
  background: rgba(229, 231, 235, 0.9) !important;
  color: #6b7280 !important;
}

.booking-date-cell--unreleased:hover {
  background: rgba(209, 213, 219, 0.95) !important;
}

.booking-date-cell--today {
  border: 2px solid rgba(212, 175, 55, 0.6);
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.2);
}

.booking-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.booking-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #4b5563;
}

.booking-calendar-legend .legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.booking-calendar-legend .legend-dot--available {
  background: #10b981;
}

.booking-calendar-legend .legend-dot--partial {
  background: #f59e0b;
}

.booking-calendar-legend .legend-dot--full {
  background: #ef4444;
}

.booking-calendar-legend .legend-dot--unreleased {
  background: #9ca3af;
}

.booking-calendar-hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0.5rem 1.25rem 1rem;
}

/* Prevent modal content click from closing */
#booking-modal {
  pointer-events: auto;
}
#booking-modal-overlay {
  overscroll-behavior: contain;
}

/* Booking modal slot icons - fixed colors matching upcoming match */
#booking-slot-morning-icon.slot-icon-morning {
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706) !important;
  box-shadow:
    0 0 12px rgba(251, 191, 36, 0.6),
    0 0 24px rgba(245, 158, 11, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#booking-slot-evening-icon.slot-icon-evening {
  background: linear-gradient(135deg, #f97316, #ef4444, #dc2626) !important;
  box-shadow:
    0 0 12px rgba(249, 115, 22, 0.5),
    0 0 24px rgba(239, 68, 68, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Slot cards: compact, horizontal layout, no text break on mobile */
.booking-slot-card {
  padding: 0.5rem 0.5rem !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease, filter 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Hover effect (desktop) - sleek lift with soft glow */
.booking-slot-card--clickable:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 0 20px rgba(16, 185, 129, 0.08);
}

/* Active/tap feedback - crisp press */
.booking-slot-card--clickable:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

/* Selected state - futuristic neon glow, works on mobile & desktop */
#booking-slot-morning.booking-slot-card--selected,
#booking-slot-evening.booking-slot-card--selected {
  border-width: 2px !important;
  border-color: #34d399 !important;
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.5),
    0 0 20px rgba(52, 211, 153, 0.3),
    0 0 40px rgba(52, 211, 153, 0.15),
    0 4px 20px rgba(0, 0, 0, 0.08) !important;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%) !important;
}
.px-3 {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}
@media (min-width: 640px) {
  .booking-slot-card [id$="-name"],
  .booking-slot-card [id$="-team"],
  .booking-slot-card [id$="-date"] {
    white-space: normal;
    word-break: break-word;
  }
}

/* Upcoming match cards - credit card size, futuristic */
.upcoming-match-card {
  max-width: 360px;
  margin: 0 auto;
}

.upcoming-match-card-inner {
  position: relative;
  aspect-ratio: 1.7;
  min-height: 160px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8),
    0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upcoming-match-card-inner:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.25),
    0 0 20px rgba(34, 211, 238, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.12);
}

.upcoming-match-card-glow {
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 150%;
  background: radial-gradient(ellipse, rgba(34, 211, 238, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.upcoming-match-card-content {
  position: relative;
  height: 100%;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.upcoming-match-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upcoming-match-slot {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  position: relative;
}

.upcoming-match-slot.slot-morning {
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
  box-shadow:
    0 0 12px rgba(251, 191, 36, 0.6),
    0 0 24px rgba(245, 158, 11, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.upcoming-match-slot.slot-evening {
  background: linear-gradient(135deg, #f97316, #ef4444, #dc2626);
  box-shadow:
    0 0 12px rgba(249, 115, 22, 0.5),
    0 0 24px rgba(239, 68, 68, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.upcoming-match-info {
  flex: 1;
  min-width: 0;
}

.upcoming-match-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.5px;
}

.upcoming-match-time {
  font-size: 12px;
  color: #64748b;
  letter-spacing: 0.3px;
}

.upcoming-match-date {
  font-size: 12px;
  color: #64748b;
  flex-shrink: 0;
}

.upcoming-match-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.upcoming-match-details {
  flex: 1;
  min-width: 0;
}

.upcoming-match-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upcoming-match-team {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upcoming-match-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.upcoming-match-logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 100px;
}

.upcoming-match-logo-team {
  font-size: 10px;
  font-weight: 500;
  color: #64748b;
  text-align: center;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}

.upcoming-match-logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.upcoming-match-logo-wrap.no-logo img {
  display: none;
}

.upcoming-match-logo-wrap.no-logo::after {
  content: 'No Logo Found';
  font-size: 9px;
  color: #94a3b8;
  text-align: center;
  padding: 0 4px;
  line-height: 1.2;
  white-space: normal;
}

.upcoming-match-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upcoming-match-logo-placeholder {
  font-size: 9px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
  padding: 0 4px;
}

.upcoming-match-vs {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.upcoming-match-friendly {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  padding: 0 12px;
  text-align: center;
}

/* Thunder / lightning strike for versus (opponent) cards */
.card-thunder-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  border-radius: 12px;
}

.card-lightning-bolt {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 160px;
  transform: translate(-50%, -50%) rotate(-15deg);
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(254, 240, 138, 0.9)) drop-shadow(0 0 20px rgba(250, 204, 21, 0.6));
  animation: lightning-strike 4s ease-in-out infinite;
}

.card-thunder-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 100% at 50% 50%, rgba(254, 240, 138, 0.4) 0%, rgba(250, 204, 21, 0.15) 40%, transparent 70%);
  opacity: 0;
  animation: thunder-flash 4s ease-in-out infinite;
  animation-delay: 0.02s;
}

.upcoming-match-card--versus .upcoming-match-card-content {
  position: relative;
  z-index: 5;
  isolation: isolate;
}

@keyframes lightning-strike {
  0%, 92%, 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-15deg) scale(0.8); }
  93% { opacity: 0; }
  94% { opacity: 1; transform: translate(-50%, -50%) rotate(-15deg) scale(1); }
  95% { opacity: 0.3; }
  96% { opacity: 1; transform: translate(-50%, -50%) rotate(-15deg) scale(1.02); }
  97% { opacity: 0; }
  98% { opacity: 0.6; }
  99% { opacity: 0; }
}

@keyframes thunder-flash {
  0%, 92%, 100% { opacity: 0; }
  93% { opacity: 0; }
  94% { opacity: 0.5; }
  95% { opacity: 0.1; }
  96% { opacity: 0.4; }
  97% { opacity: 0; }
  98% { opacity: 0.2; }
  99% { opacity: 0; }
}

/* Full card snow + wind effect for Friendly Match */
.card-snow-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.upcoming-match-card--friendly .upcoming-match-card-content {
  position: relative;
  z-index: 10;
  isolation: isolate;
}

.card-snowflake {
  position: absolute;
  top: -20px;
  font-size: 12px;
  opacity: 0.75;
  color: #cbd5e1;
  animation: snow-wind-fall 5s linear infinite;
  pointer-events: none;
}

.card-snowflake { left: 5%; animation-delay: 0s; }
.card-snowflake--2 { left: 15%; animation-delay: 0.4s; font-size: 10px; }
.card-snowflake--3 { left: 28%; animation-delay: 0.8s; font-size: 14px; }
.card-snowflake--4 { left: 42%; animation-delay: 1.2s; font-size: 9px; }
.card-snowflake--5 { left: 55%; animation-delay: 0.2s; font-size: 13px; }
.card-snowflake--6 { left: 68%; animation-delay: 1.6s; font-size: 11px; }
.card-snowflake--7 { left: 80%; animation-delay: 2s; font-size: 15px; }
.card-snowflake--8 { left: 92%; animation-delay: 2.4s; font-size: 10px; }
.card-snowflake--9 { left: 10%; animation-delay: 2.8s; font-size: 12px; }
.card-snowflake--10 { left: 35%; animation-delay: 3.2s; font-size: 8px; }
.card-snowflake--11 { left: 60%; animation-delay: 3.6s; font-size: 11px; }
.card-snowflake--12 { left: 85%; animation-delay: 4s; font-size: 9px; }
.card-snowflake--13 { left: 22%; animation-delay: 4.4s; font-size: 13px; }
.card-snowflake--14 { left: 48%; animation-delay: 4.8s; font-size: 10px; }
.card-snowflake--15 { left: 72%; animation-delay: 5.2s; font-size: 12px; }

@keyframes snow-wind-fall {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.75;
  }
  25% {
    transform: translate(15px, 50px) rotate(90deg);
    opacity: 0.6;
  }
  50% {
    transform: translate(-10px, 100px) rotate(180deg);
    opacity: 0.5;
  }
  75% {
    transform: translate(20px, 150px) rotate(270deg);
    opacity: 0.25;
  }
  100% {
    transform: translate(5px, 200px) rotate(360deg);
    opacity: 0;
  }
}

.upcoming-match-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.upcoming-match-price {
  font-size: 14px;
  font-weight: 700;
  color: #059669;
}

.upcoming-match-status {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.upcoming-match-status.bg-emerald-500 {
  background: linear-gradient(135deg, #10b981, #059669);
}

.upcoming-match-status.bg-amber-500 {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Hero stats (Established / Matches Hosted / Support) */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.hero-stat-card {
  padding: 0.75rem 0.5rem;
}

.hero-stat-card-number {
  line-height: 1.1;
}

.hero-stat-card-label {
  line-height: 1.2;
}

@media (max-width: 400px) {
  .hero-stats-grid {
    gap: 0.5rem;
  }

  .hero-stat-card {
    padding: 0.5rem 0.25rem;
  }

  .hero-stat-card-number {
    font-size: 0.95rem;
  }

  .hero-stat-card-label {
    font-size: 0.6rem;
    white-space: normal;
  }
}

@media (min-width: 640px) {
  .hero-stats-grid {
    gap: 2rem;
  }

  .hero-stat-card {
    padding: 1.25rem 1rem;
  }
}

/* Footer developer logo */
.developer-logo img {
  max-height: 40px;
  filter: brightness(0) invert(1);
}

/* Generic verified badge icon (blue, Facebook-style) */
.verified-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}

.verified-badge-icon i {
  color: #1877f2 !important;
  font-size: 13px;
}
