/* ────────────────────────────────────────────
   Event Leader – Main Stylesheet
   ──────────────────────────────────────────── */

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

:root {
  --bg: #05070f;
  --bg2: #0b0e1e;
  --surface: rgba(255, 255, 255, 0.05);
  --surface2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --accent: #6c63ff;
  --accent2: #ff6b9d;
  --gold: #f5c842;
  --gold2: #e0a800;
  --green: #22c97a;
  --red: #ff5252;
  --text: #e8eaf6;
  --text-muted: #8892b0;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glow: 0 0 40px rgba(108, 99, 255, 0.25);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Background Orbs ── */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: floatOrb 18s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent2);
  bottom: -150px;
  right: -100px;
  animation-delay: -6s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: var(--green);
  top: 40%;
  left: 40%;
  animation-delay: -12s;
}

@keyframes floatOrb {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(40px, -30px) scale(1.08);
  }

  66% {
    transform: translate(-30px, 20px) scale(0.95);
  }
}

/* ── Pages ── */
.page {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.page.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ── Landing ── */
.landing-container {
  text-align: center;
  padding: 40px 24px;
  max-width: 860px;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  background: rgba(108, 99, 255, 0.2);
  border: 1px solid rgba(108, 99, 255, 0.4);
  color: var(--accent);
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  animation: fadeDown 0.6s ease;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  background: linear-gradient(135deg, #fff 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 12px;
  animation: fadeDown 0.7s ease;
}

.hero-title .accent {
  -webkit-text-fill-color: var(--accent2);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-muted);
  margin-bottom: 10px;
  animation: fadeDown 0.8s ease;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.7;
  animation: fadeDown 0.9s ease;
}

.landing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  animation: fadeUp 1s ease;
}

.access-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  text-align: left;
  backdrop-filter: blur(12px);
}

.access-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: inherit;
}

.participant-card::before {
  background: radial-gradient(circle at 30% 30%, rgba(108, 99, 255, 0.15), transparent 70%);
}

.admin-card::before {
  background: radial-gradient(circle at 30% 30%, rgba(255, 107, 157, 0.15), transparent 70%);
}

.access-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.25);
}

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

.participant-card:hover {
  box-shadow: 0 20px 60px rgba(108, 99, 255, 0.3);
  border-color: rgba(108, 99, 255, 0.5);
}

.admin-card:hover {
  box-shadow: 0 20px 60px rgba(255, 107, 157, 0.3);
  border-color: rgba(255, 107, 157, 0.5);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.access-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.access-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.card-arrow {
  position: absolute;
  bottom: 28px;
  right: 28px;
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: transform 0.3s, color 0.3s;
}

.access-card:hover .card-arrow {
  transform: translateX(6px);
  color: #fff;
}

/* ── Glass Card ── */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

/* ── Form Container ── */
.form-container {
  width: 100%;
  max-width: 480px;
  padding: 40px 36px;
  margin: 30px auto;
  animation: fadeUp 0.5s ease;
}

.back-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  margin-bottom: 28px;
  transition: all 0.2s;
}

.back-btn:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(108, 99, 255, 0.1);
}

.form-header {
  text-align: center;
  margin-bottom: 32px;
}

.form-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.form-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.form-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.req {
  color: var(--accent2);
}

.form-group input,
.form-group select,
.team-select-dd {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.form-group select option {
  background: #1a1d35;
  color: var(--text);
}

.pass-wrap {
  position: relative;
}

.pass-wrap input {
  padding-right: 48px;
}

.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toggle-pass:hover {
  opacity: 1;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.25s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #9c6bff);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #1a1000;
  font-weight: 700;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 200, 66, 0.4);
}

.btn-full {
  width: 100%;
  margin-top: 8px;
}

/* ── Error / Feedback ── */
.error-msg {
  background: rgba(255, 82, 82, 0.12);
  border: 1px solid rgba(255, 82, 82, 0.3);
  color: var(--red);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
  animation: shake 0.4s ease;
}

.hidden {
  display: none !important;
}

.hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 6px;
  display: block;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-6px);
  }

  40%,
  80% {
    transform: translateX(6px);
  }
}

