@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --bg: #0a0608;
  --bg2: #100a0c;
  --surface: #16090c;
  --surface2: #1f0d11;
  --border: #3a1520;
  --border-hi: #5c2030;
  --red: #cc2233;
  --red-dark: #7a1020;
  --red-bright: #ff4455;
  --red-glow: rgba(204,34,51,0.3);
  --gold: #c8922a;
  --gold-light: #f0c050;
  --gold-dark: #7a5010;
  --text: #d4b8bc;
  --text-muted: #7a5560;
  --text-bright: #f0e0e2;
  --green: #55cc66;
  --aqua: #55ddcc;
  --ember: #ff4455;
  --card: var(--surface);
  --line: var(--border);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(120,10,20,0.25) 0%, transparent 70%),
    repeating-linear-gradient(0deg,  transparent, transparent 31px, rgba(255,255,255,0.008) 32px),
    repeating-linear-gradient(90deg, transparent, transparent 31px, rgba(255,255,255,0.008) 32px);
  color: var(--text);
  font-family: 'VT323', monospace;
  font-size: 20px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red-dark); }

a { color: inherit; }

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ══ ANNOUNCE BAR ══ */
.announce-bar {
  background: linear-gradient(90deg, #0a0608, #1a0510, #0a0608);
  border-bottom: 2px solid var(--red-dark);
  text-align: center;
  padding: 5px 1rem;
  font-size: 17px;
  color: var(--red);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.announce-bar em { color: var(--gold-light); font-style: normal; }

/* ══ TOPBAR ══ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(180deg, #130608 0%, #0a0608 100%);
  border-bottom: 3px solid var(--red-dark);
  box-shadow: 0 2px 0 #4a0810, 0 6px 32px rgba(180,0,20,0.25);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.brand-ring {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 10px rgba(200,146,42,0.5), inset 0 0 8px rgba(0,0,0,0.7);
  background: radial-gradient(circle at 40% 35%, #2a0a0e, #0a0608);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.brand-ring::after {
  content: '';
  position: absolute; inset: 2px;
  border-radius: 50%;
  border: 1px solid rgba(200,146,42,0.25);
}
.brand-ring svg { width: 26px; height: 26px; }

/* legacy brand-mark fallback */
.brand-mark { display: none; }

.brand-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.52rem;
  color: var(--gold-light);
  text-shadow: 2px 2px 0 var(--gold-dark), 0 0 14px rgba(200,146,42,0.3);
  letter-spacing: 1px;
  line-height: 1.8;
}
.brand-text span {
  display: block;
  font-size: 0.38rem;
  color: var(--red);
  letter-spacing: 2px;
  text-shadow: 1px 1px 0 var(--red-dark);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
}

.nav a {
  font-size: 19px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid transparent;
  letter-spacing: 0.5px;
  transition: all 0.12s;
}

.nav a:hover,
.nav a.active {
  color: var(--gold-light);
  border-color: rgba(200,146,42,0.3);
  background: rgba(200,146,42,0.06);
  text-shadow: 0 0 10px rgba(200,146,42,0.4);
}

main {
  padding: 2rem 0 3rem;
}

/* ══ HERO ══ */
.page-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-hi);
  box-shadow: inset -2px -2px 0 rgba(0,0,0,0.5), inset 2px 2px 0 rgba(255,255,255,0.02), 0 8px 32px rgba(0,0,0,0.5);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  margin-bottom: 1.7rem;
  overflow: hidden;
  position: relative;
  animation: fadeUp 0.5s ease both;
}

.page-hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,146,42,0.15), transparent);
}

.page-hero::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  right: -60px;
  top: -80px;
  background: radial-gradient(circle, rgba(180,0,20,0.2) 0%, transparent 70%);
}

.hero-kicker,
.section-kicker {
  margin: 0;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 5px;
  color: var(--red);
  text-shadow: 0 0 16px rgba(204,34,51,0.5);
}

h1, h2, h3 {
  margin: 0.3rem 0 0.7rem;
  line-height: 1.5;
}

h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.7rem, 2.5vw, 1.1rem);
  color: var(--text-bright);
  text-shadow: 3px 3px 0 #2a0810, 0 0 40px rgba(200,146,42,0.12);
  line-height: 1.8;
}

