/* ============================================================
   fizy Kapışması — Ana CSS
   ============================================================ */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #6062e6;
  --primary-dark: #4547c4;
  --secondary: #f85280;
  --teal: #00a4bf;
  --accent: #fed200;
  --indigo: #6366f1;
  --deep-purple: #240443;
  --glow-pink: #ff20e9;
  --glow-purple: #6829f2;
  --gradient-brand: linear-gradient(85deg, #6062e6 3.75%, #f85280 96.18%);
  --bg-dark: #0f0f0f;
  --bg-card: #1c1c1e;
  --bg-card-hover: #262628;
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --border: #2a2a2a;
  --success: #00c851;
  --danger: #ff4444;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-hover: 0 16px 48px rgba(0,0,0,0.6);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ============================================================
   Layout
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 800px; }
.container--wide { max-width: 1400px; }

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  background: linear-gradient(180deg, rgba(13,13,13,1) 0%, rgba(13,13,13,0.95) 100%);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-primary);
}

.site-logo img { height: 36px; width: auto; }

.site-logo__badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition);
  white-space: nowrap;
}

.site-nav__link:hover,
.site-nav__link.is-active { color: var(--text-primary); }

.site-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 100px;
  white-space: nowrap;
  transition: filter var(--transition), transform var(--transition), box-shadow var(--transition);
}

.site-nav__cta:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(96,98,230,0.4);
}

.site-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
}

.site-header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.site-header__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header__toggle.is-open span:nth-child(2) { opacity: 0; }
.site-header__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav--mobile {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 4px 16px 18px;
}

.site-nav--mobile.is-open { display: flex; }

.site-nav--mobile .site-nav__link { padding: 10px 0; width: 100%; }
.site-nav--mobile .site-nav__cta { margin-top: 8px; }

@media (max-width: 720px) {
  .site-header__inner .site-nav:not(.site-nav--mobile) { display: none; }
  .site-header__toggle { display: flex; }
}

/* ============================================================
   Home Hero + Tournaments colored wrap
   ============================================================ */
.home-hero-wrap {
  position: relative;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--deep-purple) 30%, var(--deep-purple) 62%, var(--bg-dark) 100%);
  padding-bottom: 48px;
}

.home-hero-wrap .hero { background: transparent; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: 80px 16px 36px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--deep-purple) 60%, var(--bg-dark) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(46% 46% at 50% 30%, rgba(255,32,233,0.22) 0%, rgba(104,41,242,0.16) 55%, transparent 78%),
    radial-gradient(ellipse at 15% 100%, rgba(96,98,230,0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 10%, rgba(248,82,128,0.16) 0%, transparent 60%);
  animation: heroGlow 9s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroGlow {
  0% { opacity: 0.75; transform: scale(1) translateY(0); }
  100% { opacity: 1; transform: scale(1.08) translateY(-12px); }
}

.hero .container { position: relative; z-index: 2; }

.hero__float {
  position: absolute;
  font-size: 1.6rem;
  opacity: 0.5;
  filter: drop-shadow(0 0 12px rgba(254,210,0,0.35));
  animation: heroFloatDrift 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.hero__float--1 { top: 20%; left: 8%; animation-delay: 0s; }
.hero__float--2 { top: 14%; right: 10%; font-size: 1.25rem; animation-delay: 1.2s; }
.hero__float--3 { top: 40%; left: 5%; font-size: 1.1rem; animation-delay: 2.4s; }
.hero__float--4 { top: 42%; right: 6%; animation-delay: 0.6s; }

@keyframes heroFloatDrift {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-16px) rotate(6deg); }
}

@media (max-width: 640px) {
  .hero__float { display: none; }
}

.hero__eyebrow {
  display: inline-block;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero__title span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 40px;
}

/* ============================================================
   Cover Marquee (Home Hero)
   ============================================================ */
.cover-marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  margin: 8px 0 -8px;
  padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.cover-marquee__track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: coverMarqueeScroll 36s linear infinite;
}

