/* ============================================================
   FlixoraPlay — V3 Design System
   Glassmorphism · Minimal · Professional
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg:             #060914;
  --bg-2:           #0b0f1c;
  --bg-3:           #111627;

  --glass:          rgba(255,255,255,0.04);
  --glass-2:        rgba(255,255,255,0.07);
  --glass-3:        rgba(255,255,255,0.11);
  --glass-border:   rgba(255,255,255,0.08);
  --glass-border-2: rgba(255,255,255,0.13);
  --glass-hover:    rgba(255,255,255,0.08);

  --purple:         #8b5cf6;
  --purple-2:       #7c3aed;
  --purple-3:       #6d28d9;
  --purple-dim:     rgba(139,92,246,0.12);
  --purple-glow:    rgba(139,92,246,0.2);
  --purple-light:   #c4b5fd;

  --gold:           #f59e0b;
  --gold-dim:       rgba(245,158,11,0.14);
  --gold-light:     #fcd34d;

  --green:          #10b981;
  --green-dim:      rgba(16,185,129,0.12);
  --green-light:    #6ee7b7;

  --blue:           #3b82f6;
  --blue-dim:       rgba(59,130,246,0.12);
  --blue-light:     #93c5fd;

  --red:            #ef4444;
  --red-dim:        rgba(239,68,68,0.12);

  --text:           #f1efff;
  --text-2:         #b8b0d4;
  --text-3:         #7c6fa0;
  --text-4:         #4a4268;

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   22px;
  --radius-full: 9999px;

  --shadow-sm:   0 2px 8px rgba(0,0,0,0.25);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.35);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 30px rgba(139,92,246,0.15);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3);

  --nav-h:    62px;
  --max-w:    1200px;
  --t:        0.2s ease;
  --t-slow:   0.35s ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 15%, rgba(139,92,246,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(59,130,246,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 40%, rgba(16,185,129,0.03) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

a { color: var(--purple-light); text-decoration: none; transition: color var(--t); }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }
button { cursor: none; font-family: inherit; }
ul, ol { list-style: none; }
input, select, textarea { cursor: none; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }

/* ── Cursor ────────────────────────────────────────────── */
.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--purple);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease, width 0.2s, height 0.2s, background 0.2s;
}
.cursor-ring {
  position: fixed;
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(139,92,246,0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: all 0.12s ease;
}
.cursor-ring.hovered { width: 50px; height: 50px; border-color: rgba(139,92,246,0.8); background: rgba(139,92,246,0.06); }
.cursor-ring.clicked { width: 28px; height: 28px; border-color: #fff; }
.cursor-dot.clicked  { background: #fff; transform: translate(-50%,-50%) scale(1.6); }

/* Click ripple */
.click-ripple {
  position: fixed;
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(139,92,246,0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%) scale(0);
  animation: rippleOut 0.55s ease forwards;
}
@keyframes rippleOut {
  0%   { transform: translate(-50%,-50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(5); opacity: 0; }
}

/* ── Loading bar ───────────────────────────────────────── */
.loading-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--purple-light));
  z-index: 10001;
  width: 0%;
  transition: width 0.3s ease, opacity 0.4s ease;
  box-shadow: 0 0 8px var(--purple);
}
.loading-bar.active { width: 85%; }
.loading-bar.done   { width: 100%; }
.loading-bar.hide   { opacity: 0; }

/* ── Layout ────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin-inline: auto; padding-inline: 24px; }
.page-body { padding: 36px 0 72px; }

/* ── Nav ───────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(6,9,20,0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}
.nav-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}
.nav-logo span { color: var(--purple-light); }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--t);
}
.nav-link svg { width: 14px; height: 14px; }
.nav-link:hover { color: #fff; background: var(--glass-2); }
.nav-link.active { color: #fff; background: var(--glass-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* After nav spacer */
.page-top { padding-top: var(--nav-h); }

/* ── Glass Card ────────────────────────────────────────── */
.card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--t-slow);
}
.card:hover {
  border-color: var(--glass-border-2);
  background: var(--glass-2);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  transform: translateY(-3px);
}
.card-body   { padding: 22px; }
.card-header {
  padding: 15px 22px;
  border-bottom: 1px solid var(--glass-border);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-header svg { width: 15px; height: 15px; color: var(--text-3); }
.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.1);
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: none;
  transition: all var(--t);
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.15s;
}
.btn:hover::after  { background: rgba(255,255,255,0.06); }
.btn:active        { transform: scale(0.97); }

