/* ============================================================
   FLASH RANKING — Pickleball Tournament Platform
   Main Public Stylesheet
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700;800&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  /* Pickleball-inspired palette */
  --primary:    #16a34a;
  --primary-dk: #15803d;
  --primary-lt: #22c55e;
  --accent:     #eab308;
  --accent-dk:  #ca8a04;
  --yellow:     #facc15;
  --black:      #0a0a0a;
  --black-2:    #171717;
  --black-3:    #262626;
  --white:      #ffffff;
  --grey-1:     #f5f5f5;
  --grey-2:     #a3a3a3;
  --grey-3:     #737373;
  --red:        #ef4444;
  --green:      #22c55e;
  --blue:       #3b82f6;

  --font-body: 'Inter', -apple-system, sans-serif;
  --font-head: 'Space Grotesk', sans-serif;

  --radius:    8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
  --shadow-lg: 0 4px 24px rgba(0,0,0,.12);
  --transition: .25s ease;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--black);
  background: var(--grey-1);
  -webkit-font-smoothing: antialiased;
}
a    { color: inherit; text-decoration: none; }
img  { max-width: 100%; display: block; }
ul   { list-style: none; }
table { border-collapse: collapse; width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section   { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── Typography ───────────────────────────────────────────── */
.heading-xl {
  font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800; line-height: 1.1; text-transform: uppercase;
  letter-spacing: -1px;
}
.heading-lg {
  font-family: var(--font-head); font-size: 1.8rem;
  font-weight: 700; line-height: 1.2;
}
.heading-md {
  font-family: var(--font-head); font-size: 1.3rem;
  font-weight: 700; line-height: 1.3;
}
.section-label {
  font-family: var(--font-head); font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px; color: var(--primary);
  margin-bottom: 8px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; font-size: .88rem; font-weight: 600;
  border-radius: var(--radius); border: none;
  transition: all var(--transition); cursor: pointer;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.btn-primary {
  background: var(--primary); color: var(--white);
}
.btn-primary:hover { 
  background: var(--primary-dk); 
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22,163,74,.25);
}
.btn-primary:active { transform: translateY(0); }
.btn-accent {
  background: var(--accent); color: var(--black);
}
.btn-accent:hover { 
  background: var(--accent-dk);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(234,179,8,.2);
}
.btn-dark {
  background: var(--black-3); color: var(--white);
}
.btn-dark:hover { 
  background: var(--black-2);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
.btn-outline {
  background: transparent; border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}
.btn-outline:hover { 
  background: var(--primary); 
  color: var(--white);
  transform: translateY(-2px);
}
.btn-white {
  background: var(--white); color: var(--black);
}
.btn-white:hover { 
  background: var(--grey-1);
  transform: translateY(-2px);
}
.btn-sm { padding: 8px 18px; font-size: .82rem; }

/* ── Navbar ───────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,10,.94); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: all .3s ease; box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; max-width: 1400px; margin: 0 auto; width: 100%;
  padding: 0 24px;
}
.nav-logo {
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 800;
  color: var(--white); text-transform: uppercase; letter-spacing: 2px;
  display: flex; align-items: center; gap: 8px;
  transition: transform .3s ease;
}
.nav-logo:hover { transform: scale(1.05); }
.nav-logo span { color: var(--primary); }
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  padding: 10px 20px; color: var(--grey-2); font-size: .88rem;
  font-weight: 500; border-radius: var(--radius); transition: all var(--transition);
  text-transform: uppercase; letter-spacing: .5px; font-size: .82rem;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.12); }
.nav-links a:focus { outline: 2px solid var(--primary); outline-offset: -2px; }
.nav-links a.active { color: var(--primary); background: rgba(22,163,74,.15); }

.nav-hamburger {
  display: none; flex-direction: column; gap: 6px;
  background: none; border: none; padding: 8px; cursor: pointer;
}
.nav-hamburger:focus { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: var(--radius); }
.nav-hamburger span {
  width: 22px; height: 2px; background: var(--white);
  transition: all var(--transition);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative; background: var(--black); overflow: hidden;
  padding-top: 68px;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(22,163,74,.15), transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(234,179,8,.08), transparent 50%);
}
.hero-content { position: relative; z-index: 2; }
.hero-eyebrow {
  font-family: var(--font-head); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 3px; color: var(--primary-lt);
  margin-bottom: 16px;
}
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 em { color: var(--primary); font-style: normal; }
.hero-sub {
  font-size: 1.05rem; color: var(--grey-2); max-width: 480px;
  line-height: 1.7; margin-bottom: 32px;
}
.hero-stats {
  display: flex; gap: 40px; margin-top: 40px; padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.hero-stat-num {
  font-family: var(--font-head); font-size: 2rem; font-weight: 800;
  color: var(--white);
}
.hero-stat-lbl { font-size: .78rem; color: var(--grey-3); margin-top: 2px; }

.hero-visual {
  display: flex; align-items: center; justify-content: center;
}
.hero-badge {
  width: 220px; height: 220px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  box-shadow: 0 0 80px rgba(22,163,74,.3);
  animation: heroPulse 3s ease-in-out infinite;
}
.hero-badge-icon { font-size: 3rem; margin-bottom: 4px; }
.hero-badge-text {
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 800;
  color: var(--white); text-transform: uppercase; line-height: 1.1;
}
.hero-badge-sub { font-size: .72rem; color: rgba(255,255,255,.7); margin-top: 6px; }

@keyframes heroPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 80px rgba(22,163,74,.3); }
  50%      { transform: scale(1.03); box-shadow: 0 0 100px rgba(22,163,74,.4); }
}

/* ── Filter Bar ───────────────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 24px; background: var(--white);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.filter-label {
  font-family: var(--font-head); font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--grey-3);
}
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-divider { width: 1px; height: 24px; background: var(--grey-1); margin: 0 8px; }
.chip {
  padding: 6px 16px; font-size: .82rem; font-weight: 600;
  border-radius: 999px; border: 2px solid var(--grey-1);
  background: var(--white); color: var(--grey-3);
  cursor: pointer; transition: all var(--transition);
  text-decoration: none; display: inline-block;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: var(--primary); border-color: var(--primary);
  color: var(--white);
}
.chip.yellow.active {
  background: var(--accent); border-color: var(--accent); color: var(--black);
}

/* ── Event Cards ──────────────────────────────────────────── */
.event-card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  transition: all var(--transition);
  display: flex; flex-direction: column;
  border: 1px solid rgba(0,0,0,.04);
}
.event-card:hover { 
  transform: translateY(-8px); 
  box-shadow: var(--shadow-lg);
  border-color: rgba(22,163,74,.1);
}
.event-card:focus-within { 
  box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}
.event-card-cover {
  height: 200px; overflow: hidden; position: relative;
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
}
.event-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-cover-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; font-size: 4rem;
  background: linear-gradient(135deg, var(--primary), #065f46);
}
.event-status-badge {
  position: absolute; top: 12px; right: 12px;
  padding: 6px 16px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
}
.status-upcoming  { background: rgba(234,179,8,.95); color: var(--black); }
.status-ongoing   { background: rgba(34,197,94,.95); color: var(--white); }
.status-completed { background: rgba(163,163,163,.95); color: var(--white); }
.event-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.event-cat-tag {
  font-size: .75rem; font-weight: 600; color: var(--primary);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
}
.event-title {
  font-family: var(--font-head); font-size: 1.15rem; font-weight: 700;
  margin-bottom: 12px; line-height: 1.3; color: var(--black);
}
.event-title:hover { color: var(--primary); transition: color var(--transition); }
.event-meta { margin-top: auto; }
.event-meta-row {
  font-size: .82rem; color: var(--grey-3); display: flex;
  align-items: center; gap: 8px; margin-top: 6px;
}
.event-desc {
  font-size: .84rem; color: var(--grey-3); margin-top: 12px;
  line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.event-categories-tags {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px;
}
.cat-tag {
  padding: 4px 12px; font-size: .7rem; font-weight: 600;
  border-radius: 999px; background: rgba(22,163,74,.12);
  color: var(--primary); transition: all var(--transition);
}
.cat-tag:hover { background: rgba(22,163,74,.2); }

/* ── Ranking / Leaderboard Table ──────────────────────────── */
.ranking-table-wrap {
  background: var(--white); border-radius: var(--radius-lg);
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow);
}
.ranking-table-wrap:hover { box-shadow: var(--shadow-lg); transition: box-shadow var(--transition); }
.ranking-table-head {
  padding: 16px 24px; border-bottom: 1px solid var(--grey-1);
  display: flex; align-items: center; justify-content: space-between;
}
.rank-table { width: 100%; border-spacing: 0; min-width: 600px; }
.rank-table th {
  text-align: left; padding: 14px 16px; font-size: .72rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--grey-3); background: var(--grey-1);
  border-bottom: 2px solid #e5e5e5;
}
.rank-table td {
  padding: 16px 16px; border-bottom: 1px solid var(--grey-1);
  font-size: .88rem; vertical-align: middle;
}
.rank-table tbody tr {
  transition: background var(--transition);
}
.rank-table tbody tr:hover { background: rgba(22,163,74,.03); }
.rank-table tbody tr[data-slug] { cursor: pointer; }
.rank-table tbody tr:focus-within { background: rgba(22,163,74,.05); box-shadow: inset 4px 0 0 var(--primary); }

/* Responsive table - show all columns with horizontal scroll on mobile */
@media (max-width: 768px) {
  .rank-table { min-width: 800px; }
  .rank-table th,
  .rank-table td { padding: 12px 10px; font-size: .75rem; }
  .rank-table th { font-size: .65rem; }
  .player-avatar { width: 36px; height: 36px; }
  .leaderboard-rank { width: 38px; height: 38px; font-size: 1rem; }
}

@media (max-width: 480px) {
  .rank-table { min-width: 900px; }
  .rank-table th,
  .rank-table td { padding: 10px 8px; font-size: .7rem; }
  .rank-table th { font-size: .6rem; }
  .player-avatar { width: 32px; height: 32px; }
  .player-name { font-size: .8rem; }
  .leaderboard-rank { width: 32px; height: 32px; font-size: .9rem; }
  .skill-badge { padding: 2px 6px; font-size: .6rem; }
  .points-badge { font-size: .75rem; }
}

.rank-number {
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.1rem; color: var(--black-3); min-width: 40px;
}
tr.rank-1 .rank-number { color: var(--accent); font-size: 1.3rem; }
tr.rank-2 .rank-number { color: #a3a3a3; }
tr.rank-3 .rank-number { color: #cd7f32; }

.player-cell { display: flex; align-items: center; gap: 12px; }
.player-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--grey-1);
  flex-shrink: 0;
}
.player-name { font-weight: 600; color: var(--black); }
.player-name:hover { color: var(--primary); }
.points-badge {
  font-family: var(--font-head); font-weight: 700;
  color: var(--primary); font-size: .98rem; text-align: right; display: block;
}

/* ── Skill badge ──────────────────────────────────────────── */
.skill-badge {
  padding: 3px 10px; font-size: .7rem; font-weight: 600;
  border-radius: 999px; text-transform: uppercase; letter-spacing: .5px;
  display: inline-block;
}
.skill-beginner     { background: #dbeafe; color: #2563eb; }
.skill-intermediate { background: #d1fae5; color: #059669; }
.skill-advanced     { background: #fef3c7; color: #d97706; }
.skill-pro          { background: #fce7f3; color: #db2777; }

/* ── Win/Loss badges ──────────────────────────────────────── */
.win-badge  { color: var(--green); font-weight: 700; }
.loss-badge { color: var(--red); font-weight: 700; }

/* ── Player cards ─────────────────────────────────────────── */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.player-card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  transition: all var(--transition);
  cursor: pointer; display: flex; flex-direction: column;
  border: 1px solid rgba(0,0,0,.04);
}
.player-card:hover { 
  transform: translateY(-8px); 
  box-shadow: var(--shadow-lg);
  border-color: rgba(22,163,74,.1);
}
.player-card:focus-within { box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
.player-card-photo { 
  height: 220px; overflow: hidden; background: var(--black-3);
  position: relative;
}
.player-card-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.player-card:hover .player-card-photo img { transform: scale(1.08); }
.player-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.player-card-name {
  font-family: var(--font-head); font-size: 1.25rem; font-weight: 800;
  text-transform: uppercase; margin-bottom: 12px; line-height: 1.1;
  color: var(--black);
}
.player-card-rank {
  font-size: .85rem; color: var(--grey-3); margin-bottom: 16px;
  font-weight: 600;
}
.player-card-stats {
  display: flex; gap: 12px; margin-top: auto;
}
.player-card-stat {
  flex: 1; text-align: center; padding: 8px;
  background: var(--grey-1); border-radius: var(--radius);
}
.player-card-stat-val {
  font-family: var(--font-head); font-size: 1rem; font-weight: 800;
  color: var(--primary);
}
.player-card-stat-lbl {
  font-size: .7rem; color: var(--grey-3); margin-top: 4px;
  text-transform: uppercase;
}

/* ── Profile Page ─────────────────────────────────────────── */
.profile-hero {
  background: var(--black); padding: 120px 0 60px; color: var(--white);
}
.profile-hero-inner { display: flex; gap: 60px; align-items: flex-start; }
.profile-photo-wrap { position: relative; flex-shrink: 0; }
.profile-photo {
  width: 200px; height: 200px; border-radius: var(--radius-xl);
  object-fit: cover; border: 6px solid var(--primary);
  box-shadow: 0 12px 48px rgba(22,163,74,.3);
}
.profile-rank-badge {
  position: absolute; bottom: -12px; right: -12px;
  background: var(--primary); color: var(--white);
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.3rem; padding: 8px 18px; border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(22,163,74,.3);
}
.profile-name {
  font-family: var(--font-head); font-size: 3rem; font-weight: 800;
  text-transform: uppercase; line-height: 1.1; margin-bottom: 20px;
  letter-spacing: -1px;
}
.profile-meta { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 24px; }
.profile-meta-item { 
  font-size: .95rem; color: var(--grey-2); display: flex; align-items: center; gap: 8px;
  font-weight: 500;
}
.profile-meta-item strong { color: var(--white); font-weight: 700; font-family: var(--font-head); }
.profile-bio { color: var(--grey-2); line-height: 1.8; max-width: 650px; font-size: 1rem; }
.profile-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-top: 40px;
}
.profile-stat-card {
  background: rgba(255,255,255,.08); border-radius: var(--radius);
  padding: 24px; text-align: center; border: 1px solid rgba(255,255,255,.1);
  transition: all var(--transition);
}
.profile-stat-card:hover {
  background: rgba(255,255,255,.12); border-color: rgba(22,163,74,.3);
  transform: translateY(-2px);
}
.profile-stat-num {
  font-family: var(--font-head); font-size: 1.8rem; font-weight: 800;
  color: var(--primary); line-height: 1;
}
.profile-stat-lbl { font-size: .75rem; color: var(--grey-3); margin-top: 8px; text-transform: uppercase; }

/* ── Registration Form ────────────────────────────────────── */
.reg-form-wrap {
  max-width: 680px; margin: 0 auto;
  background: var(--white); border-radius: var(--radius-lg);
  padding: 48px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0,0,0,.04);
}
.reg-form-wrap h2 { margin-bottom: 12px; color: var(--black); }
.reg-form-wrap .form-subtitle {
  color: var(--grey-3); margin-bottom: 32px; font-size: .95rem; line-height: 1.6;
}
.form-group { margin-bottom: 24px; }
.form-label {
  display: block; font-size: .85rem; font-weight: 600;
  margin-bottom: 8px; color: var(--black);
}
.form-label .required {
  color: var(--red); font-weight: 700;
}
.form-control {
  width: 100%; padding: 12px 16px; font-size: .9rem;
  border: 2px solid var(--grey-1); border-radius: var(--radius);
  background: var(--white); transition: all var(--transition);
  font-family: var(--font-body); box-shadow: 0 1px 2px rgba(0,0,0,.02);
  min-height: 44px; /* Touch target */
}
.form-control:focus { 
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(22,163,74,.08), 0 1px 2px rgba(0,0,0,.02);
}
.form-control:disabled {
  background: var(--grey-1); cursor: not-allowed; opacity: .6;
}
.form-control.error { border-color: var(--red); }
.form-control.error:focus { box-shadow: 0 0 0 4px rgba(239,68,68,.08), 0 1px 2px rgba(0,0,0,.02); }
.form-control.success { border-color: var(--green); }
.form-control.success:focus { box-shadow: 0 0 0 4px rgba(34,197,94,.08), 0 1px 2px rgba(0,0,0,.02); }
textarea.form-control { min-height: 120px; padding: 12px 16px; }
select.form-control {
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23262626' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-hint { 
  font-size: .75rem; color: var(--grey-3); margin-top: 6px;
  font-style: italic;
}
.form-error { 
  font-size: .75rem; color: var(--red); margin-top: 6px;
  font-weight: 600;
}
.alert {
  padding: 16px 20px; border-radius: var(--radius);
  font-size: .88rem; font-weight: 500; margin-bottom: 24px;
  display: flex; align-items: flex-start; gap: 12px; border-left: 4px solid;
}
.alert-success { background: #ecfdf5; color: #065f46; border-left-color: #10b981; }
.alert-error   { background: #fef2f2; color: #991b1b; border-left-color: #ef4444; }
.alert-info    { background: #eff6ff; color: #1e40af; border-left-color: #3b82f6; }
.alert-warning { background: #fffbeb; color: #92400e; border-left-color: #f59e0b; }

/* ── Leaderboard Page ─────────────────────────────────────── */
.leaderboard-rank {
  font-family: var(--font-head); font-weight: 800; font-size: 1.2rem;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--grey-1);
}
.leaderboard-rank.rank-1 { background: #fef3c7; color: #d97706; }
.leaderboard-rank.rank-2 { background: #e5e7eb; color: #4b5563; }
.leaderboard-rank.rank-3 { background: #fed7aa; color: #c2410c; }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  background: var(--black); color: var(--grey-2); padding: 72px 0 0;
}
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 56px; padding-bottom: 56px;
}
.footer-logo {
  font-family: var(--font-head); font-size: 1.4rem; font-weight: 800;
  color: var(--white); text-transform: uppercase; margin-bottom: 16px;
  letter-spacing: 1px;
}
.footer-logo span { color: var(--primary); }
.footer-tagline { font-size: .9rem; color: var(--grey-3); line-height: 1.8; }
.footer-col h4 {
  font-family: var(--font-head); font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px; color: var(--white);
  margin-bottom: 20px; letter-spacing: 1.5px;
}
.footer-links li { margin-bottom: 12px; }
.footer-links a { 
  color: var(--grey-3); font-size: .9rem; transition: all var(--transition);
  display: inline-block;
}
.footer-links a:hover { color: var(--primary); transform: translateX(4px); }
.footer-links a:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 28px 0; display: flex;
  justify-content: space-between; font-size: .8rem; color: var(--grey-3);
}
.footer-bottom a { 
  color: var(--grey-3); transition: color var(--transition);
}
.footer-bottom a:hover { color: var(--primary); }

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.9); display: flex;
  align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius); }
.lightbox-close {
  position: absolute; top: 24px; right: 24px;
  color: var(--white); font-size: 2rem; cursor: pointer;
  width: 44px; height: 44px; display: flex;
  align-items: center; justify-content: center;
}

/* ── Photo Grid ───────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.photo-grid img {
  width: 100%; height: 140px; object-fit: cover;
  border-radius: var(--radius); cursor: pointer;
  transition: transform var(--transition);
}
.photo-grid img:hover { transform: scale(1.03); }

/* ── Auth Page ─────────────────────────────────────────────── */
.auth-hero {
  min-height: 100vh; display: flex; align-items: center;
  background: var(--black); padding: 68px 0 40px;
  position: relative; overflow: hidden;
}
.auth-hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(22,163,74,.15), transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(234,179,8,.08), transparent 50%);
}
.auth-container {
  display: flex; align-items: center; gap: 80px;
  max-width: 960px; margin: 0 auto; width: 100%;
}
.auth-brand { flex: 1; color: var(--white); }
.auth-brand-icon { font-size: 4rem; margin-bottom: 16px; }
.auth-brand-title {
  font-family: var(--font-head); font-size: 2.8rem; font-weight: 800;
  text-transform: uppercase; line-height: 1.1; margin-bottom: 12px;
}
.auth-brand-title span { color: var(--primary); }
.auth-brand-sub { color: var(--grey-2); font-size: 1.05rem; line-height: 1.7; }
.auth-box {
  width: 440px; flex-shrink: 0;
  background: var(--white); border-radius: var(--radius-xl);
  box-shadow: 0 12px 48px rgba(0,0,0,.3); overflow: hidden;
  border: 1px solid rgba(0,0,0,.04);
}
.auth-tabs {
  display: flex; border-bottom: 2px solid var(--grey-1);
}
.auth-tab {
  flex: 1; padding: 18px; text-align: center;
  font-family: var(--font-head); font-weight: 700; font-size: .98rem;
  background: none; border: none; cursor: pointer;
  color: var(--grey-3); border-bottom: 3px solid transparent;
  transition: all var(--transition); margin-bottom: -2px;
  text-transform: uppercase; letter-spacing: .5px;
}
.auth-tab:hover { color: var(--black); background: rgba(0,0,0,.02); }
.auth-tab:focus { outline: 2px solid var(--primary); outline-offset: -2px; }
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: rgba(22,163,74,.02); }
.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.auth-form-body { padding: 32px; }
.auth-submit {
  width: 100%; justify-content: center;
  padding: 12px; font-size: .98rem; margin-top: 12px;
}
.auth-switch {
  text-align: center; margin-top: 20px; font-size: .82rem; color: var(--grey-3);
}
.auth-switch a { color: var(--primary); font-weight: 600; transition: color var(--transition); }
.auth-switch a:hover { color: var(--primary-lt); }

