/* =========================================
   ONR ARENA — Global Styles
   Dark gaming theme with neon accents
   ========================================= */

:root {
  --bg-primary: #0a0b0f;
  --bg-secondary: #0f1018;
  --bg-card: #14151e;
  --bg-card-hover: #1a1b26;
  --bg-input: #0d0e16;
  --neon-blue: #00d4ff;
  --neon-purple: #8b5cf6;
  --neon-cyan: #06ffa5;
  --neon-pink: #ff006e;
  --neon-yellow: #ffd700;
  --text-primary: #f0f1f5;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border: #1e2030;
  --border-bright: #2a2b3d;
  --glow-blue: 0 0 20px rgba(0, 212, 255, 0.25);
  --glow-purple: 0 0 20px rgba(139, 92, 246, 0.25);
  --glow-cyan: 0 0 20px rgba(6, 255, 165, 0.2);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Rajdhani', 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#app { display: flex; flex-direction: column; min-height: 100vh; }
#main-content { flex: 1; }

a { color: var(--neon-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--neon-cyan); }

h1, h2, h3, h4, h5 {
  font-family: 'Orbitron', 'Arial', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* =========================================
   SCROLLBAR
   ========================================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--neon-purple); border-radius: 3px; }

/* =========================================
   NAVBAR
   ========================================= */
#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 11, 15, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-icon { font-size: 20px; color: var(--neon-blue); }
.brand-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 1px;
}
.brand-accent { color: var(--neon-blue); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
  text-transform: uppercase;
}
.nav-links a:hover { color: var(--neon-blue); background: rgba(0, 212, 255, 0.06); }
.nav-links a.active { color: var(--neon-blue); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
  transform: translateY(-1px);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--neon-blue);
  border: 1px solid var(--neon-blue);
}
.btn-secondary:hover {
  background: rgba(0, 212, 255, 0.08);
  box-shadow: var(--glow-blue);
  color: var(--neon-blue);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.btn-danger {
  background: rgba(255, 0, 110, 0.1);
  color: var(--neon-pink);
  border: 1px solid rgba(255, 0, 110, 0.3);
}
.btn-danger:hover { background: rgba(255, 0, 110, 0.2); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-full { width: 100%; }

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

/* =========================================
   FORMS
   ========================================= */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  padding: 10px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.15);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.form-select option { background: var(--bg-card); }
.form-error { font-size: 13px; color: var(--neon-pink); margin-top: 4px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* =========================================
   CARDS
   ========================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card:hover { border-color: var(--border-bright); }

.card-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

/* =========================================
   BADGES
   ========================================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-blue { background: rgba(0, 212, 255, 0.1); color: var(--neon-blue); border: 1px solid rgba(0, 212, 255, 0.2); }
.badge-purple { background: rgba(139, 92, 246, 0.1); color: var(--neon-purple); border: 1px solid rgba(139, 92, 246, 0.2); }
.badge-green { background: rgba(6, 255, 165, 0.1); color: var(--neon-cyan); border: 1px solid rgba(6, 255, 165, 0.2); }
.badge-yellow { background: rgba(255, 215, 0, 0.1); color: var(--neon-yellow); border: 1px solid rgba(255, 215, 0, 0.2); }
.badge-pink { background: rgba(255, 0, 110, 0.1); color: var(--neon-pink); border: 1px solid rgba(255, 0, 110, 0.2); }

/* =========================================
   PAGE CONTAINER
   ========================================= */
.page { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-header {
  padding: 60px 0 40px;
  text-align: center;
}
.page-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.page-subtitle { color: var(--text-secondary); font-size: 18px; max-width: 560px; margin: 0 auto; }

/* =========================================
   HOME PAGE
   ========================================= */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-primary) 0%, #0b0c18 100%);
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-text {}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--neon-blue);
  margin-bottom: 24px;
}
.hero-tag span { width: 6px; height: 6px; background: var(--neon-cyan); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--text-primary);
}
.hero-title .accent {
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 480px;
  line-height: 1.7;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 12px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 22px;
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 12px;
  min-width: 90px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
  cursor: default;
}
.stat:hover {
  border-color: rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.09);
  transform: translateY(-2px);
}
.stat-icon {
  width: 28px;
  height: 28px;
  color: var(--neon-blue);
  opacity: 0.85;
}
.stat-icon svg { width: 100%; height: 100%; display: block; }
.stat-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--neon-blue);
  line-height: 1;
}
.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Live bracket frame in hero */
.hero-bracket-frame {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 370px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--glow-blue);
}
.hero-bracket-frame::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(0,212,255,0.3), rgba(139,92,246,0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 10;
}
.hero-bracket-badge {
  position: absolute;
  top: 12px; left: 14px;
  font-size: 10px; font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  z-index: 10;
  background: rgba(10,14,26,0.85);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0,212,255,0.25);
}
.hero-bracket-inner {
  position: absolute;
  top: 40px; left: 0;
  transform: scale(0.43);
  transform-origin: top left;
  pointer-events: none;
}
.hero-bracket-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 90px;
  background: linear-gradient(transparent, var(--bg-card));
  pointer-events: none;
  z-index: 5;
}
.hero-bracket-link {
  position: absolute;
  bottom: 14px; right: 16px;
  font-size: 11px; font-weight: 600;
  color: var(--neon-cyan);
  text-decoration: none;
  z-index: 10;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.hero-bracket-link:hover { opacity: 1; }

/* Mini bracket preview in hero */
.bracket-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--glow-blue);
  position: relative;
}
.bracket-preview::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(139, 92, 246, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.preview-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 16px;
}
.preview-bracket { display: flex; gap: 16px; align-items: stretch; }
.preview-round { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.preview-round-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.preview-match {
  background: var(--bg-input);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  overflow: hidden;
  flex: 1;
}
.preview-team {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.preview-team:last-child { border-bottom: none; }
.preview-team.winner { color: var(--neon-cyan); }
.preview-section-header {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  margin: 10px 0 6px;
  display: inline-block;
  border-left: 2px solid;
}
.preview-winners-header { color: var(--neon-cyan); background: rgba(0,212,255,0.08); border-color: var(--neon-cyan); }
.preview-losers-header  { color: #ff6b6b;          background: rgba(255,107,107,0.08); border-color: #ff6b6b; }
.preview-gf-header      { color: var(--neon-yellow); background: rgba(255,214,0,0.08); border-color: var(--neon-yellow); }
.preview-connector {
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

/* Features section */
.features {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 60px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
  opacity: 0;
  transition: opacity var(--transition);
}
.feature-card:hover { border-color: rgba(0, 212, 255, 0.2); transform: translateY(-4px); box-shadow: var(--glow-blue); }
.feature-card:hover::after { opacity: 1; }
.feature-icon {
  font-size: 36px;
  margin-bottom: 20px;
  display: block;
}
.feature-title { font-size: 18px; margin-bottom: 12px; color: var(--text-primary); }
.feature-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.6; }

/* CTA section */
.cta-section {
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
}
.cta-title { font-size: clamp(28px, 4vw, 48px); margin-bottom: 16px; position: relative; }
.cta-desc { font-size: 18px; color: var(--text-secondary); margin-bottom: 40px; position: relative; }

/* =========================================
   AUTH PAGES
   ========================================= */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 100%;
  max-width: 440px;
  position: relative;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.auth-title {
  font-size: 24px;
  margin-bottom: 8px;
  text-align: center;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 36px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-bright);
}
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }

/* =========================================
   CREATE TOURNAMENT PAGE
   ========================================= */
.create-page { padding: 40px 0 80px; }
.create-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}
.create-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 3px;
  height: 18px;
  background: linear-gradient(var(--neon-blue), var(--neon-purple));
  border-radius: 2px;
}