.btn-primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 2px 16px rgba(139,92,246,0.35);
}
.btn-primary:hover {
  background: var(--purple-2);
  box-shadow: 0 4px 24px rgba(139,92,246,0.5);
  transform: translateY(-1px);
  color: #fff;
}
.btn-outline {
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: var(--text-2);
  border: 1px solid var(--glass-border-2);
}
.btn-outline:hover {
  background: var(--glass-2);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255,255,255,0.07);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; transform: translateY(-1px); }
.btn-secondary {
  background: var(--glass-2);
  color: var(--text-2);
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover { background: var(--glass-3); color: var(--text); }
.btn-danger  { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.25); color: #fff; }
.btn-gold    { background: rgba(245,158,11,0.15); color: var(--gold-light); border: 1px solid rgba(245,158,11,0.3); }
.btn-gold:hover { background: rgba(245,158,11,0.25); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.78rem; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-md); }
.w-full { width: 100%; }

/* ── Badges ────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.badge svg { width: 10px; height: 10px; }
.badge-purple { background: var(--purple-dim); color: var(--purple-light); border: 1px solid rgba(139,92,246,0.25); }
.badge-green  { background: var(--green-dim);  color: var(--green-light);  border: 1px solid rgba(16,185,129,0.25); }
.badge-gold   { background: var(--gold-dim);   color: var(--gold-light);   border: 1px solid rgba(245,158,11,0.25);}
.badge-blue   { background: var(--blue-dim);   color: var(--blue-light);   border: 1px solid rgba(59,130,246,0.25); }
.badge-red    { background: var(--red-dim);    color: #fca5a5;             border: 1px solid rgba(239,68,68,0.25); }
.badge-neutral{ background: var(--glass-2);   color: var(--text-2);       border: 1px solid var(--glass-border); }

/* ── Page Header ───────────────────────────────────────── */
.page-header {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 28px 0;
  margin-bottom: 32px;
}
.page-header h1 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.page-header p { color: var(--text-3); margin-top: 4px; font-size: 0.875rem; }
.header-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.breadcrumb { font-size: 0.78rem; color: var(--text-4); margin-bottom: 10px; display: flex; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--purple-light); }

/* ── Forms ─────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}
label .req { color: var(--red); }
input[type="text"], input[type="email"], input[type="url"],
input[type="date"], input[type="number"], input[type="password"],
select, textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-dim);
  background: var(--glass-3);
}
input::placeholder, textarea::placeholder { color: var(--text-4); }
select option { background: var(--bg-2); color: var(--text); }
textarea { resize: vertical; min-height: 96px; }
.form-hint { font-size: 0.75rem; color: var(--text-4); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ── Stats ─────────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.stat-box {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: all var(--t);
}
.stat-box:hover { background: var(--glass-2); border-color: var(--glass-border-2); }
.stat-box .num { font-size: 2rem; font-weight: 800; color: var(--purple-light); line-height: 1; letter-spacing: -0.04em; }
.stat-box .lbl { font-size: 0.72rem; color: var(--text-3); margin-top: 5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-box .stat-icon { display: flex; justify-content: center; margin-bottom: 8px; color: var(--text-4); }
.stat-box .stat-icon svg { width: 18px; height: 18px; }

/* ── Competition Card ──────────────────────────────────── */
.comp-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--t-slow);
  cursor: none;
}
.comp-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139,92,246,0.35);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.comp-card-thumb {
  height: 140px;
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(59,130,246,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-4);
}
.comp-card-thumb svg { width: 48px; height: 48px; }
.comp-card-body { padding: 18px; flex: 1; }
.comp-card-title { font-weight: 700; font-size: 0.95rem; color: #fff; margin-bottom: 6px; }
.comp-card-desc {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
.comp-card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-3);
}

