/* Custom Styling for Spike Volley Web Application */

:root {
  --surface-base: #070c1e;
  --surface-subtle: #0a1128;
  --surface-card: #0e1736;
  --surface-raised: #131d42;
  --surface-bright: #1a2754;
  --volleyball-yellow: #facc15;
  --volleyball-yellow-dark: #eab308;
  --volleyball-blue: #2563eb;
  --status-live: #ef4444;
}

/* Base resets & typography */
body {
  background-color: #070c1e;
  color: #f8fafc;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #070c1e;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Animations */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.25);
  }
  50% {
    box-shadow: 0 0 25px rgba(250, 204, 21, 0.55);
  }
}

.pulse-glow {
  animation: pulseGlow 2.5s infinite;
}

/* Glassmorphic Cards */
.glass-panel {
  background: rgba(14, 23, 54, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Blurred Lock overlay effect for partial scores */
.locked-blur {
  filter: blur(4.5px);
  user-select: none;
  pointer-events: none;
  transition: filter 0.3s ease;
}

/* Match card active state */
.match-card-active {
  background: linear-gradient(135deg, #131d42 0%, #0e1736 100%);
  border: 2px solid #facc15 !important;
  box-shadow: 0 4px 25px rgba(250, 204, 21, 0.2);
}

/* Standings table styling */
.standings-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  font-weight: 700;
  padding: 8px 10px;
}

.standings-table td {
  padding: 10px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.standings-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Pill badge smooth transition */
.transition-smooth {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading skeleton animation */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ==========================================================================
   LIGHT MODE DESIGN SYSTEM
   ========================================================================== */
html.light body {
  background-color: #f1f5f9;
  color: #0f172a;
}

html.light ::-webkit-scrollbar-track {
  background: #f1f5f9;
}
html.light ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}
html.light ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Header */
html.light header {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important;
}
html.light header h1 {
  color: #0f172a !important;
}
html.light header .text-slate-400 {
  color: #64748b !important;
}
html.light header nav a {
  color: #475569 !important;
}
html.light header nav a:hover {
  color: #0f172a !important;
  background-color: #f1f5f9 !important;
}

/* Central Search */
html.light #mainSearch {
  color: #0f172a !important;
}
html.light #mainSearch::placeholder {
  color: #94a3b8 !important;
}
html.light header .bg-\[\#0e1736\] {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
html.light header .bg-\[\#0e1736\]:hover {
  background-color: #f1f5f9 !important;
}

/* Season selector in header */
html.light #seasonSelector {
  color: #0f172a !important;
}
html.light #seasonSelector option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Main Cards / Panels across 3 columns */
html.light .bg-\[\#0e1736\] {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}

html.light .bg-\[\#070c1e\] {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

html.light .bg-\[\#131d42\] {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

/* Typography & Titles in Light Mode */
html.light h2, 
html.light h3, 
html.light .text-white {
  color: #0f172a !important;
}

html.light .text-slate-200 {
  color: #1e293b !important;
}
html.light .text-slate-300 {
  color: #334155 !important;
}
html.light .text-slate-400 {
  color: #64748b !important;
}
html.light .text-slate-500 {
  color: #64748b !important;
}

/* Borders */
html.light .border-white\/5,
html.light .border-white\/10,
html.light .border-white\/15,
html.light .border-white\/20 {
  border-color: #e2e8f0 !important;
}

/* Inputs in Light Mode */
html.light input[type="text"] {
  background-color: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
html.light input[type="text"]::placeholder {
  color: #94a3b8 !important;
}
html.light input[type="text"]:focus {
  border-color: #eab308 !important;
  background-color: #ffffff !important;
}

/* Matchday selector carousel */
html.light #matchdaySelector {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
html.light #btnPrevMatchday,
html.light #btnNextMatchday {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
html.light #btnPrevMatchday:hover,
html.light #btnNextMatchday:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

/* Buttons in Light Mode */
html.light #btnChangeComitato {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #ca8a04 !important;
}
html.light #btnChangeComitato:hover {
  background-color: #f1f5f9 !important;
}

/* Matches List and Cards */
html.light [data-gara-id] {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}
html.light [data-gara-id]:hover {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07) !important;
}

html.light [data-gara-id] .bg-slate-900 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* Championship Items in list */
html.light [data-camp-id] {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}
html.light [data-camp-id]:hover {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}
html.light [data-camp-id] .bg-white\/5 {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
}

/* Region List buttons */
html.light #regionList button {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
html.light #regionList button:hover {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}
html.light #regionList button span.text-slate-300 {
  color: #1e293b !important;
}
html.light #regionList button span.text-slate-400 {
  color: #64748b !important;
}
html.light #regionList button div.text-slate-500 {
  color: #64748b !important;
}

