* { box-sizing: border-box; }
:root {
  --bg: #0f1115;
  --panel: #181b22;
  --card: #1f232c;
  --accent: #d2a53b;
  --accent-2: #5fb36a;
  --text: #e9ecf2;
  --muted: #a8b0c0;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 60px rgba(0,0,0,0.45);
  --font-title: 'UnifrakturCook', cursive;
  --font-body: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.6;
}
.page-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(210,165,59,0.15), transparent 35%),
              radial-gradient(circle at 80% 10%, rgba(95,179,106,0.1), transparent 30%),
              linear-gradient(135deg, #0c0e12 0%, #141821 60%, #0c0f14 100%);
  filter: saturate(1.1);
  pointer-events: none;
  z-index: -1;
}
a { color: inherit; text-decoration: none; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  background: rgba(15,17,22,0.8);
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo { display: flex; gap: 12px; align-items: center; }
.logo .crest { font-size: 26px; color: var(--accent); }
.logo-title { font-family: var(--font-title); font-size: 26px; letter-spacing: 0.5px; }
.logo-sub { color: var(--muted); font-size: 12px; }
.nav { display: flex; gap: 14px; font-weight: 500; }
.nav a { padding: 8px 10px; border-radius: 8px; transition: background 0.2s ease; }
.nav a:hover { background: rgba(255,255,255,0.06); }
.auth { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(255,255,255,0.05); border-radius: 10px; border: 1px solid var(--border); }
.user-chip .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.role-admin { background: var(--accent); }
.dot.role-helper { background: var(--accent-2); }
.dot.role-player { background: #4aa3e2; }
.dot.role-guest { background: #888; }
.btn {
  background: linear-gradient(120deg, var(--accent), #f6c768);
  color: #24190c;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(0,0,0,0.35); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.helper-note { font-size: 12px; color: var(--muted); }
.content { padding: 24px; max-width: 1200px; margin: 0 auto; }
.flash { background: rgba(95,179,106,0.15); color: #e9f6eb; border: 1px solid rgba(95,179,106,0.5); padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input, .inline-form select { background: #0f1217; color: var(--text); border: 1px solid var(--border); padding: 8px 10px; border-radius: 8px; min-width: 120px; }
.edit-box { margin-top: 8px; }
.edit-box summary { cursor: pointer; color: var(--accent); }
.edit-form { display: grid; gap: 6px; margin-top: 6px; }
.edit-form input { background: #0f1217; color: var(--text); border: 1px solid var(--border); padding: 8px 10px; border-radius: 8px; }
.list { margin: 0; padding-left: 18px; color: var(--text); }
.list .muted { color: var(--muted); }
.thumb { width: 100%; max-height: 140px; object-fit: cover; border-radius: 10px; margin: 6px 0; border: 1px solid var(--border); }
.profile-open { background: none; border: none; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.lightbox { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 20; }
.lightbox[aria-hidden="false"] { display: flex; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.lightbox-content { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px; max-width: 640px; width: 90%; box-shadow: var(--shadow); z-index: 1; }
.lightbox-close { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }
.lightbox-content img { width: 100%; height: auto; border-radius: 10px; margin-bottom: 10px; }
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; margin: 20px 0 32px; }
.hero-text h1 { font-family: var(--font-title); font-size: 48px; margin: 0 0 12px; }
.hero-text p { color: var(--muted); max-width: 620px; }
.hero-actions { display: flex; gap: 12px; margin-top: 14px; }
.hero-card { background: var(--panel); border: 1px solid var(--border); padding: 16px; border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.label { color: var(--muted); font-size: 13px; }
.value { font-size: 16px; font-weight: 600; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.pill { padding: 6px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border); }
.pill.role-admin { background: rgba(210,165,59,0.18); color: var(--accent); }
.pill.role-helper { background: rgba(95,179,106,0.18); color: var(--accent-2); }
.pill.role-player { background: rgba(74,163,226,0.18); color: #4aa3e2; }
.pill.role-guest { background: rgba(136,136,136,0.18); color: #b7b7b7; }
.panel { margin: 28px 0; padding: 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.panel h2 { margin: 0; font-family: var(--font-title); letter-spacing: 0.5px; }
.chip { border: 1px dashed var(--accent); color: var(--accent); background: rgba(210,165,59,0.08); padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); }
.tag { display: inline-block; background: rgba(255,255,255,0.06); padding: 4px 8px; border-radius: 8px; font-size: 12px; border: 1px solid var(--border); margin-bottom: 6px; }
.timeline { display: grid; gap: 12px; position: relative; }
.timeline-item { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.timeline-item .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(210,165,59,0.15); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.gallery-item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; min-height: 120px; display: flex; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.upload { margin-top: 12px; display: grid; gap: 8px; }
.upload input { background: #0f1217; color: var(--text); border: 1px solid var(--border); padding: 10px; border-radius: 10px; }
.footer { padding: 20px 24px 30px; border-top: 1px solid var(--border); color: var(--muted); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer a { color: var(--text); font-weight: 600; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .nav { flex-wrap: wrap; }
}
