/* ═══════════════════════════════════════════
   CAMPUS CLASH - DESIGN SYSTEM
   by NextByte Technologies
   ═══════════════════════════════════════════ */

/* ─── CSS VARIABLES ─── */
:root {
  --bg-primary: #06060e;
  --bg-secondary: #0c0c18;
  --bg-card: rgba(15, 15, 30, 0.8);
  --bg-card-hover: rgba(20, 20, 45, 0.9);
  --bg-input: rgba(15, 15, 35, 0.6);
  --border-color: rgba(124, 58, 237, 0.15);
  --border-hover: rgba(124, 58, 237, 0.4);

  --text-primary: #f0f0ff;
  --text-secondary: #9896b0;
  --text-muted: #5e5c78;

  --accent-primary: #7c3aed;
  --accent-primary-light: #a78bfa;
  --accent-secondary: #06b6d4;
  --accent-secondary-light: #22d3ee;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;

  --gradient-primary: linear-gradient(135deg, #7c3aed, #06b6d4);
  --gradient-hero: linear-gradient(135deg, #7c3aed 0%, #2563eb 50%, #06b6d4 100%);
  --gradient-card: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(6,182,212,0.05));

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(124,58,237,0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-main: 'Outfit', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET & BASE ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

a {
  color: var(--accent-primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--accent-secondary-light);
}

/* ─── ANIMATED BACKGROUND ─── */
.bg-grid {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(124,58,237,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: -3;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -2;
  pointer-events: none;
  animation: floatGlow 8s ease-in-out infinite;
}
.bg-glow-1 {
  width: 500px; height: 500px;
  background: rgba(124,58,237,0.12);
  top: -100px; right: -100px;
  animation-delay: 0s;
}
.bg-glow-2 {
  width: 400px; height: 400px;
  background: rgba(6,182,212,0.08);
  bottom: -50px; left: -50px;
  animation-delay: 3s;
}
.bg-glow-3 {
  width: 300px; height: 300px;
  background: rgba(124,58,237,0.06);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 5s;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.1); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ─── NAVBAR ─── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0.75rem 0;
  background: rgba(6, 6, 14, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-normal);
}
.navbar.scrolled {
  padding: 0.5rem 0;
  background: rgba(6, 6, 14, 0.95);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}
.logo-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 10px rgba(124,58,237,0.5));
}
.logo-text {
  display: flex;
  flex-direction: column;
}
.logo-main {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.2;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(124,58,237,0.1);
}
.nav-link.active {
  color: var(--accent-primary-light);
}
.admin-link {
  color: var(--accent-warning) !important;
}
.admin-link:hover {
  background: rgba(245,158,11,0.1) !important;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* User Menu */
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  position: relative;
  transition: var(--transition-fast);
}
.user-avatar:hover {
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  min-width: 220px;
  padding: 0.5rem;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 100;
  animation: dropdownFadeIn 0.2s ease;
}
.user-dropdown.show {
  display: block;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.dropdown-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.dropdown-email {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.25rem 0;
}
.dropdown-item {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}
.dropdown-item:hover {
  background: rgba(124,58,237,0.1);
  color: var(--text-primary);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}
.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 15px rgba(124,58,237,0.3);
}
.btn-primary:hover {
  box-shadow: 0 4px 25px rgba(124,58,237,0.5);
  transform: translateY(-1px);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(124,58,237,0.08);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}
.btn-outline:hover {
  background: rgba(124,58,237,0.08);
  border-color: var(--accent-primary);
}

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--accent-danger);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover {
  background: rgba(239,68,68,0.25);
}

.btn-success {
  background: rgba(16,185,129,0.15);
  color: var(--accent-success);
  border: 1px solid rgba(16,185,129,0.3);
}
.btn-success:hover {
  background: rgba(16,185,129,0.25);
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}
.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}
.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── PAGE SYSTEM ─── */
.page {
  display: none;
  animation: pageFadeIn 0.4s ease;
}
.page.active {
  display: block;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-section {
  padding-top: 100px;
}

/* ─── HERO SECTION ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 1.5rem 60px;
  max-width: 1280px;
  margin: 0 auto;
  gap: 4rem;
}

.hero-content {
  flex: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--accent-primary-light);
  margin-bottom: 1.5rem;
  animation: slideUp 0.6s ease;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: slideUp 0.6s ease 0.1s both;
}

.gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 2rem;
  animation: slideUp 0.6s ease 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  animation: slideUp 0.6s ease 0.3s both;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  animation: slideUp 0.6s ease 0.4s both;
}
.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

/* Hero Visual */
.hero-visual {
  flex: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card-stack {
  position: relative;
  width: 320px;
  height: 380px;
}

.floating-card {
  position: absolute;
  padding: 1rem 1.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  animation: floatCard 6s ease-in-out infinite;
  white-space: nowrap;
}
.fc-1 {
  top: 20px; left: 10px;
  background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.05));
  border-color: rgba(239,68,68,0.2);
  animation-delay: 0s;
}
.fc-2 {
  top: 100px; right: 0;
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.05));
  border-color: rgba(245,158,11,0.2);
  animation-delay: 1.5s;
}
.fc-3 {
  top: 190px; left: 30px;
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.05));
  border-color: rgba(16,185,129,0.2);
  animation-delay: 3s;
}
.fc-4 {
  top: 275px; right: 20px;
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(124,58,237,0.05));
  border-color: rgba(124,58,237,0.2);
  animation-delay: 4.5s;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