/* Region List Active Item */
html.light #regionList button.bg-gradient-to-r,
html.light #regionList button[data-regione].border-yellow-400\/60 {
  background: linear-gradient(135deg, #fef9c3 0%, #ffffff 100%) !important;
  border-color: #facc15 !important;
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.2) !important;
}
html.light #regionList button.bg-gradient-to-r span.text-white,
html.light #regionList button[data-regione].border-yellow-400\/60 span.text-white {
  color: #0f172a !important;
}
html.light #regionList button.bg-gradient-to-r div.text-slate-300,
html.light #regionList button[data-regione].border-yellow-400\/60 div.text-slate-300 {
  color: #713f12 !important;
}

/* Championship Items in list */
html.light [data-camp-id] {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
html.light [data-camp-id]:hover {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}
html.light [data-camp-id].bg-gradient-to-r {
  background: linear-gradient(135deg, #fef9c3 0%, #ffffff 100%) !important;
  border-color: #facc15 !important;
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.25) !important;
}
html.light [data-camp-id].bg-gradient-to-r span.text-white {
  color: #0f172a !important;
}

/* Comitati Modal Cards */
html.light [data-modal-com-id] {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}
html.light [data-modal-com-id]:hover {
  background-color: #f8fafc !important;
  border-color: #eab308 !important;
}
html.light [data-modal-com-id] .bg-slate-900 {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

/* Theme Toggle button in Light Mode */
html.light #themeToggle {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
html.light #themeToggle:hover {
  background-color: #f1f5f9 !important;
  color: #ca8a04 !important;
}

/* Modals */
html.light .bg-black\/80 {
  background-color: rgba(15, 23, 42, 0.6) !important;
}
html.light #standingsModal > div,
html.light #comitatiModal > div,
html.light #matchDetailModal > div {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
}
html.light #standingsModal .bg-\[\#131d42\],
html.light #comitatiModal .bg-\[\#131d42\],
html.light #matchDetailModal .bg-\[\#131d42\] {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* Standings table */
html.light .standings-table th {
  color: #475569 !important;
  background-color: #f8fafc !important;
}
html.light .standings-table td {
  border-color: #f1f5f9 !important;
  color: #1e293b !important;
}
html.light .standings-table tr:hover td {
  background: #f8fafc !important;
}

/* Close buttons on modals */
html.light #btnCloseStandings,
html.light #btnCloseComitatiModal,
html.light #btnCloseMatchModal {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
}
html.light #btnCloseStandings:hover,
html.light #btnCloseComitatiModal:hover,
html.light #btnCloseMatchModal:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Match detail modal big banner */
html.light .from-\[\#131d42\].to-\[\#070c1e\] {
  background-image: linear-gradient(to bottom, #f8fafc, #f1f5f9) !important;
  border-color: #e2e8f0 !important;
}

/* Spike TV section */
html.light #spike-tv {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
html.light #spike-tv .from-\[\#0e1736\].via-\[\#131d42\] {
  background-image: linear-gradient(to right, #ffffff, #f8fafc, #ffffff) !important;
  border-color: #e2e8f0 !important;
}
html.light #spike-tv .bg-\[\#070c1e\]\/70 {
  background-color: rgba(241, 245, 249, 0.8) !important;
  border-color: #e2e8f0 !important;
}

/* SEO Hub & Footer */
html.light #seo-regioni {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
html.light .seo-region-link {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}
html.light .seo-region-link:hover {
  background-color: #f1f5f9 !important;
  border-color: #eab308 !important;
}
html.light .seo-city-link {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}
html.light .seo-city-link:hover {
  background-color: #fef08a !important;
  color: #854d0e !important;
}

html.light footer {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}
html.light footer .bg-\[\#0e1736\] {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Skeleton in light mode */
html.light .skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.04) 75%);
  background-size: 200% 100%;
}