/* ── Entry Card ────────────────────────────────────────── */
.entry-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--t-slow);
}
.entry-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139,92,246,0.3);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.entry-thumb {
  height: 160px;
  background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(16,185,129,0.06));
  display: flex; align-items: center; justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-4);
}
.entry-thumb svg { width: 48px; height: 48px; }
.rank-badge {
  position: absolute; top: 10px; left: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
  border: 1.5px solid;
}
.rank-badge svg { width: 14px; height: 14px; }
.rank-1 { background: rgba(245,158,11,0.2); border-color: rgba(245,158,11,0.6); color: var(--gold-light); }
.rank-2 { background: rgba(148,163,184,0.15); border-color: rgba(148,163,184,0.5); color: #cbd5e1; }
.rank-3 { background: rgba(217,119,6,0.15); border-color: rgba(217,119,6,0.5); color: #fbbf24; }
.entry-body { padding: 14px 18px; }
.entry-title { font-weight: 700; font-size: 0.9rem; color: #fff; margin-bottom: 4px; }
.entry-creator { font-size: 0.76rem; color: var(--text-3); margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.entry-creator svg { width: 12px; height: 12px; }
.entry-tools { display: flex; gap: 5px; flex-wrap: wrap; }
.tool-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--purple-dim);
  color: var(--purple-light);
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 0.68rem; font-weight: 600;
  border: 1px solid rgba(139,92,246,0.2);
}
.tool-tag svg { width: 9px; height: 9px; }
.entry-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--glass-border);
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,0,0,0.1);
}

/* Vote button */
.vote-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem; font-weight: 600;
  color: var(--text-3);
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  cursor: none;
  transition: all var(--t);
  font-family: inherit;
}
.vote-btn svg { width: 12px; height: 12px; }
.vote-btn:hover { color: var(--purple-light); border-color: var(--purple); background: var(--purple-dim); }
.vote-btn.voted { color: var(--purple-light); border-color: var(--purple); background: var(--purple-dim); }

/* ── Tabs ──────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 1px solid var(--glass-border); margin-bottom: 24px; }
.tab-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 18px;
  font-size: 0.82rem; font-weight: 600;
  cursor: none; border: none; background: none;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--t);
  font-family: inherit;
}
.tab-btn svg { width: 14px; height: 14px; }
.tab-btn:hover { color: var(--text-2); }
.tab-btn.active { color: var(--purple-light); border-bottom-color: var(--purple); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Sidebar ───────────────────────────────────────────── */
.layout-sidebar { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.sidebar-panel {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}
.sidebar-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--glass-border);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-2);
  background: rgba(0,0,0,0.1);
  display: flex; align-items: center; gap: 8px;
}
.sidebar-header svg { width: 14px; height: 14px; color: var(--text-3); }
.sidebar-body { padding: 16px 18px; }
.sidebar-info-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; padding: 8px 0;
  border-bottom: 1px solid var(--glass-border);
}
.sidebar-info-row:last-child { border-bottom: none; }
.sidebar-info-row .label { color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.sidebar-info-row .label svg { width: 12px; height: 12px; }
.sidebar-info-row .value { font-weight: 600; color: var(--text); font-size: 0.8rem; }

/* ── Table ─────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead th {
  background: rgba(0,0,0,0.2);
  text-align: left; padding: 11px 16px;
  font-size: 0.72rem; color: var(--text-3);
  border-bottom: 1px solid var(--glass-border);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--glass-border); vertical-align: middle; }
tbody tr:hover { background: var(--glass); }
tbody tr:last-child td { border-bottom: none; }

/* ── Score input ───────────────────────────────────────── */
.score-input {
  width: 64px; text-align: center; padding: 6px;
  background: var(--glass-2); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 700; color: var(--text);
  font-family: inherit; transition: border-color var(--t);
}
.score-input:focus { border-color: var(--purple); outline: none; box-shadow: 0 0 0 3px var(--purple-dim); }
.score-controls { display: flex; align-items: center; gap: 6px; }
.score-controls button {
  width: 26px; height: 26px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--glass-2); color: var(--text-2);
  font-family: inherit; cursor: none;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t);
}
.score-controls button:hover { background: var(--purple-dim); border-color: var(--purple); color: var(--purple-light); }