.cover-marquee:hover .cover-marquee__track { animation-play-state: paused; }

.cover-marquee__item {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.cover-marquee__item:hover {
  transform: translateY(-6px) scale(1.06);
  box-shadow: 0 0 32px rgba(96,98,230,0.35);
}

.cover-marquee__item img { width: 100%; height: 100%; object-fit: cover; }

@keyframes coverMarqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 640px) {
  .cover-marquee__item { width: 72px; height: 72px; }
}

/* ============================================================
   Tournament Cards (Home)
   ============================================================ */
.tournament-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 8px 0 60px;
}

.tournament-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  animation: cardFadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.tournament-grid .tournament-card:nth-child(1) { animation-delay: 0.02s; }
.tournament-grid .tournament-card:nth-child(2) { animation-delay: 0.08s; }
.tournament-grid .tournament-card:nth-child(3) { animation-delay: 0.14s; }
.tournament-grid .tournament-card:nth-child(4) { animation-delay: 0.2s; }
.tournament-grid .tournament-card:nth-child(5) { animation-delay: 0.26s; }
.tournament-grid .tournament-card:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes cardFadeUp {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}

.tournament-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 2;
}

.tournament-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.tournament-card:hover::before { opacity: 1; }

.tournament-card__cover {
  position: relative;
  aspect-ratio: 16/7;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.tournament-card__cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 15%, rgba(255,255,255,0.12) 0%, transparent 55%);
  pointer-events: none;
}

.tournament-card__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.16) 48%, transparent 66%);
  transform: translateX(-130%);
  transition: transform 0.7s ease;
  pointer-events: none;
}

.tournament-card:hover .tournament-card__cover::after { transform: translateX(130%); }

.tournament-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tournament-card:hover .tournament-card__cover img { transform: scale(1.06); }

.tournament-card__cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4rem;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.45));
  transition: transform var(--transition);
}

.tournament-card:hover .tournament-card__cover-placeholder { transform: scale(1.08) rotate(-4deg); }

.tournament-card__body { padding: 22px; flex: 1; display: flex; flex-direction: column; }

.tournament-card__title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  line-height: 1.3;
}

.tournament-card__desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tournament-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge--active { background: rgba(0,200,81,0.15); color: var(--success); }
.badge--size { background: rgba(254,210,0,0.12); color: var(--accent); }
.badge--draft { background: rgba(170,170,170,0.12); color: var(--text-secondary); }
.badge--inactive { background: rgba(255,68,68,0.12); color: var(--danger); }

.tournament-card__arrow { display: inline-block; transition: transform var(--transition); }
.tournament-card:hover .tournament-card__arrow { transform: translateX(4px); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient-brand);
  color: #fff;
}
.btn--primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(96,98,230,0.4); }

.btn--outline {
  border: 2px solid var(--border);
  color: var(--text-primary);
}
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }

.btn--ghost { color: var(--text-secondary); }
.btn--ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }

.btn--accent { background: var(--accent); color: #000; }
.btn--accent:hover { background: #e0bd00; transform: translateY(-1px); }

.btn--full { width: 100%; }
.btn--lg { padding: 16px 32px; font-size: 1.1rem; border-radius: var(--radius); }
.btn--sm { padding: 8px 16px; font-size: 0.8rem; }
.btn--icon { padding: 10px; border-radius: 50%; }

/* ============================================================
   Match Page — VS Layout
   ============================================================ */
.match-page {
  min-height: calc(100vh - 70px);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}

.match-progress {
  margin-bottom: 24px;
}

.match-progress__text {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width 0.6s ease;
}

.match-round-label {
  text-align: center;
  margin-bottom: 32px;
}

.match-round-label__name {
  display: inline-block;
  background: rgba(96,98,230,0.15);
  color: var(--primary);
  border: 1px solid rgba(96,98,230,0.3);
  padding: 6px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.match-arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.vs-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.vs-divider__text {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-secondary);
  font-style: italic;
  letter-spacing: -0.02em;
}

.song-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.song-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 32px rgba(96,98,230,0.2);
}

.song-card__cover {
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #1a0a0a, #2d1b1b);
}

.song-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.song-card:hover .song-card__cover img { transform: scale(1.04); }

.song-card__cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255,255,255,0.1);
}

