:root {
  --bg: #050308;
  --bg-elevated: #0e0a14;
  --ink: #e8e6ef;
  --muted: #9a93a8;
  --silver: #c5c0cc;
  --purple: #b84dff;
  --purple-hot: #d56bff;
  --purple-deep: #6b1fb8;
  --line: rgba(184, 77, 255, 0.28);
  --glow: 0 0 24px rgba(184, 77, 255, 0.45);
  --font-display: "Cinzel Decorative", serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --radius: 2px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(107, 31, 184, 0.35), transparent 55%),
    radial-gradient(ellipse 40% 30% at 90% 20%, rgba(184, 77, 255, 0.12), transparent 50%),
    linear-gradient(180deg, #08050d 0%, var(--bg) 40%, #030105 100%);
  background-attachment: fixed;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.04;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header, main, .site-footer, .staff-header, .staff-main { position: relative; z-index: 1; }

a { color: var(--purple-hot); text-decoration: none; }
a:hover { color: #fff; text-shadow: var(--glow); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  background: rgba(5, 3, 8, 0.72);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--silver);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(184, 77, 255, 0.55));
}

.brand-text { display: none; }
@media (min-width: 900px) { .brand-text { display: inline; } }

.site-nav {
  display: none;
  gap: 1.1rem;
  align-items: center;
}

.site-nav a {
  color: var(--silver);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.site-nav a.is-active,
.site-nav a:hover,
.nav-dropdown.is-active > .nav-dropdown-toggle,
.nav-dropdown-toggle:hover {
  color: var(--purple-hot);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--silver);
  font: inherit;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.nav-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.75;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  padding: 0.65rem 0.45rem 0.45rem; /* top padding bridges hover gap */
  background: transparent;
  border: 0;
  box-shadow: none;
  z-index: 30;
}

.nav-dropdown-menu::before {
  content: "";
  display: block;
  background: rgba(10, 7, 16, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--glow);
  position: absolute;
  inset: 0.55rem 0 0;
  z-index: -1;
}

.nav-dropdown-menu a {
  display: block;
  position: relative;
  padding: 0.65rem 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.is-active {
  color: var(--purple-hot);
  background: rgba(184, 77, 255, 0.08);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
}

.nav-staff {
  border: 1px solid var(--line);
  padding: 0.4rem 0.75rem;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--purple-hot);
  box-shadow: var(--glow);
}

@media (min-width: 880px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; }
}

.site-nav.is-open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: absolute;
  right: 1rem;
  top: 72px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 1rem;
  min-width: 220px;
  box-shadow: var(--glow);
}

.site-nav.is-open .nav-dropdown-menu {
  position: static;
  display: none;
  margin-top: 0.35rem;
  padding: 0.35rem;
  background: rgba(10, 7, 16, 0.96);
  border: 1px solid rgba(184, 77, 255, 0.18);
  box-shadow: none;
}

.site-nav.is-open .nav-dropdown-menu::before {
  display: none;
}

.site-nav.is-open .nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
}

.hero {
  min-height: calc(100vh - 84px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem 1.25rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 10% 20%;
  background: radial-gradient(circle, rgba(184, 77, 255, 0.22), transparent 65%);
  filter: blur(20px);
  animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.hero-logo {
  width: min(520px, 88vw);
  height: auto;
  position: relative;
  filter: drop-shadow(0 0 28px rgba(184, 77, 255, 0.5));
  animation: floatIn 1.1s ease-out both;
}

@keyframes floatIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.hero h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hero-copy {
  max-width: 34rem;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.55;
  animation: floatIn 1.2s ease-out 0.15s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 1.75rem;
  animation: floatIn 1.2s ease-out 0.28s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--purple);
  color: #fff;
  background: linear-gradient(135deg, rgba(107, 31, 184, 0.85), rgba(184, 77, 255, 0.35));
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--glow);
}

.btn:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 0 36px rgba(213, 107, 255, 0.65);
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
}

