/* ==========================================
   MUMBUL ARENA — Master Stylesheet
   ========================================== */

/* --- Root & Reset --- */
:root {
  --bg: #0c0c0c;
  --fg: #f8fafc;
  --muted: #737373;
  --accent: #f97316;
  --accent-blue: #0ea5e9;
  --card: #161616;
  --border: rgba(115, 115, 115, 0.2);
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--fg); overflow-x: hidden; }
.font-display { font-family: 'Space Grotesk', sans-serif; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1a1a1a; }
::-webkit-scrollbar-thumb { background: #f97316; border-radius: 3px; }

/* --- Typography --- */
.gradient-text {
  background: linear-gradient(135deg, #f97316, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Backgrounds --- */
.hero-bg {
  background:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(249, 115, 22, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse 50% 40% at 0% 80%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
    linear-gradient(180deg, #0c0c0c 0%, #0a0a0a 100%);
}
.grid-pattern {
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}

/* --- Navigation --- */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #f97316, #0ea5e9);
  transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open { transform: translateX(0); }
.lang-active { color: white; font-weight: bold; text-decoration: underline; text-underline-offset: 4px; }
.lang-inactive { color: #9ca3af; }

/* --- Buttons --- */
.btn-primary {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.6s ease;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(249, 115, 22, 0.4); }
.btn-secondary {
  background: linear-gradient(135deg, #0ea5e9 0%, #0c4a6e 100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-secondary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(14, 165, 233, 0.3); }

/* --- Cards --- */
.facility-card { transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.facility-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 80px rgba(14, 165, 233, 0.1);
}
.stat-card {
  background: linear-gradient(135deg, rgba(22, 22, 22, 0.8) 0%, rgba(12, 12, 12, 0.9) 100%);
  border: 1px solid rgba(115, 115, 115, 0.15);
  backdrop-filter: blur(10px);
}
.gallery-item { transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.gallery-item:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.gallery-item img { transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.gallery-item:hover img { transform: scale(1.15); }

/* --- Social Icons --- */
.social-icon { transition: all 0.3s ease; }
.social-icon:hover { transform: translateY(-3px); }
.social-icon.instagram:hover { color: #E4405F; }
.social-icon.tiktok:hover { color: #00f2ea; }
.social-icon.facebook:hover { color: #1877F2; }

/* --- Section Animations --- */
.section { opacity: 0; transform: translateY(50px); transition: all 1s cubic-bezier(0.16, 1, 0.3, 1); }
.section.visible { opacity: 1; transform: translateY(0); }

/* --- Animations --- */
@keyframes slide-up { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scale-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-20px); } }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-10px); } }

.animate-slide-up { animation: slide-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-scale-in { animation: scale-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-float { animation: float 6s ease-in-out infinite; }
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.35s; }
.stagger-4 { animation-delay: 0.5s; }

/* --- Particles Canvas --- */
#particles-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }

/* --- Modals --- */
.modal-overlay { backdrop-filter: blur(12px); background: rgba(0, 0, 0, 0.85); }

/* --- Toast --- */
#toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: rgba(15, 23, 42, 0.95);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUpFade 0.4s ease-out forwards;
  pointer-events: auto;
  backdrop-filter: blur(8px);
}
.toast.error { border-left: 4px solid #ef4444; }
.toast.success { border-left: 4px solid #22c55e; }

/* --- File Input --- */
input[type="file"]::file-selector-button {
  background: rgba(14, 165, 233, 0.15);
  color: #0ea5e9;
  border: 0;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}
input[type="file"]::file-selector-button:hover { background: rgba(14, 165, 233, 0.3); }

/* --- Focus Visible --- */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 3px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================
   BOOKING SYSTEM STYLES
   ========================================== */

/* Facility Tabs */
.facility-tab {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}
.facility-tab:hover {
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}
.facility-tab.active {
  color: white !important;
  background: #f97316 !important;
  border-color: #f97316 !important;
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}

/* Time Slots */
.slot-available {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
  border: 1px solid rgba(34, 197, 94, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}
.slot-available:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(34, 197, 94, 0.15) 100%);
  transform: scale(1.05);
  border-color: rgba(34, 197, 94, 0.6);
}
.slot-booked {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  cursor: not-allowed;
  opacity: 0.6;
}
.slot-selected {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.4) 0%, rgba(249, 115, 22, 0.2) 100%);
  border: 2px solid #f97316;
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.4);
}

/* Membership Toggle */
.membership-switch {
  position: relative;
  width: 56px;
  height: 28px;
  background: var(--card);
  border: 1px solid rgba(115,115,115,0.2);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.membership-switch.active {
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-color: #f97316;
  box-shadow: 0 0 20px rgba(249,115,22,0.3);
}
.membership-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #737373;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.membership-switch.active .membership-switch-knob {
  left: 30px;
  background: white;
}
.membership-date-card { transition: all 0.3s ease; }
.membership-date-card:hover { transform: translateY(-2px); }
.membership-date-card.has-conflict {
  border-color: rgba(239,68,68,0.4) !important;
  background: rgba(239,68,68,0.05) !important;
}
.membership-date-card.is-ok {
  border-color: rgba(34,197,94,0.3) !important;
}
.membership-badge {
  background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(14,165,233,0.2));
  border: 1px solid rgba(249,115,22,0.3);
}

/* --- Admin Dashboard Overlay --- */
#admin-dashboard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.admin-panel {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: slide-up 0.4s ease-out;
}
.admin-header {
  background: linear-gradient(135deg, #ea580c, #f97316);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid #333;
  font-size: 0.95rem;
}
.admin-row:last-child { border-bottom: none; }
.admin-label { color: #9ca3af; }
.admin-value { color: #f3f4f6; font-weight: 500; text-align: right; }

/* ==========================================
   VENUE PAGE STYLES
   ========================================== */

.venue-hero {
  position: relative;
  height: 55vh;
  min-height: 380px;
  max-height: 600px;
  overflow: hidden;
}
.venue-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.venue-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0c0c0c 0%, rgba(12,12,12,0.7) 40%, rgba(12,12,12,0.3) 100%);
}
.venue-hero-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 1rem 3rem;
  max-width: 80rem;
  margin: 0 auto;
}

.venue-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 1rem;
}
.venue-breadcrumb a { color: #9ca3af; text-decoration: none; transition: color 0.2s; }
.venue-breadcrumb a:hover { color: #f97316; }
.venue-breadcrumb .separator { color: #4b5563; }
.venue-breadcrumb .current { color: white; font-weight: 600; }

.venue-court-card {
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.venue-court-card:hover {
  transform: translateY(-6px);
}
.venue-court-card .card-inner {
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(22,22,22,0.9), rgba(12,12,12,0.95));
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}
.venue-court-card:hover .card-inner {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}
.venue-court-card.selected .card-inner {
  border-color: var(--venue-color, #f97316);
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.15), 0 15px 40px rgba(0, 0, 0, 0.3);
}
.venue-court-card.selected .court-number {
  background: var(--venue-color, #f97316);
  color: white;
}
.venue-court-card.selected .court-arrow {
  color: var(--venue-color, #f97316);
}

.court-number {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.venue-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d1d5db;
  transition: all 0.3s;
}
.venue-feature-tag:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.venue-gallery-thumb {
  aspect-ratio: 4/3;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
}
.venue-gallery-thumb:hover {
  border-color: rgba(249, 115, 22, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.venue-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.venue-gallery-thumb:hover img {
  transform: scale(1.1);
}

/* --- Quick Book Widget (Main Page) --- */
.quick-book-select {
  background: rgba(22, 22, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: white;
  font-size: 0.9rem;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.3s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}
.quick-book-select:focus { border-color: #f97316; outline: none; }
.quick-book-input {
  background: rgba(22, 22, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: white;
  font-size: 0.9rem;
  transition: border-color 0.3s;
  color-scheme: dark;
}
.quick-book-input:focus { border-color: #f97316; outline: none; }

/* --- Responsive --- */
@media (max-width: 640px) {
  .venue-hero { height: 45vh; min-height: 320px; }
  .venue-hero-content { padding: 1.5rem 1rem 2rem; }
  .court-number { width: 3rem; height: 3rem; font-size: 1.1rem; }
}