/* Format selector */
.format-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.format-option {
  background: var(--bg-input);
  border: 2px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  user-select: none;
}
.format-option:hover { border-color: rgba(0, 212, 255, 0.4); }
.format-option.selected { border-color: var(--neon-blue); background: rgba(0, 212, 255, 0.06); box-shadow: var(--glow-blue); }
.format-option-icon { font-size: 28px; margin-bottom: 8px; display: block; }
.format-option-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.format-option-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Size selector */
.size-grid { display: flex; gap: 10px; }
.size-option {
  flex: 1;
  background: var(--bg-input);
  border: 2px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 14px 8px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  user-select: none;
}
.size-option:hover { border-color: rgba(139, 92, 246, 0.4); }
.size-option.selected { border-color: var(--neon-purple); background: rgba(139, 92, 246, 0.06); }
.size-option-num { font-family: 'Orbitron', sans-serif; font-size: 22px; font-weight: 800; color: var(--neon-purple); }
.size-option-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

/* Teams list */
.teams-list { display: flex; flex-direction: column; gap: 8px; }
.team-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: border-color var(--transition);
}
.team-item:hover { border-color: var(--border-bright); }
.team-seed {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  width: 24px;
  flex-shrink: 0;
  text-align: center;
}
.team-name-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 600;
  outline: none;
}
.team-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 16px;
  transition: color var(--transition);
  flex-shrink: 0;
}
.team-remove:hover { color: var(--neon-pink); }
.teams-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 32px;
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius);
}