.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  color: var(--silver);
  font-size: 0.9rem;
  animation: floatIn 1.2s ease-out 0.4s both;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7dffb3;
  box-shadow: 0 0 10px #7dffb3;
  animation: blink 1.6s infinite;
}
.pulse-dot.is-offline {
  background: #ff6b8a;
  box-shadow: 0 0 10px #ff6b8a;
  animation: none;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.section {
  width: min(960px, 92vw);
  margin: 0 auto;
  padding: 3.5rem 0;
}

.section h1, .section h2, .page-title {
  font-family: var(--font-display);
  color: var(--silver);
  letter-spacing: 0.04em;
  text-shadow: 0 0 18px rgba(184, 77, 255, 0.35);
}

.lede {
  color: var(--muted);
  margin: 0.35rem 0 1.25rem;
  max-width: 42rem;
}

.prose {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}
.prose h2, .prose h3 { color: var(--ink); font-family: var(--font-display); }
.prose ol, .prose ul { padding-left: 1.2rem; }

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.roster-item {
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(184, 77, 255, 0.08), rgba(0,0,0,0.35));
  padding: 1.25rem;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.roster-item:hover {
  border-color: var(--purple-hot);
  transform: translateY(-3px);
}
.roster-item h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  color: var(--ink);
}
.roster-item p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 2rem 1.25rem;
  background: rgba(0,0,0,0.45);
}
.footer-inner {
  width: min(960px, 92vw);
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; align-items: center; }
}
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-meta { color: var(--muted); display: flex; align-items: center; gap: 0.5rem; }

.staff-body { background: #06040a; }
.staff-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 5, 14, 0.95);
}
.brand-compact .brand-mark { width: 36px; height: 36px; }
.staff-nav { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
.staff-nav a { color: var(--silver); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.staff-main { width: min(1100px, 94vw); margin: 0 auto; padding: 1.75rem 0 3rem; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
.stat {
  border: 1px solid var(--line);
  padding: 1.1rem;
  background: rgba(184, 77, 255, 0.06);
}
.stat .label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.stat .value { font-size: 1.8rem; font-weight: 700; margin-top: 0.35rem; color: var(--purple-hot); text-shadow: var(--glow); }

.panel {
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.35);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.panel h2 { margin-top: 0; font-family: var(--font-display); color: var(--silver); font-size: 1.15rem; }

.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 0.65rem 0.5rem; border-bottom: 1px solid rgba(184,77,255,0.15); }
.table th { color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.75rem; }

.form-grid { display: grid; gap: 0.85rem; }
.form-grid label { display: grid; gap: 0.35rem; color: var(--muted); font-size: 0.85rem; }
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: #0a0710;
  color: var(--ink);
  font: inherit;
  border-radius: var(--radius);
}
.form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; }

.alert { padding: 0.8rem 1rem; margin-bottom: 1rem; border: 1px solid var(--line); }
.alert-success { border-color: rgba(125, 255, 179, 0.4); color: #b8ffd4; }
.alert-error { border-color: rgba(255, 107, 138, 0.5); color: #ffb3c2; }

.badge {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line);
  color: var(--purple-hot);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.search-bar { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.search-bar input { flex: 1; min-width: 220px; padding: 0.7rem 0.8rem; border: 1px solid var(--line); background: #0a0710; color: var(--ink); font: inherit; }

.btn-small {
  padding: 0.4rem 0.7rem;
  font-size: 0.72rem;
  clip-path: none;
  border-radius: var(--radius);
}
.inline-form { display: inline-flex; margin: 0 0.2rem 0 0; }

.feed-filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(120px, 0.7fr));
  gap: 0.75rem;
  align-items: end;
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.35);
}
.feed-filters label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.feed-filters input,
.feed-filters select {
  width: 100%;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  background: #0a0710;
  color: var(--ink);
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
}
.feed-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.live-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  font-weight: 600;
}
.live-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #4a4458;
  box-shadow: none;
}
.live-dot.is-hot {
  background: #7dffb3;
  box-shadow: 0 0 10px rgba(125, 255, 179, 0.8);
}
.feed-status { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.85rem; }
.feed-url { display: inline-block; max-width: 42rem; word-break: break-all; margin-right: 0.5rem; }