h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.58rem;
  color: var(--gold-light);
  text-shadow: 1px 1px 0 var(--gold-dark);
  letter-spacing: 0.5px;
}

h3 {
  font-family: 'VT323', monospace;
  font-size: 23px;
  color: var(--text-bright);
}

p {
  margin: 0.2rem 0 0.8rem;
  color: var(--text-muted);
  font-size: 20px;
}

code {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  color: var(--gold-light);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
  justify-content: center;
}

.badge {
  font-size: 18px;
  background: var(--surface2);
  border: 1px solid var(--border-hi);
  color: var(--gold);
  padding: 3px 14px;
  letter-spacing: 1px;
  box-shadow: 2px 2px 0 #000, 0 0 8px rgba(200,146,42,0.1);
}

/* ══ GRID ══ */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.2rem;
}

.auto-grid-4 > * { grid-column: span 3; }
.auto-grid-3 > * { grid-column: span 4; }
.auto-grid-2 > * { grid-column: span 6; }

.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* ══ CARDS ══ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-hi);
  box-shadow: inset -2px -2px 0 rgba(0,0,0,0.5), inset 2px 2px 0 rgba(255,255,255,0.02), 0 8px 32px rgba(0,0,0,0.5);
  padding: 1.4rem 1.5rem;
  animation: fadeUp 0.4s ease both;
  position: relative;
}

.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,146,42,0.15), transparent);
}

.card strong { color: var(--text-bright); }

.metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metric-label {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.metric-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.95rem;
  color: var(--text-bright);
}

/* ══ BUTTONS ══ */
.btn {
  font-family: 'VT323', monospace;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 8px 22px;
  background: linear-gradient(180deg, #cc2233 0%, #8a0f1c 100%);
  color: #f0e0e2;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.5px;
  border: 1px solid var(--red);
  box-shadow: 3px 3px 0 #3a0810, inset -1px -1px 0 rgba(0,0,0,0.3), inset 1px 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.08s;
}

.btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 4px 4px 0 #3a0810, 0 0 16px rgba(200,30,50,0.35), inset -1px -1px 0 rgba(0,0,0,0.3), inset 1px 1px 0 rgba(255,255,255,0.1);
}

.btn:active { transform: translateY(2px); box-shadow: 1px 1px 0 #3a0810; }

.btn-gold {
  background: linear-gradient(180deg, #c8922a 0%, #7a5010 100%);
  color: #0a0608;
  border-color: var(--gold);
  box-shadow: 3px 3px 0 #3a2808, inset -1px -1px 0 rgba(0,0,0,0.3), inset 1px 1px 0 rgba(255,255,255,0.15);
}
.btn-gold:hover { box-shadow: 4px 4px 0 #3a2808, 0 0 16px rgba(200,146,42,0.4); }

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-dark);
  box-shadow: 2px 2px 0 #000;
}
.btn-outline:hover {
  background: rgba(200,146,42,0.07);
  color: var(--gold-light);
  border-color: var(--gold);
  box-shadow: 2px 2px 0 #000, 0 0 12px rgba(200,146,42,0.2);
}

.btn-danger {
  background: linear-gradient(180deg, #cc2233 0%, #7a0f1c 100%);
  color: #fff;
  border-color: var(--red-bright);
}

.btn-sm { font-size: 16px; padding: 5px 14px; }

/* ══ FORMS ══ */
input, select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  padding: 0.6rem 0.7rem;
  font: inherit;
}

label {
  display: block;
  margin-bottom: 0.35rem;
}

input::placeholder { color: var(--text-muted); }

textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  padding: 0.6rem 0.7rem;
  font: inherit;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
}

.small { font-size: 16px; }
.muted { color: var(--text-muted); }

/* ══ NEWS CARDS ══ */
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-hi);
  padding: 1.2rem;
  box-shadow: inset -2px -2px 0 rgba(0,0,0,0.4), inset 2px 2px 0 rgba(255,255,255,0.02);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.news-card:hover {
  border-color: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: inset -2px -2px 0 rgba(0,0,0,0.4), 0 8px 24px rgba(150,0,20,0.2);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tag {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(200,146,42,0.08);
  border: 1px solid rgba(200,146,42,0.25);
  padding: 1px 8px;
}

/* ══ TABLES ══ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 18px;
}

thead th {
  text-align: left;
  color: var(--gold);
  border-bottom: 2px solid var(--border-hi);
  padding-bottom: 0.5rem;
  font-family: 'VT323', monospace;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

tbody td {
  padding: 0.65rem 0.2rem;
  border-bottom: 1px solid var(--border);
}

tbody tr:hover { background: rgba(92,32,48,0.15); }

.rank-pill {
  color: #0a0608;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  display: inline-block;
  min-width: 1.75rem;
  text-align: center;
  padding: 3px 8px;
  box-shadow: 2px 2px 0 #000;
}

/* ══ TABS ══ */
.metric-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 0.75rem;
}

