/* =========================================================
   DeltaCrown Tournament Design System — Core CSS
   Phase 4 Frontend Rebuild (February 2026)
   ========================================================= */

/* --- CSS Custom Properties --- */
:root {
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-surface: rgba(10, 10, 10, 0.7);
  --glass-strong: rgba(20, 20, 20, 0.85);
  --neon-cyan: rgba(6, 182, 212, 0.6);
  --neon-purple: rgba(139, 92, 246, 0.6);
}

/* --- Glassmorphism --- */
.glass {
  background: var(--glass-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.glass-strong {
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Subtle Grain Overlay --- */
.grain-overlay::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Tournament Cards --- */
.card-modern {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card-modern:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 10px 30px -10px rgba(6, 182, 212, 0.15);
}
.card-img-wrap {
  height: 160px;
  position: relative;
  overflow: hidden;
}
.card-img-wrap img {
  transition: transform 0.6s ease;
}
.card-modern:hover .card-img-wrap img {
  transform: scale(1.08);
}
.card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, #0a0a0a 100%);
}

/* --- Navigation Pills (Sidebar Filters) --- */
.nav-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #9ca3af;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: none;
}
.nav-pill:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.05);
}
.nav-pill.active {
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
  border-color: rgba(6, 182, 212, 0.25);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

/* --- Game Icons --- */
.game-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  flex-shrink: 0;
}

/* --- Hero Slide Carousel --- */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  background-size: cover;
  background-position: center;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  background: linear-gradient(90deg, #050505 0%, rgba(5,5,5,0.8) 40%, rgba(5,5,5,0.2) 100%);
}

/* --- Status Badges --- */
.badge-live {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* --- Tabs (Detail Page) --- */
.tab-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab-btn:hover {
  color: #fff;
}
.tab-btn.active {
  color: #06b6d4;
  border-bottom-color: #06b6d4;
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* --- Scrollbar Hide --- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* --- Stat Cards --- */
.stat-card {
  text-align: center;
  padding: 0.75rem;
}
.stat-card .stat-label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: #6b7280;
}
.stat-card .stat-value {
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}

/* --- Detail Page: Neon Borders --- */
.neon-border-cyan {
  border-color: rgba(6, 182, 212, 0.3) !important;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.08);
}
.neon-border-gold {
  border-color: rgba(250, 204, 21, 0.3) !important;
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.08);
}

/* --- Form Controls (Django widget styling) --- */
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.625rem 1rem;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: #fff;
  transition: border-color 0.2s;
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: #4b5563;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.08);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  padding-right: 2.5rem;
}
.form-checkbox {
  border-radius: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0a0a0a;
  color: #06b6d4;
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
}
.form-checkbox:checked {
  background-color: #06b6d4;
  border-color: #06b6d4;
}
.form-select option {
  background: #111;
  color: #fff;
}