.feed-card {
  --feed-accent: var(--purple);
  border: 1px solid var(--line);
  border-left: 4px solid var(--feed-accent);
  background: rgba(0,0,0,0.4);
  padding: 1rem 1.1rem 1.15rem;
  margin-bottom: 0.9rem;
}
.feed-card.feed-high { --feed-accent: #ff6b8a; }
.feed-card.feed-medium { --feed-accent: #ffcc66; }
.feed-card.feed-info { --feed-accent: var(--purple); }
.feed-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.55rem;
}
.feed-card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.feed-card time { color: var(--muted); font-size: 0.82rem; }
.feed-card h3 { margin: 0 0 0.5rem; color: var(--silver); font-size: 1.05rem; }
.feed-content, .feed-player { color: var(--ink); margin: 0.35rem 0; }
.feed-desc {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  background: rgba(184, 77, 255, 0.05);
  border: 1px solid rgba(184, 77, 255, 0.12);
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}
.feed-ids, .feed-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem 0.9rem;
  margin: 0.75rem 0 0;
}
.feed-ids div, .feed-fields div { min-width: 0; }
.feed-ids dt, .feed-fields dt {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.15rem;
}
.feed-ids dd, .feed-fields dd {
  margin: 0;
  color: var(--ink);
  word-break: break-word;
  font-size: 0.92rem;
}
.feed-image img {
  max-width: 100%;
  max-height: 320px;
  margin-top: 0.7rem;
  border: 1px solid var(--line);
}
.badge-high { color: #ffb3c2; border-color: rgba(255, 107, 138, 0.5); }
.badge-medium { color: #ffe0a3; border-color: rgba(255, 204, 102, 0.45); }
.badge-info { color: var(--purple-hot); }

@media (max-width: 800px) {
  .feed-filters { grid-template-columns: 1fr 1fr; }
}

.rules-content {
  margin-top: 1.5rem;
  max-width: 48rem;
}

.rules-content h1:first-child {
  display: none; /* page title already shown */
}

.rules-content h1,
.rules-content h2,
.rules-content h3,
.rules-content h4 {
  color: var(--silver);
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  text-shadow: 0 0 18px rgba(184, 77, 255, 0.3);
  margin-top: 2rem;
}

.rules-content p,
.rules-content li {
  color: var(--muted);
  line-height: 1.7;
}

.rules-content strong,
.rules-content b {
  color: var(--ink);
}

.rules-content a {
  color: var(--purple-hot);
}

.rules-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.75rem 0;
}

.rules-content ul,
.rules-content ol {
  padding-left: 1.25rem;
}

.rules-content img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(184, 77, 255, 0.25));
}

.rules-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.rules-content td,
.rules-content th {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  color: var(--muted);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.filter-tabs a {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  background: rgba(0,0,0,0.28);
}
.filter-tabs a:hover,
.filter-tabs a.active {
  color: var(--ink);
  border-color: rgba(184,77,255,0.55);
  background: rgba(184,77,255,0.12);
}
.table-scroll {
  overflow-x: auto;
}
.wipe-guide {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
}
.wipe-guide li { margin-bottom: 0.35rem; }
.muted { color: var(--muted); }
.stat .muted { font-size: 0.78rem; margin-top: 0.35rem; }

.wipe-category-select {
  min-width: 150px;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  background: #0a0710;
  color: var(--ink);
  font: inherit;
}
.wipe-save-status {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.75rem;
}
.wipe-run-panel {
  border-color: rgba(255, 107, 138, 0.35);
}
.wipe-run-form {
  display: grid;
  gap: 0.85rem;
  max-width: 420px;
  margin-top: 1rem;
}
.wipe-run-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.wipe-run-form input {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: #0a0710;
  color: var(--ink);
  font: inherit;
}
.btn-danger {
  appearance: none;
  border: 1px solid rgba(255, 107, 138, 0.55);
  background: rgba(255, 107, 138, 0.16);
  color: #ffb3c2;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.wipe-preview {
  margin: 0.75rem 0 0;
  color: var(--muted);
}
.wipe-preview ul {
  max-height: 220px;
  overflow: auto;
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
}

#wipe-table tbody tr.wipe-row td {
  border-left: 0 solid transparent;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
#wipe-table tbody tr.wipe-row-player_data td {
  background: rgba(255, 72, 110, 0.14);
}
#wipe-table tbody tr.wipe-row-player_data td:first-child {
  box-shadow: inset 4px 0 0 #ff4870;
}
#wipe-table tbody tr.wipe-row-needs_review td {
  background: rgba(255, 184, 48, 0.12);
}
#wipe-table tbody tr.wipe-row-needs_review td:first-child {
  box-shadow: inset 4px 0 0 #ffb830;
}
#wipe-table tbody tr.wipe-row-config_reference td {
  background: rgba(72, 180, 255, 0.12);
}
#wipe-table tbody tr.wipe-row-config_reference td:first-child {
  box-shadow: inset 4px 0 0 #48b4ff;
}
#wipe-table tbody tr.wipe-row-website_cms td {
  background: rgba(184, 77, 255, 0.12);
}
#wipe-table tbody tr.wipe-row-website_cms td:first-child {
  box-shadow: inset 4px 0 0 #b84dff;
}
#wipe-table tbody tr.wipe-row:hover td {
  filter: brightness(1.12);
}

.wipe-category-select option[value="player_data"] { color: #ff8da3; }
.wipe-category-select option[value="needs_review"] { color: #ffd27a; }
.wipe-category-select option[value="config_reference"] { color: #8fd0ff; }