/* Summary card */
.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky;
  top: 88px;
}
.summary-title { font-size: 14px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; }
.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.summary-item:last-of-type { border-bottom: none; }
.summary-key { color: var(--text-secondary); }
.summary-val { color: var(--text-primary); font-weight: 600; }
.summary-val.highlight { color: var(--neon-cyan); }

/* =========================================
   TOURNAMENT PAGE
   ========================================= */
.tournament-page { padding: 32px 0 80px; }
.tournament-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
}
.tournament-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.tournament-title-area {}
.tournament-name {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 12px;
}
.tournament-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tournament-info {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.tournament-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.info-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 700; }
.info-value { font-size: 15px; font-weight: 600; color: var(--text-primary); }

/* Tournament tabs */
.tournament-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--neon-blue); border-bottom-color: var(--neon-blue); }

/* =========================================
   BRACKET STYLES
   ========================================= */
.bracket-section { padding: 4px 0; }

.standings-card {
  margin-top: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  overflow: hidden;
  max-width: 480px;
}
.standings-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.standings-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--neon-blue);
  margin: 0;
}
.standings-list { padding: 8px 0; }
.standings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  transition: background var(--transition);
}
.standings-row:hover { background: var(--bg-card-hover); }
.standings-medal { font-size: 20px; line-height: 1; }
.standings-place {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 24px;
}
.standings-names { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.standings-team-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.standings-tied { font-size: 12px; color: var(--text-muted); }

.bracket-scroll-wrapper {
  overflow-x: auto;
  padding-bottom: 24px;
}

.bracket-container {
  position: relative;
  min-height: 200px;
}

.bracket-round-labels {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.round-label-item {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--neon-cyan);
  text-align: center;
  flex-shrink: 0;
}

/* Match card */
.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  position: absolute;
  z-index: 2;
}
.match-card:hover { border-color: rgba(0, 212, 255, 0.4); box-shadow: 0 0 12px rgba(0, 212, 255, 0.1); }
.match-card.completed { border-color: rgba(6, 255, 165, 0.2); }
.match-card.tbd { opacity: 0.6; cursor: default; }

.match-team {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  height: 36px;
  transition: background var(--transition);
  position: relative;
}
.match-team + .match-team {
  border-top: 1px solid var(--border);
}
.match-team.winner { background: rgba(6, 255, 165, 0.06); }
.match-team.loser { opacity: 0.45; }
.match-seed {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  width: 16px;
  flex-shrink: 0;
}
.match-name {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
.match-team.winner .match-name { color: var(--neon-cyan); }
.match-score {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  min-width: 20px;
  text-align: right;
  color: var(--text-secondary);
}
.match-team.winner .match-score { color: var(--neon-cyan); }
.match-team.tbd .match-name { color: var(--text-muted); font-style: italic; }

/* Bracket SVG connector overlay */
.bracket-svg {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

/* Section labels for double elim */
.bracket-section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 16px;
  margin: 24px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius);
}
.section-winners { color: var(--neon-blue); background: rgba(0, 212, 255, 0.06); border: 1px solid rgba(0, 212, 255, 0.15); }
.section-losers { color: var(--neon-pink); background: rgba(255, 0, 110, 0.06); border: 1px solid rgba(255, 0, 110, 0.15); }
.section-gf {
  color: var(--neon-yellow);
  background: rgba(255, 215, 0, 0.08);
  border: 2px solid rgba(255, 215, 0, 0.85);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5), 0 0 28px rgba(255, 215, 0, 0.25);
}

/* Champion display */
.champion-banner {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(6, 255, 165, 0.08));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.champion-banner::before {
  content: '🏆';
  position: absolute;
  font-size: 120px;
  opacity: 0.05;
  top: -10px;
  right: -10px;
}
.champion-label { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--neon-yellow); margin-bottom: 8px; }
.champion-name { font-family: 'Orbitron', sans-serif; font-size: clamp(24px, 4vw, 40px); font-weight: 900; color: var(--text-primary); }

/* =========================================
   SCORE MODAL
   ========================================= */
.score-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  position: relative;
}
.score-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.score-match-title { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; text-align: center; }
.score-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}
.score-team { text-align: center; }
.score-team-name { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score-input {
  background: var(--bg-input);
  border: 2px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  width: 100%;
  padding: 12px;
  transition: border-color var(--transition);
}
.score-input:focus { outline: none; border-color: var(--neon-blue); }
.score-vs { font-family: 'Orbitron', sans-serif; font-size: 14px; font-weight: 700; color: var(--text-muted); }
.score-actions { display: flex; flex-direction: column; gap: 10px; }
.score-winner-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.score-winner-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 10px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.score-winner-btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); background: rgba(6, 255, 165, 0.06); }