/* ── Alerts ────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  margin-bottom: 16px;
  display: flex; gap: 10px; align-items: flex-start;
}
.alert svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.alert-info    { background: var(--purple-dim); color: var(--purple-light); border-left: 3px solid var(--purple); }
.alert-success { background: var(--green-dim);  color: var(--green-light);  border-left: 3px solid var(--green); }
.alert-warning { background: var(--gold-dim);   color: var(--gold-light);   border-left: 3px solid var(--gold); }
.alert-error   { background: var(--red-dim);    color: #fca5a5;             border-left: 3px solid var(--red); }

/* ── Deadline ──────────────────────────────────────────── */
.deadline-wrap { margin-top: 10px; }
.deadline-bar { height: 3px; background: var(--glass-2); border-radius: 99px; overflow: hidden; }
.deadline-fill { height: 100%; background: linear-gradient(90deg, var(--purple-2), var(--purple)); border-radius: 99px; }
.deadline-label { font-size: 0.72rem; color: var(--text-4); margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.deadline-label svg { width: 11px; height: 11px; }

/* ── Empty state ───────────────────────────────────────── */
.empty-state { text-align: center; padding: 52px 20px; }
.empty-state .icon { width: 52px; height: 52px; border-radius: 50%; background: var(--glass-2); border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; color: var(--text-4); }
.empty-state .icon svg { width: 22px; height: 22px; }
.empty-state h3 { color: var(--text-2); margin-bottom: 8px; font-size: 1rem; }
.empty-state p  { font-size: 0.82rem; color: var(--text-3); margin-bottom: 16px; }

/* ── Toast ─────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9997; display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  background: rgba(11,15,28,0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border-2);
  color: var(--text);
  padding: 13px 18px;
  border-radius: var(--radius-lg);
  font-size: 0.82rem;
  max-width: 340px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  pointer-events: all;
  animation: slideInToast 0.3s ease;
}
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast.success { border-left: 3px solid var(--green); }
.toast.success svg { color: var(--green-light); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.error svg { color: #fca5a5; }
.toast.info    { border-left: 3px solid var(--purple); }
.toast.info svg { color: var(--purple-light); }
@keyframes slideInToast {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Modal ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(6,9,20,0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: rgba(11,15,28,0.95);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border-2);
  border-radius: var(--radius-xl);
  max-width: 580px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; font-size: 1rem; color: #fff;
}
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-2); border: 1px solid var(--glass-border);
  color: var(--text-3); cursor: none; transition: all var(--t);
}
.modal-close svg { width: 14px; height: 14px; }
.modal-close:hover { background: var(--red-dim); color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.modal-body   { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--glass-border); display: flex; justify-content: flex-end; gap: 10px; background: rgba(0,0,0,0.15); }

/* ── Drop Zone ─────────────────────────────────────────── */
.drop-zone {
  border: 1.5px dashed var(--glass-border-2);
  border-radius: var(--radius-lg);
  padding: 40px; text-align: center; cursor: none;
  color: var(--text-3); transition: all var(--t);
}
.drop-zone svg { width: 32px; height: 32px; margin: 0 auto 10px; }
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--purple); background: var(--purple-dim); color: var(--purple-light);
}
.drop-zone p { font-size: 0.875rem; }

/* ── Divider ───────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--glass-border); margin: 20px 0; }

/* ── Section labels ────────────────────────────────────── */
.section-label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  background: var(--purple-dim);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: var(--radius-full);
  font-size: 0.68rem; font-weight: 700;
  color: var(--purple-light);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.section-label svg { width: 11px; height: 11px; }
.section-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.035em; color: #fff; margin-bottom: 6px; }
.section-sub   { font-size: 0.875rem; color: var(--text-3); margin-bottom: 28px; }