/* ─── SECTIONS ─── */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.section-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.admin-badge {
  color: var(--accent-warning) !important;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ─── TOURNAMENT CARDS ─── */
.tournament-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.tournament-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-normal);
  cursor: pointer;
  position: relative;
}
.tournament-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.tournament-card-banner {
  height: 160px;
  position: relative;
  overflow: hidden;
}
.tournament-card-banner .card-gradient {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-game-icon {
  font-size: 4rem;
  filter: drop-shadow(0 0 20px rgba(0,0,0,0.5));
}

.card-status {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-upcoming {
  background: rgba(16,185,129,0.2);
  color: var(--accent-success);
  border: 1px solid rgba(16,185,129,0.3);
}
.status-past {
  background: rgba(107,114,128,0.2);
  color: #9ca3af;
  border: 1px solid rgba(107,114,128,0.3);
}

.tournament-card-body {
  padding: 1.25rem;
}
.tournament-card-body h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.tournament-card-body p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.card-meta-item span:first-child {
  font-size: 0.9rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}
.card-price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-secondary-light);
}
.card-price.free {
  color: var(--accent-success);
}

/* Loading Skeleton */
.loading-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.skeleton-card {
  height: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.05), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

/* ─── TOURNAMENT DETAIL ─── */
.tournament-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 1.5rem 3rem;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  background: none;
  border: none;
  font-family: var(--font-main);
}
.detail-back:hover {
  color: var(--text-primary);
}

.detail-banner {
  height: 250px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.detail-banner .card-status {
  top: 1rem;
  right: 1rem;
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
}

.detail-header {
  margin-bottom: 2rem;
}
.detail-header h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.detail-game-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--accent-primary-light);
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.detail-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.detail-info-icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124,58,237,0.1);
  flex-shrink: 0;
}
.detail-info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}
.detail-info-value {
  font-weight: 600;
  font-size: 1rem;
}

.detail-description {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
.detail-description h3 {
  font-family: var(--font-heading);
  margin-bottom: 0.75rem;
}
.detail-description p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.detail-register-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--gradient-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.detail-register-price {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-secondary-light);
}
.detail-register-price.free {
  color: var(--accent-success);
}
.detail-register-price small {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ─── PAYMENT PAGE ─── */
.payment-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 100px 1.5rem 3rem;
}

.payment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}
.payment-card h2 {
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
}
.payment-card .payment-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.payment-summary {
  background: rgba(124,58,237,0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  text-align: left;
}
.payment-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}
.payment-summary-row:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}
.payment-summary-row.total {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-secondary-light);
}
.payment-summary-row .label {
  color: var(--text-muted);
}

.phonepe-btn {
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #5f259f, #7b2cbf);
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-main);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: var(--transition-fast);
  box-shadow: 0 4px 20px rgba(95,37,159,0.3);
  margin-bottom: 1rem;
}
.phonepe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(95,37,159,0.5);
}
.phonepe-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.payment-processing {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0;
}
.payment-processing.show {
  display: flex;
}

.payment-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border-color);
  border-top-color: #7b2cbf;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.payment-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}
.payment-success.show {
  display: flex;
}
.payment-success-icon {
  font-size: 4rem;
  animation: scaleIn 0.5s ease;
}
@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}
.payment-success h3 {
  color: var(--accent-success);
  font-family: var(--font-heading);
}
.payment-txn {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(16,185,129,0.1);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16,185,129,0.2);
}