/* =========================================
   PARTICIPANTS TAB
   ========================================= */
.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.participant-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition);
}
.participant-card:hover { border-color: var(--border-bright); }
.participant-card.eliminated { opacity: 0.5; }
.participant-card.champion { border-color: rgba(255, 215, 0, 0.4); background: rgba(255, 215, 0, 0.04); }
.participant-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.participant-info {}
.participant-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.participant-seed { font-size: 12px; color: var(--text-muted); }

/* =========================================
   SHARE CARD
   ========================================= */
.share-card {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.share-url-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.share-url-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  padding: 10px 14px;
  outline: none;
}

/* =========================================
   MY TOURNAMENTS PAGE
   ========================================= */
.tournaments-list { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.tournament-list-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  cursor: pointer;
  transition: all var(--transition);
}
.tournament-list-item:hover { border-color: rgba(0, 212, 255, 0.25); background: var(--bg-card-hover); }
.tli-name { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.tournament-list-item img { width: 80px; height: 80px; flex-shrink: 0; object-fit: cover; border-radius: 8px; }
.tli-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 600px) {
  .tournament-list-item { padding: 12px 14px !important; gap: 10px !important; flex-wrap: nowrap !important; align-items: flex-start !important; }
  .tournament-list-item img { width: 56px !important; height: 56px !important; border-radius: 6px !important; margin-top: 2px; }
  .tournament-list-item .tli-meta { gap: 5px !important; flex-wrap: wrap !important; }
  .tli-name { font-size: 14px !important; margin-bottom: 5px !important; }
  .tli-stat { font-size: 11px !important; }
  .badge { font-size: 10px !important; padding: 2px 7px !important; white-space: nowrap !important; }
  .tournament-list-item > div:last-child { flex-shrink: 0 !important; gap: 8px !important; }
  .tournament-list-item > div:last-child > div { font-size: 14px !important; }
  .tournament-list-item > div:last-child > span { font-size: 16px !important; }
}
.tli-stat { font-size: 13px; color: var(--text-secondary); }
.tli-actions { display: flex; gap: 10px; }

/* =========================================
   DISCORD PAGE
   ========================================= */
.discord-hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}
.discord-logo {
  width: 150px;
  height: 150px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  margin: 0 auto 28px;
  box-shadow: 0 0 40px rgba(88, 101, 242, 0.4);
}
.discord-features {
  padding: 80px 0;
}
.discord-commands {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 60px;
}
.command-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.command-item:last-child { border-bottom: none; }
.command-item:hover { background: var(--bg-card-hover); }
.command-code {
  background: var(--bg-input);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--neon-blue);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 180px;
}
.command-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.command-desc strong { color: var(--text-primary); }
.discord-invite-section { padding: 80px 0; text-align: center; }

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.3s ease, toastOut 0.3s ease forwards;
  pointer-events: auto;
}
.toast.success { border-left: 3px solid var(--neon-cyan); }
.toast.error { border-left: 3px solid var(--neon-pink); }
.toast.info { border-left: 3px solid var(--neon-blue); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { from { transform: none; opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* =========================================
   MODAL
   ========================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.hidden { display: none; }
.modal-content { animation: modalIn 0.25s ease; max-height: 90vh; overflow-y: auto; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(-10px); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

/* =========================================
   FOOTER
   ========================================= */
#footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 24px 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
}
.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 10px; }
.footer-links { display: flex; gap: 60px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--text-secondary); }
.footer-col a:hover { color: var(--neon-blue); }
.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

/* =========================================
   UTILITY
   ========================================= */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.gap-12 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.loading {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
  font-size: 18px;
}
.empty-state {
  text-align: center;
  padding: 80px 24px;
}
.empty-state-icon { font-size: 64px; margin-bottom: 20px; opacity: 0.4; }
.empty-state-title { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.empty-state-desc { font-size: 16px; color: var(--text-muted); margin-bottom: 28px; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 60px; }
  .hero-visual { display: none; }
  .create-grid { grid-template-columns: 1fr; }
  .summary-card { position: static; }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .nav-mobile-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
  }
  .nav-links.open + .nav-actions { display: flex; }
  .hero-stats { gap: 8px; flex-wrap: wrap; }
  .stat { padding: 14px 16px; min-width: 80px; }
  .hero-cta { flex-direction: column; }
  .footer-container { grid-template-columns: 1fr; gap: 40px; }
  .footer-links { flex-wrap: wrap; gap: 32px; }
  .format-grid { grid-template-columns: 1fr; }
  .tournament-meta { flex-direction: column; }
  .score-teams { gap: 8px; }
}