/* ── Navbar User Dropdown ─────────────────────────────────── */
.nav-user-wrap { position: relative; }
.nav-user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: var(--white); cursor: pointer; font-family: var(--font-body);
  transition: all var(--transition);
}
.nav-user-btn:hover { background: rgba(255,255,255,.12); }
.nav-user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--primary);
}
.nav-user-name { font-size: .82rem; font-weight: 600; }
.nav-user-chevron { font-size: .65rem; color: var(--grey-2); transition: transform .2s; }
.nav-user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 210px; background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
  transform: translateY(-8px); transition: all .2s ease; z-index: 50;
}
.nav-user-dropdown.open {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-user-dropdown a {
  display: block; padding: 10px 18px; font-size: .85rem;
  color: var(--black); transition: background .15s;
}
.nav-user-dropdown a:hover { background: var(--grey-1); }
.nav-user-divider { height: 1px; background: var(--grey-1); margin: 4px 0; }
.nav-user-logout { color: var(--red) !important; }

/* ── Dashboard Stats ──────────────────────────────────────── */
.dash-stats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px;
  margin-bottom: 40px;
}
.dash-stat-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 28px 24px; text-align: center; box-shadow: var(--shadow);
  transition: all var(--transition); border: 1px solid rgba(0,0,0,.04);
}
.dash-stat-card:hover { 
  transform: translateY(-4px); 
  box-shadow: var(--shadow-lg);
  border-color: rgba(22,163,74,.1);
}
.dash-stat-icon { 
  font-size: 2rem; margin-bottom: 12px; 
  display: inline-block; opacity: .8;
}
.dash-stat-num {
  font-family: var(--font-head); font-size: 2rem;
  font-weight: 800; line-height: 1; color: var(--black);
  margin-bottom: 4px;
}
.dash-stat-lbl { 
  font-size: .75rem; color: var(--grey-3); margin-top: 8px;
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  padding: 4px 12px; font-size: .7rem; font-weight: 600;
  border-radius: 999px; display: inline-block;
  text-transform: uppercase; letter-spacing: .5px; white-space: nowrap;
}
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-grey   { background: #e5e5e5; color: #525252; }
.badge.success { background: #d1fae5; color: #065f46; }
.badge.warning { background: #fef3c7; color: #92400e; }
.badge.error   { background: #fee2e2; color: #991b1b; }
.badge.info    { background: #dbeafe; color: #1e40af; }

/* ── Utility Classes ──────────────────────────────────────── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.text-muted  { color: var(--grey-3); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-white { color: var(--white); }

.mt-8   { margin-top: 8px; }
.mt-12  { margin-top: 12px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mt-32  { margin-top: 32px; }
.mb-8   { margin-bottom: 8px; }
.mb-12  { margin-bottom: 12px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.mb-32  { margin-bottom: 32px; }
.pt-16  { padding-top: 16px; }
.pb-16  { padding-bottom: 16px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow);
}
.card:hover { box-shadow: var(--shadow-lg); }

/* ── Link Styles ──────────────────────────────────────────── */
a[href^="http"]:not(.btn):not(.nav-links a):not(.footer-links a):not(.auth-tab),
a[href^="/"]:not(.btn):not(.nav-links a):not(.footer-links a):not(.auth-tab) {
  position: relative; color: var(--primary); text-decoration: none;
  transition: color var(--transition);
  font-weight: 500;
}
a[href^="http"]:not(.btn):not(.nav-links a):not(.footer-links a):not(.auth-tab):hover,
a[href^="/"]:not(.btn):not(.nav-links a):not(.footer-links a):not(.auth-tab):hover {
  color: var(--primary-lt);
}
a[href^="http"]:not(.btn):not(.nav-links a):not(.footer-links a):not(.auth-tab):focus,
a[href^="/"]:not(.btn):not(.nav-links a):not(.footer-links a):not(.auth-tab):focus {
  outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 2px;
}

/* ── Convenience Classes for Common Inline Styles ────────── */
.event-hero { background: var(--black); padding: 120px 0 56px; color: var(--white); }
.event-hero.responsive { padding: 80px 0 48px; }
.event-back-link { color: var(--grey-3); font-size: .85rem; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.event-back-link:hover { color: var(--white); }

.event-hero-flex { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.event-meta-group { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 24px; }
.event-meta-item { color: var(--grey-2); display: flex; align-items: center; gap: 8px; font-size: .95rem; }

.event-section-grid { display: grid; gap: 48px; align-items: start; }
@media (max-width: 768px) {
  .event-section-grid { grid-template-columns: 1fr; gap: 32px; }
}

.match-table-wrap { margin-bottom: 24px; }
.match-row-round { color: var(--grey-3); font-size: .82rem; }
.match-row-score { font-family: var(--font-head); font-weight: 700; text-align: center; }
.match-row-winner { color: var(--green); font-weight: 700; }
.match-row-bold { font-weight: 700; }

.event-reg-card { padding: 32px; background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%); border: none; }
.event-reg-card h3 { color: var(--white); margin-top: 0; margin-bottom: 16px; }
.event-reg-card p { color: rgba(255, 255, 255, 0.9); margin-bottom: 20px; line-height: 1.6; }
.event-reg-card .btn { background: var(--white); color: var(--primary); border: none; font-weight: 600; width: 100%; justify-content: center; }

.event-cover-image { width: 100%; border-radius: var(--radius-lg); margin-bottom: 32px; max-height: 360px; object-fit: cover; }

@media (max-width: 768px) {
  .event-hero { padding: 80px 0 48px; }
  .event-hero-flex { gap: 16px; }
  .event-meta-group { gap: 16px; margin-top: 16px; }
  .event-section-grid { gap: 24px; }
}

/* ── Animation Utilities ──────────────────────────────────── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}

.animate-slideUp { animation: slideUp .4s ease-out; }
.animate-slideDown { animation: slideDown .4s ease-out; }
.animate-slideInLeft { animation: slideInLeft .4s ease-out; }
.animate-slideInRight { animation: slideInRight .4s ease-out; }
.animate-bounce { animation: bounce 1s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* ── Scrollbar Styling ────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--grey-1); }
::-webkit-scrollbar-thumb {
  background: var(--primary); border-radius: 5px;
  transition: background var(--transition);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-lt); }

/* ── Responsive Utility Classes ───────────────────────────── */
/* Spacing responsive utilities */
.px-mobile { padding-left: 16px; padding-right: 16px; }
.py-mobile { padding-top: 16px; padding-bottom: 16px; }
.mx-mobile { margin-left: 16px; margin-right: 16px; }
.gap-mobile { gap: 16px; }

/* Text scaling responsive */
.text-sm-mobile { font-size: .85rem; }
.text-base-mobile { font-size: 1rem; }

/* Table responsive utilities */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive-md { overflow-x: auto; }

/* Grid responsive utilities */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.grid-auto-sm { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

/* Hide/show on specific breakpoints */
.hide-tablet { display: none; }
.hide-mobile { display: none; }

/* Mobile menu improvements */
@media (max-width: 1200px) {
  .container { padding: 0 20px; }
}

/* Tablet Large: 1024px - 1200px */
@media (min-width: 769px) and (max-width: 1200px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .profile-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-stats { grid-template-columns: repeat(4, 1fr); }
  .hide-tablet { display: none; }
}

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-stats { grid-template-columns: repeat(3, 1fr); }
  .auth-container { flex-direction: column; }
  .hide-tablet { display: none; }
}

/* Mobile Large: 481px - 768px */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .section { padding: 48px 0; }
  .section-sm { padding: 32px 0; }

  /* Navigation */
  .nav-inner { height: 64px; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(10,10,10,.98); flex-direction: column;
    padding: 12px 0; gap: 0; flex-wrap: nowrap;
  }
  .nav-links a { 
    padding: 12px 20px; margin: 0; border-radius: 0;
    font-size: .8rem;
  }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: flex; gap: 5px; }

  /* Profile */
  .profile-hero { padding: 60px 0 36px; }
  .profile-hero-inner { flex-direction: column; align-items: center; text-align: center; gap: 24px; }
  .profile-photo { width: 140px; height: 140px; }
  .profile-name { font-size: 2rem; }
  .profile-meta { justify-content: center; flex-wrap: wrap; gap: 16px; }
  .profile-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .profile-stat-card { padding: 16px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  /* Filters */
  .filter-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .filter-divider { display: none; }

  /* Forms */
  .reg-form-wrap { padding: 20px; }
  .form-control { padding: 11px 14px; font-size: 16px; } /* Prevent zoom on iOS */
  .form-control.has-error { border-color: var(--red); }

  /* Auth */
  .auth-container { flex-direction: column; gap: 32px; text-align: center; }
  .auth-brand-title { font-size: 2rem; }
  .auth-box { width: 100%; }
  .auth-form-body { padding: 24px; }

  /* Dashboard */
  .dash-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .dash-stat-card { padding: 20px 16px; }

  /* Tables */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rank-table th, .rank-table td { padding: 12px 8px; font-size: .75rem; }
  .rank-table th { font-size: .65rem; }

  /* Event cards */
  .event-card-cover { height: 160px; }
  .event-card-body { padding: 18px; }

  /* Player cards */
  .players-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .player-card-photo { height: 180px; }
  .player-card-body { padding: 16px; }

  /* Buttons */
  .btn { padding: 11px 20px; font-size: .82rem; min-height: 44px; } /* Touch target */
  .btn-sm { padding: 8px 14px; }

  .hide-mobile { display: none; }
  .nav-user-name { display: none; }
}

/* Mobile Small: 360px - 480px */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .heading-xl { font-size: clamp(1.5rem, 5vw, 2rem); }
  .heading-lg { font-size: 1.4rem; }
  .heading-md { font-size: 1.1rem; }
  .section { padding: 36px 0; }
  .section-sm { padding: 24px 0; }

  /* Hero */
  .hero { padding-top: 64px; }
  .hero-badge { width: 140px; height: 140px; }
  .hero-badge-icon { font-size: 1.8rem; }
  .hero-badge-text { font-size: .95rem; }
  .hero-stat-num { font-size: 1.6rem; }

  /* Profile */
  .profile-hero { padding: 48px 0 24px; }
  .profile-photo { width: 110px; height: 110px; }
  .profile-name { font-size: 1.5rem; }
  .profile-rank-badge { font-size: 1rem; padding: 6px 12px; }
  .profile-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .profile-stat-card { padding: 12px; }
  .profile-stat-num { font-size: 1.4rem; }

  /* Dashboard */
  .dash-stats { grid-template-columns: 1fr; gap: 12px; }
  .dash-stat-card { padding: 16px 12px; }
  .dash-stat-num { font-size: 1.6rem; }

  /* Tables */
  .rank-table {
    font-size: .7rem;
  }
  .rank-table th { padding: 10px 6px; font-size: .6rem; }
  .rank-table td { padding: 10px 6px; }
  .player-avatar { width: 32px; height: 32px; }
  .rank-number { font-size: 1rem; }

  /* Forms */
  .form-control { padding: 10px 12px; font-size: 16px; border-radius: 6px; }
  .reg-form-wrap { padding: 16px; }
  .form-row { gap: 12px; }

  /* Buttons */
  .btn { 
    padding: 10px 16px; 
    font-size: .78rem; 
    min-height: 40px;
    width: 100%;
  }
  .btn-sm { padding: 8px 12px; width: auto; }

  /* Cards */
  .event-card { border-radius: 12px; }
  .event-card-cover { height: 140px; }
  .event-card-body { padding: 14px; }
  .event-title { font-size: 1rem; }

  /* Filter bar */
  .filter-bar { gap: 8px; padding: 12px 14px; }
  .chip { padding: 5px 12px; font-size: .75rem; }

  /* Footer */
  .footer-logo { font-size: 1.2rem; }
  footer p { font-size: .8rem; }
  .footer-col h4 { font-size: .75rem; }

  .hide-small { display: none; }
  .nav-logo { font-size: 1.1rem; }
}

/* Extra Small: < 360px */
@media (max-width: 360px) {
  .heading-xl { font-size: 1.4rem; }
  .heading-lg { font-size: 1.2rem; }
  body { font-size: 14px; }
  .container { padding: 0 12px; }
  
  .btn { font-size: .75rem; padding: 9px 14px; }
  .form-control { font-size: 15px; }
  .profile-photo { width: 90px; height: 90px; }
  .profile-name { font-size: 1.3rem; }
  .hero-badge { width: 120px; height: 120px; }
}