.metric-tabs button {
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  padding: 4px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  transition: all 0.12s;
}

.metric-tabs button.active {
  color: #0a0608;
  border-color: var(--gold);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  font-weight: bold;
  box-shadow: 0 0 10px rgba(200,146,42,0.3);
}

/* ══ PROFILE ══ */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.kv {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.55rem;
}

.kv-label {
  display: block;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kv-value {
  display: block;
  font-size: 22px;
  color: var(--text-bright);
}

.list-stack {
  display: grid;
  gap: 0.7rem;
}

.split-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.split-title h3 { margin: 0; }

.creator-card, .store-card, .staff-card, .event-card { height: 100%; }

.creator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.creator-handle { color: var(--text-muted); font-size: 17px; }

/* ══ STORE ══ */
.store-price {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  color: var(--gold-light);
  text-shadow: 0 0 8px rgba(200,146,42,0.3);
}

.store-perk {
  font-size: 17px;
  color: var(--text-muted);
}

.store-price-original {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 17px;
  margin-right: 0.4rem;
}

.store-price-sale {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  color: var(--red-bright);
  text-shadow: 0 0 10px rgba(204,34,51,0.4);
}

.store-category {
  display: grid;
  gap: 0.75rem;
}

.admin-form-card { margin-bottom: 1rem; }

/* ══ WORKFLOW ══ */
.workflow-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red-dark);
  padding: 0.9rem 1rem;
  transition: border-color 0.15s, background 0.15s;
}
.workflow-item:hover { background: #220e12; border-left-color: var(--red); box-shadow: 0 0 12px rgba(180,0,20,0.15); }
.step-num { font-family: 'Press Start 2P', monospace; font-size: 0.4rem; color: var(--red-dark); margin-bottom: 0.35rem; }
.step-title { font-size: 21px; color: var(--text-bright); font-weight: bold; }
.step-desc { font-size: 17px; color: var(--text-muted); margin-top: 0.2rem; line-height: 1.3; }

/* ══ METRIC BOXES ══ */
.metric-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 1rem 0.8rem;
  text-align: center;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.4);
  transition: border-color 0.15s;
}
.metric-box:hover { border-color: var(--border-hi); }

/* ══ FOOTER ══ */
.footer {
  margin-top: 3rem;
  background: #060406;
  border-top: 2px solid var(--border);
  padding: 1.8rem 0;
  text-align: center;
  font-size: 17px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.footer a { color: var(--gold); text-decoration: none; }

/* ══ PIXEL DIVIDER ══ */
.pixel-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hi), transparent);
  margin: 2rem 0;
}

/* ══ ANIMATIONS ══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal { animation: fadeUp 0.5s ease both; }

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 2px var(--gold-dark), 0 0 30px rgba(200,146,42,0.25), 0 0 60px rgba(180,0,20,0.15), inset 0 0 30px rgba(0,0,0,0.8); }
  50%      { box-shadow: 0 0 0 2px var(--gold-dark), 0 0 50px rgba(200,146,42,0.4),  0 0 100px rgba(180,0,20,0.3),  inset 0 0 30px rgba(0,0,0,0.8); }
}

/* ══ MODAL ══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 8, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  max-width: 420px;
  width: 90%;
  padding: 2rem;
}

/* ══ RESPONSIVE ══ */
@media (max-width: 960px) {
  .col-8, .col-7, .col-6, .col-5, .col-4 { grid-column: span 12; }
  .auto-grid-4 > *, .auto-grid-3 > *, .auto-grid-2 > * { grid-column: span 12; }
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
  .nav { justify-content: flex-start; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 0.55rem; }
  .profile-grid { grid-template-columns: 1fr; }
  table { min-width: 560px; }
  .table-wrap { overflow-x: auto; }
}