.song-card__preview-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition);
}

.song-card__preview-btn:hover { background: rgba(96,98,230,0.8); }

.song-card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; }

.song-card__artist {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.song-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  flex: 1;
}

.song-card__actions { display: flex; flex-direction: column; gap: 8px; }

.song-card__select-btn {
  background: var(--gradient-brand);
  color: #fff;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  transition: filter var(--transition), transform var(--transition), box-shadow var(--transition);
}

.song-card__select-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(96,98,230,0.35);
}

.song-card__listen-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.song-card__listen-link:hover { color: var(--accent); background: rgba(254,210,0,0.08); }

/* Selected animation */
.song-card--selected {
  border-color: var(--success);
  animation: cardPulse 0.4s ease;
}

@keyframes cardPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* Mobile match layout */
@media (max-width: 640px) {
  .match-arena {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .vs-divider { flex-direction: row; padding: 8px 0; }

  .vs-divider::before,
  .vs-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }
}

/* ============================================================
   Result Page
   ============================================================ */
.result-page { padding: 40px 16px 80px; }

.champion-card {
  max-width: 480px;
  margin: 0 auto 40px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.champion-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(254,210,0,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.champion-card__crown {
  font-size: 2.5rem;
  padding: 24px 0 0;
}

.champion-card__cover {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  margin: 16px auto;
  border: 3px solid var(--accent);
  box-shadow: 0 0 40px rgba(254,210,0,0.25);
}

.champion-card__cover img { width: 100%; height: 100%; object-fit: cover; }

.champion-card__label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.champion-card__artist {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.champion-card__title {
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 20px;
}

.champion-card__body { padding: 0 24px 24px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-item {
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.stat-item__value {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
}

.stat-item__label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.share-section { margin-top: 40px; text-align: center; }
.share-section__title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--text-secondary); }

.share-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: opacity var(--transition), transform var(--transition);
}

.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.share-btn--whatsapp { background: #25d366; color: #fff; }
.share-btn--x { background: #000; color: #fff; border: 1px solid #333; }
.share-btn--facebook { background: #1877f2; color: #fff; }
.share-btn--copy { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }

/* ============================================================
   Stats Page
   ============================================================ */
.stats-page { padding: 32px 16px 80px; }

.stats-header { margin-bottom: 40px; }

.stats-table-wrap { overflow-x: auto; }

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.stats-table th {
  text-align: left;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.stats-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: middle;
}

.stats-table tr:last-child td { border-bottom: none; }

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

.song-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.song-mini__img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--border);
  flex-shrink: 0;
}

.song-mini__name { font-weight: 600; font-size: 0.875rem; }
.song-mini__artist { color: var(--text-secondary); font-size: 0.75rem; }

.rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.rank-badge--1 { background: var(--accent); color: #000; }
.rank-badge--2 { background: #c0c0c0; color: #000; }
.rank-badge--3 { background: #cd7f32; color: #fff; }
.rank-badge--other { background: var(--bg-card); color: var(--text-secondary); }

/* ============================================================
   Section Headings
   ============================================================ */
.section-title {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

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

/* ============================================================
   Alert / Flash
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert--success { background: rgba(0,200,81,0.12); border: 1px solid rgba(0,200,81,0.3); color: var(--success); }
.alert--error { background: rgba(255,68,68,0.12); border: 1px solid rgba(255,68,68,0.3); color: var(--danger); }
.alert--info { background: rgba(100,180,255,0.12); border: 1px solid rgba(100,180,255,0.3); color: #64b4ff; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.site-footer a { color: var(--primary); }
.site-footer a:hover { text-decoration: underline; }

/* ============================================================
   Admin Panel
   ============================================================ */
.admin-body {
  background: #111;
  color: #e0e0e0;
  font-family: 'Poppins', system-ui, sans-serif;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: #0a0a0a;
  border-right: 1px solid #222;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 50;
}

.admin-sidebar__logo {
  padding: 20px 20px 12px;
  border-bottom: 1px solid #222;
}

.admin-sidebar__logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.admin-sidebar__logo-sub {
  font-size: 0.7rem;
  color: #666;
  margin-top: 2px;
}

.admin-nav { padding: 12px 0; flex: 1; }

.admin-nav__section {
  padding: 8px 16px 4px;
  font-size: 0.65rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.admin-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: #aaa;
  font-size: 0.875rem;
  transition: color 0.2s, background 0.2s;
  border-left: 3px solid transparent;
}

.admin-nav__item:hover { color: #fff; background: rgba(255,255,255,0.04); }
.admin-nav__item.active { color: #fff; background: rgba(96,98,230,0.1); border-left-color: #6062e6; }

.admin-nav__item svg, .admin-nav__item .icon { width: 16px; flex-shrink: 0; }

.admin-main {
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: #0a0a0a;
  border-bottom: 1px solid #222;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.admin-topbar__title { font-weight: 700; font-size: 1rem; }
.admin-topbar__actions { display: flex; gap: 8px; }

.admin-content { padding: 24px; flex: 1; }

/* Admin cards */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.admin-stat-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 18px;
}

.admin-stat-card__value {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
}

.admin-stat-card__label {
  font-size: 0.75rem;
  color: #666;
  margin-top: 4px;
}

/* Admin table */
.admin-table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th {
  text-align: left;
  padding: 10px 14px;
  background: #1a1a1a;
  color: #666;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  border-bottom: 1px solid #2a2a2a;
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #1e1e1e;
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Admin form */
.admin-form { max-width: 680px; }
.admin-form--wide { max-width: 100%; }

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #aaa;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: #e0e0e0;
  padding: 10px 14px;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #6062e6;
  background: #1e1e1e;
}

.form-control--select { appearance: none; cursor: pointer; }

.form-hint { font-size: 0.72rem; color: #555; margin-top: 4px; }

.form-error { font-size: 0.72rem; color: #ff4444; margin-top: 4px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* Admin buttons */
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.admin-btn--primary { background: #6062e6; color: #fff; }
.admin-btn--primary:hover { background: #4547c4; }
.admin-btn--secondary { background: #2a2a2a; color: #e0e0e0; border: 1px solid #333; }
.admin-btn--secondary:hover { background: #333; }
.admin-btn--danger { background: rgba(255,68,68,0.15); color: #ff4444; border: 1px solid rgba(255,68,68,0.3); }
.admin-btn--danger:hover { background: rgba(255,68,68,0.25); }
.admin-btn--success { background: rgba(0,200,81,0.15); color: #00c851; border: 1px solid rgba(0,200,81,0.3); }
.admin-btn--success:hover { background: rgba(0,200,81,0.25); }

.admin-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: 0.68rem; font-weight: 600; }
.admin-badge--active { background: rgba(0,200,81,0.15); color: #00c851; }
.admin-badge--inactive { background: rgba(170,170,170,0.12); color: #888; }
.admin-badge--draft { background: rgba(100,180,255,0.12); color: #64b4ff; }
.admin-badge--finished { background: rgba(254,210,0,0.12); color: #fed200; }

/* Color swatch */
.color-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.1);
  vertical-align: middle;
  margin-right: 6px;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.pagination a:hover { color: var(--text-primary); border-color: var(--primary); }
.pagination .active span { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ============================================================
   Utility
   ============================================================ */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 40px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 40px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.separator {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* Loading state */
.btn--loading { opacity: 0.7; pointer-events: none; }
.btn--loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-content { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .tournament-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { padding: 48px 16px 40px; }
  .hero__title { font-size: 1.8rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .match-arena { gap: 10px; }
}