.payment-secure-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* ─── AUTH PAGES ─── */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 1.5rem 3rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
}
.auth-header h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}
.auth-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ─── FORMS ─── */
.form-group {
  margin-bottom: 1.25rem;
  flex: 1;
}
.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: var(--transition-fast);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}
.form-group textarea {
  resize: vertical;
}

/* Password toggle */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrapper input {
  padding-right: 3rem !important;
}
.eye-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 4px;
  transition: color var(--transition-fast);
}
.eye-btn:hover {
  color: var(--accent-primary-light);
}
.eye-btn svg {
  width: 18px;
  height: 18px;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-error {
  color: var(--accent-danger);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  min-height: 1.2em;
}
.form-success {
  color: var(--accent-success) !important;
}

/* ─── MY TOURNAMENTS ─── */
.my-tournaments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.my-tournament-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition-fast);
  cursor: pointer;
}
.my-tournament-item:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.my-tournament-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.my-tournament-info {
  flex: 1;
}
.my-tournament-info h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.my-tournament-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.my-tournament-meta {
  text-align: right;
}
.my-tournament-meta .status-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.my-tournament-meta .price {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--accent-secondary-light);
  font-size: 0.95rem;
}

/* ─── ADMIN ─── */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-fast);
}
.admin-stat-card:hover {
  border-color: var(--border-hover);
}

.admin-stat-icon {
  font-size: 2rem;
}
.admin-stat-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  display: block;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.admin-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.admin-section-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.admin-form {
  max-width: 100%;
}

.admin-tournament-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  transition: var(--transition-fast);
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-tournament-item:hover {
  border-color: var(--border-hover);
}
.admin-tournament-info h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.admin-tournament-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.admin-tournament-actions {
  display: flex;
  gap: 0.5rem;
}

.admin-table-container {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th,
.admin-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}
.admin-table tr:hover td {
  background: rgba(124,58,237,0.03);
}

/* ─── CONTENT PAGES (About, Contact, Help) ─── */
.content-page {
  max-width: 900px;
  margin: 0 auto;
}

.content-header {
  margin-bottom: 2.5rem;
}

.lead-text {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition-normal);
}
.about-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}
.about-card-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}
.about-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.about-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition-fast);
}
.contact-info-card:hover {
  border-color: var(--border-hover);
}
.contact-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.contact-info-card h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.contact-info-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* ─── FAQ ─── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-fast);
}
.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.faq-toggle {
  font-size: 1.4rem;
  color: var(--accent-primary-light);
  transition: var(--transition-fast);
  font-weight: 300;
}
.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.open .faq-answer {
  max-height: 300px;
}
.faq-answer p {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ─── FOOTER ─── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.footer-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 300px;
}

.footer-links-group h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.footer-links-group a {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.3rem 0;
  transition: var(--transition-fast);
}
.footer-links-group a:hover {
  color: var(--accent-primary-light);
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── TOAST ─── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  animation: toastIn 0.3s ease;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.toast.success {
  border-color: rgba(16,185,129,0.3);
}
.toast.error {
  border-color: rgba(239,68,68,0.3);
}
.toast.info {
  border-color: rgba(124,58,237,0.3);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.show {
  display: flex;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.modal-close:hover {
  color: var(--text-primary);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 100px;
  }
  .hero-content {
    order: 2;
  }
  .hero-visual {
    order: 1;
  }
  .hero-subtitle {
    margin: 0 auto 2rem;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .hero-card-stack {
    width: 280px;
    height: 300px;
  }
  .floating-card {
    font-size: 0.95rem;
    padding: 0.8rem 1.4rem;
  }
  .fc-4 {
    top: 220px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(6, 6, 14, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: none;
  }
  .nav-links.show {
    display: flex;
  }
  .mobile-menu-btn {
    display: flex;
  }

  .hero-card-stack {
    width: 240px;
    height: 260px;
  }
  .fc-1 { top: 10px; left: 0; }
  .fc-2 { top: 70px; right: 0; }
  .fc-3 { top: 140px; left: 10px; }
  .fc-4 { top: 200px; right: 10px; }

  .tournament-grid {
    grid-template-columns: 1fr;
  }
  .loading-skeleton {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .detail-register-section {
    flex-direction: column;
    text-align: center;
  }

  .admin-tournament-item {
    flex-direction: column;
    text-align: center;
  }

  .my-tournament-item {
    flex-direction: column;
    text-align: center;
  }
  .my-tournament-meta {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  .hero-stats {
    gap: 1.5rem;
  }
  .stat-number {
    font-size: 1.4rem;
  }
  .auth-card {
    padding: 1.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .admin-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(124,58,237,0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(124,58,237,0.5);
}