/* ── Ranking ───────────────────────────────────────────── */
.ranking-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--t);
}
.ranking-row:last-child { border-bottom: none; }
.ranking-row:hover { background: var(--glass); }
.ranking-pos {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; flex-shrink: 0;
  border: 1.5px solid var(--glass-border-2); color: var(--text-3);
  background: var(--glass-2);
}
.ranking-pos svg { width: 14px; height: 14px; }
.ranking-pos.gold   { border-color: rgba(245,158,11,0.5); color: var(--gold-light); background: rgba(245,158,11,0.1); }
.ranking-pos.silver { border-color: rgba(148,163,184,0.4); color: #cbd5e1; background: rgba(148,163,184,0.08); }
.ranking-pos.bronze { border-color: rgba(217,119,6,0.4); color: #fbbf24; background: rgba(217,119,6,0.08); }
.ranking-info  { flex: 1; min-width: 0; }
.ranking-name  { font-weight: 600; font-size: 0.875rem; color: var(--text); }
.ranking-sub   { font-size: 0.72rem; color: var(--text-3); margin-top: 2px; }
.ranking-pts   { font-size: 1.2rem; font-weight: 800; color: var(--purple-light); text-align: right; }
.ranking-pts-l { font-size: 0.65rem; color: var(--text-4); display: block; text-align: right; }

/* ── Grids ─────────────────────────────────────────────── */
.grid-2    { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.grid-3    { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4    { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill,minmax(290px,1fr)); gap: 20px; }

/* ── Footer ────────────────────────────────────────────── */
.footer {
  background: rgba(0,0,0,0.3);
  border-top: 1px solid var(--glass-border);
  padding: 36px 0;
  backdrop-filter: blur(10px);
}
.footer a { color: var(--text-3); }
.footer a:hover { color: var(--text); }

/* ══════════════════════════════════════════════════════════
   HOW IT WORKS — VISUAL MAP
   ══════════════════════════════════════════════════════════ */

.hiw-wrapper { padding: 64px 0; }

/* Start node */
.hiw-start {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}
.hiw-start-node {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(11,15,28,0.8);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border-2);
  border-radius: var(--radius-full);
  padding: 12px 28px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(139,92,246,0.2), 0 8px 24px rgba(0,0,0,0.4);
}
.hiw-start-node svg { width: 18px; height: 18px; color: var(--purple-light); }

/* Vertical trunk line */
.hiw-trunk {
  display: flex;
  justify-content: center;
}
.hiw-trunk-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(139,92,246,0.5), rgba(139,92,246,0.1));
}

/* Branch area */
.hiw-branches {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
  position: relative;
}

/* Horizontal connector across top of branches */
.hiw-branches::before {
  content: '';
  position: absolute;
  top: 0; left: calc(16.66% + 10px); right: calc(16.66% + 10px);
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(139,92,246,0.4) 20%, rgba(139,92,246,0.4) 80%, transparent);
}

/* Each branch column */
.hiw-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Short vertical from horizontal bar to column header */
.hiw-branch-drop {
  width: 1px;
  height: 32px;
  flex-shrink: 0;
}
.b-host    .hiw-branch-drop { background: linear-gradient(to bottom, rgba(139,92,246,0.4), rgba(139,92,246,0.6)); }
.b-creator .hiw-branch-drop { background: linear-gradient(to bottom, rgba(16,185,129,0.4), rgba(16,185,129,0.6)); }
.b-viewer  .hiw-branch-drop { background: linear-gradient(to bottom, rgba(59,130,246,0.4), rgba(59,130,246,0.6)); }

/* Branch header pill */
.hiw-branch-head {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.82rem;
  display: flex; align-items: center; gap: 8px;
  backdrop-filter: blur(12px);
  width: fit-content;
  flex-shrink: 0;
}
.hiw-branch-head svg { width: 15px; height: 15px; }
.b-host    .hiw-branch-head { background: var(--purple-dim); color: var(--purple-light); border: 1px solid rgba(139,92,246,0.3); }
.b-creator .hiw-branch-head { background: var(--green-dim); color: var(--green-light); border: 1px solid rgba(16,185,129,0.3); }
.b-viewer  .hiw-branch-head { background: var(--blue-dim); color: var(--blue-light); border: 1px solid rgba(59,130,246,0.3); }

/* Steps wrapper */
.hiw-steps-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; }

/* Step connector line */
.hiw-step-line {
  width: 1px; height: 20px; flex-shrink: 0;
}
.b-host    .hiw-step-line { background: rgba(139,92,246,0.25); }
.b-creator .hiw-step-line { background: rgba(16,185,129,0.25); }
.b-viewer  .hiw-step-line { background: rgba(59,130,246,0.25); }

/* Step box */
.hiw-step {
  width: 100%;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: all var(--t);
}
.hiw-step:hover { background: var(--glass-2); border-color: var(--glass-border-2); }
.hiw-step-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.hiw-step-top svg { width: 14px; height: 14px; flex-shrink: 0; }
.b-host    .hiw-step-top svg { color: var(--purple-light); }
.b-creator .hiw-step-top svg { color: var(--green-light); }
.b-viewer  .hiw-step-top svg { color: var(--blue-light); }
.hiw-step-name { font-weight: 600; font-size: 0.8rem; color: var(--text); }
.hiw-step-desc { font-size: 0.72rem; color: var(--text-3); line-height: 1.4; padding-left: 22px; }