/* ── Leaderboard Page ── */
.leaderboard-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px;
}

.leaderboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.back-btn-light {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.back-btn-light:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.event-meta {
  flex: 1;
  text-align: center;
}

.live-badge {
  display: inline-block;
  background: rgba(255, 82, 82, 0.15);
  border: 1px solid rgba(255, 82, 82, 0.4);
  color: var(--red);
  padding: 3px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 1px;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.event-meta h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.team-tag {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.refresh-info {
  color: var(--text-muted);
  font-size: 0.78rem;
  opacity: 0.7;
}

/* Winner Banner */
.winner-banner {
  position: relative;
  background: linear-gradient(135deg, rgba(245, 200, 66, 0.15), rgba(224, 168, 0, 0.08));
  border: 1px solid rgba(245, 200, 66, 0.4);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  margin-bottom: 20px;
  overflow: hidden;
  animation: fadeUp 0.6s ease;
}

.winner-content .trophy {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: bounce 1.5s ease infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

.winner-content h2 {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.winner-content p {
  color: var(--text-muted);
}

.confetti-area {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall linear infinite;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(110%) rotate(720deg);
    opacity: 0;
  }
}

.leaderboard-card {
  padding: 24px;
  margin-bottom: 16px;
}

.lb-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.lb-title-row h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.refresh-timer {
  background: rgba(108, 99, 255, 0.15);
  border: 1px solid rgba(108, 99, 255, 0.3);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}

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

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.lb-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.lb-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s;
}

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

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

.rank-1 td {
  background: rgba(245, 200, 66, 0.08) !important;
}

.rank-2 td {
  background: rgba(192, 192, 192, 0.08) !important;
}

.rank-3 td {
  background: rgba(205, 127, 50, 0.08) !important;
}

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

.rank-badge.r1 {
  background: var(--gold);
  color: #1a1000;
}

.rank-badge.r2 {
  background: #c0c0c0;
  color: #111;
}

.rank-badge.r3 {
  background: #cd7f32;
  color: #fff;
}

.rank-badge.rn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.score-val {
  font-weight: 700;
  font-size: 1.05rem;
}

.winner-row td {
  border-left: 3px solid var(--gold) !important;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 32px;
}

.reset-banner {
  background: rgba(255, 82, 82, 0.08);
  border: 1px solid rgba(255, 82, 82, 0.25);
  color: var(--red);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.95rem;
  margin-top: 12px;
}

/* ── Admin Layout ── */
.admin-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.admin-sidebar {
  width: 260px;
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.brand-icon {
  font-size: 1.5rem;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.admin-info span {
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-btn.active {
  background: rgba(108, 99, 255, 0.15);
  border-color: rgba(108, 99, 255, 0.3);
  color: #fff;
}

.logout-btn {
  padding: 12px 16px;
  background: rgba(255, 82, 82, 0.1);
  border: 1px solid rgba(255, 82, 82, 0.2);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: rgba(255, 82, 82, 0.2);
}

.admin-main {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
  max-width: calc(100% - 260px);
}

.admin-tab {
  display: none;
}

.admin-tab.active {
  display: block;
  animation: fadeUp 0.4s ease;
}

.tab-header {
  margin-bottom: 28px;
}

.tab-header h2 {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.tab-header p {
  color: var(--text-muted);
}

.tab-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.tab-header-row h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 4px 0;
}

.event-code-badge {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.event-code-badge strong {
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 2px;
}

.event-status-badge {
  padding: 8px 18px;
  background: rgba(34, 201, 122, 0.15);
  border: 1px solid rgba(34, 201, 122, 0.3);
  color: var(--green);
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.85rem;
}

.back-inline-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0 0 6px;
  transition: color 0.2s;
}

.back-inline-btn:hover {
  color: #fff;
}

.section-card {
  padding: 24px;
  margin-bottom: 20px;
}

.section-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.create-event-card {
  padding: 32px;
  max-width: 560px;
}

.code-generate-row {
  display: flex;
  gap: 12px;
}

.code-input {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent) !important;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.event-card-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.event-card-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.06), transparent);
  opacity: 0;
  transition: opacity 0.25s;
  border-radius: inherit;
}

.event-card-item:hover {
  border-color: rgba(108, 99, 255, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(108, 99, 255, 0.2);
}

.event-card-item:hover::before {
  opacity: 1;
}

.event-card-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.event-card-code {
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 12px;
}

.event-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.event-card-delete {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 82, 82, 0.1);
  border: none;
  color: var(--red);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.event-card-delete:hover {
  background: rgba(255, 82, 82, 0.25);
}

.score-entry-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.team-select-dd {
  flex: 1;
  min-width: 200px;
  width: auto;
}

.score-input-field {
  width: 140px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.score-input-field:focus {
  border-color: var(--accent);
}

.score-feedback {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
}

.score-feedback.success {
  background: rgba(34, 201, 122, 0.12);
  border: 1px solid rgba(34, 201, 122, 0.3);
  color: var(--green);
}

.score-feedback.error {
  background: rgba(255, 82, 82, 0.12);
  border: 1px solid rgba(255, 82, 82, 0.3);
  color: var(--red);
}

.score-locked-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 82, 82, 0.1);
  border: 1px solid rgba(255, 82, 82, 0.3);
  color: var(--red);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.2px;
}

.declare-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.winner-count-input {
  width: 280px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.winner-count-input:focus {
  border-color: var(--gold);
}

.winner-declared-msg {
  color: var(--green);
  font-size: 0.95rem;
}

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

.empty-state-card {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  grid-column: 1 / -1;
}

/* ── Round 2 Option Cards ── */
.round2-btn-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.round2-option-card {
  background: rgba(108, 99, 255, 0.07);
  border: 1px solid rgba(108, 99, 255, 0.25);
  border-radius: var(--radius);
  padding: 24px 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.round2-option-card:hover {
  background: rgba(108, 99, 255, 0.15);
  border-color: rgba(108, 99, 255, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(108, 99, 255, 0.25);
}

.round2-option-card.cumulative-option {
  background: rgba(34, 201, 122, 0.07);
  border-color: rgba(34, 201, 122, 0.25);
}

.round2-option-card.cumulative-option:hover {
  background: rgba(34, 201, 122, 0.15);
  border-color: rgba(34, 201, 122, 0.5);
  box-shadow: 0 12px 36px rgba(34, 201, 122, 0.25);
}

.r2-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.round2-option-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.round2-option-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Round 2 Active Card ── */
.round2-active-card {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.06), transparent);
}

.round2-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.round2-mode-badge {
  background: rgba(108, 99, 255, 0.2);
  border: 1px solid rgba(108, 99, 255, 0.4);
  color: var(--accent);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ── Round Label (participant leaderboard) ── */
.round-label {
  display: inline-block;
  background: rgba(108, 99, 255, 0.2);
  border: 1px solid rgba(108, 99, 255, 0.4);
  color: var(--accent);
  padding: 3px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 6px;
  letter-spacing: 0.3px;
}

/* ── R2 Mini Badge (event cards) ── */
.r2-mini-badge {
  display: inline-block;
  background: rgba(108, 99, 255, 0.2);
  border: 1px solid rgba(108, 99, 255, 0.4);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Loader ── */
.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── Responsive ── */
@media (max-width: 768px) {
  .admin-sidebar {
    width: 100%;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 16px;
    gap: 12px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex: unset;
  }

  .admin-main {
    margin-left: 0;
    max-width: 100%;
    padding: 16px;
  }

  .admin-layout {
    flex-direction: column;
  }

  .score-entry-row {
    flex-direction: column;
  }

  .team-select-dd,
  .score-input-field,
  .winner-count-input {
    width: 100%;
  }

  .form-container {
    padding: 28px 20px;
    margin: 16px;
  }

  .leaderboard-wrapper {
    padding: 16px 12px;
  }

  .leaderboard-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .landing-cards {
    grid-template-columns: 1fr;
  }

  .declare-row {
    flex-direction: column;
  }

  .code-generate-row {
    flex-direction: column;
  }
}