/* Outcome */
.hiw-outcome {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.hiw-outcome svg { width: 14px; height: 14px; flex-shrink: 0; }
.b-host    .hiw-outcome { background: var(--purple-dim); color: var(--purple-light); border: 1px solid rgba(139,92,246,0.2); }
.b-creator .hiw-outcome { background: var(--green-dim); color: var(--green-light); border: 1px solid rgba(16,185,129,0.2); }
.b-viewer  .hiw-outcome { background: var(--blue-dim); color: var(--blue-light); border: 1px solid rgba(59,130,246,0.2); }

/* Rules grid */
.hiw-rules {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
  margin-top: 40px;
}
.hiw-rule-box {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px;
  backdrop-filter: blur(12px);
}
.hiw-rule-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700;
  color: var(--text-2); margin-bottom: 10px;
}
.hiw-rule-title svg { width: 14px; height: 14px; color: var(--purple-light); }
.hiw-rule-box ul { padding-left: 0; display: flex; flex-direction: column; gap: 6px; }
.hiw-rule-box li {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 0.76rem; color: var(--text-3); line-height: 1.4;
}
.hiw-rule-box li svg { width: 11px; height: 11px; flex-shrink: 0; margin-top: 2px; color: var(--text-4); }

/* ── Judge page specifics ──────────────────────────────── */
.judge-thumb {
  width: 90px; height: 54px;
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(59,130,246,0.1));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--text-4);
}
.judge-thumb svg { width: 22px; height: 22px; }

/* ── General responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .layout-sidebar { grid-template-columns: 1fr; }
  .sidebar-panel { position: static; }
}
@media (max-width: 768px) {
  .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .nav-links { display: none; }
}
@media (max-width: 480px) {
  .grid-auto { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}

/* ──────────────────────────────────────────────────────────
   HOW IT WORKS — Responsive Breakpoints
   ──────────────────────────────────────────────────────── */

/* Tablet: 2-column grid (1st two left, 3rd centered below) */
@media (max-width: 1024px) and (min-width: 641px) {
  .hiw-branches {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-top: 28px;
  }
  .hiw-branches::before { display: none; }
  .hiw-trunk-line { height: 28px; }
  .hiw-branch-drop { height: 0; }
  /* Third branch (viewer) spans both cols, centered */
  .b-viewer {
    grid-column: 1 / -1;
    max-width: 360px;
    margin: 0 auto;
    width: 100%;
  }
  /* Add a subtle top border to viewer branch */
  .b-viewer::before {
    content: '';
    display: block;
    width: 1px;
    height: 20px;
    background: rgba(59,130,246,0.35);
    margin: 0 auto 0;
  }
  .hiw-rules { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: Fully stacked vertical */
@media (max-width: 640px) {
  .hiw-wrapper { padding: 40px 0; }
  .hiw-branches {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .hiw-branches::before { display: none; }

  /* Vertical connector between stacked branches */
  .hiw-branch:not(:last-child)::after {
    content: '';
    display: block;
    width: 1px;
    height: 16px;
    background: var(--glass-border-2);
    margin: 0 auto;
  }

  .hiw-trunk-line { height: 20px; }
  .hiw-branch-drop { height: 16px; }
  .hiw-branch-head { width: 100%; justify-content: center; }
  .hiw-step-line { height: 14px; }
  .hiw-step { padding: 10px 12px; }
  .hiw-step-desc { font-size: 0.7rem; }
  .hiw-outcome { justify-content: center; }
  .hiw-rules { grid-template-columns: 1fr; gap: 10px; margin-top: 24px; }

  .hiw-wrapper .section-title { font-size: 1.2rem; }
  .hiw-start-node { font-size: 0.8rem; padding: 10px 20px; }
  .hiw-start-node svg { width: 16px; height: 16px; }
}

/* ── Utility ───────────────────────────────────────────── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; } .text-xs { font-size: 0.76rem; }
.text-muted { color: var(--text-3); }
.font-bold { font-weight: 700; }
