:root {
  --black: #05040a;
  --panel: rgba(14, 10, 28, 0.78);
  --panel-solid: #0e0a1c;
  --panel-2: rgba(28, 18, 54, 0.7);
  --line: rgba(168, 85, 247, 0.28);
  --line-soft: rgba(255, 255, 255, 0.08);
  --purple: #a855f7;
  --purple-deep: #6d28d9;
  --blue: #22d3ee;
  --blue-2: #38bdf8;
  --text: #ece9ff;
  --muted: #a39dc4;
  --danger: #fb7185;
  --ok: #34d399;
  --warn: #fbbf24;
  --radius: 16px;
  --glow: 0 0 0 1px rgba(168, 85, 247, 0.35), 0 10px 40px -10px rgba(34, 211, 238, 0.25);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Orbitron', 'Inter', system-ui, sans-serif;
  --pz-bg: url('/.netlify/images?url=/assets/playzone-vr.png&w=1920&q=75') center / cover no-repeat, #07060d;
  --pz-overlay: 0.55;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font-family: var(--font); color: var(--text); background: var(--black);
  line-height: 1.55; font-size: 16px; position: relative;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; background: var(--pz-bg);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at top, rgba(109, 40, 217, 0.25), transparent 60%),
    linear-gradient(180deg, rgba(5, 4, 10, var(--pz-overlay)), rgba(5, 4, 10, calc(var(--pz-overlay) + 0.2)));
}
a { color: var(--blue); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); letter-spacing: 0.02em; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.7rem, 5vw, 3rem); }
h2 { font-size: clamp(1.25rem, 3.4vw, 1.75rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.hidden { display: none !important; }
.neon { color: var(--blue); text-shadow: 0 0 18px rgba(34, 211, 238, 0.6); }
.grad-text { background: linear-gradient(90deg, var(--purple), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- logo ---------- */
.logo {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0;
}
.logo img {
  height: 40px; aspect-ratio: 5.2 / 1; width: auto; object-fit: cover; object-position: 50% 49%;
  border-radius: 10px; box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.5), 0 0 18px rgba(168, 85, 247, 0.45);
}
.logo .tag { font-family: var(--display); font-size: 0.7rem; color: var(--blue); letter-spacing: 0.18em; text-transform: uppercase; }

/* ---------- public header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 4, 10, 0.72); border-bottom: 1px solid var(--line);
}
.site-header .inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; gap: 12px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  color: var(--muted); text-decoration: none; padding: 9px 13px; border-radius: 10px; font-weight: 600; font-size: 0.93rem; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: rgba(168, 85, 247, 0.14); }
.nav a.active { color: var(--text); background: linear-gradient(90deg, rgba(168, 85, 247, 0.3), rgba(34, 211, 238, 0.18)); box-shadow: inset 0 0 0 1px var(--line); }
.nav a.login { color: var(--black); background: linear-gradient(90deg, var(--purple), var(--blue)); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 11px; font-size: 1.2rem; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 10px 14px 16px;
    background: rgba(8, 6, 18, 0.97); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; font-size: 1rem; }
}

main.page { max-width: 1180px; margin: 0 auto; padding: 28px 18px 60px; }
.site-footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 26px 18px 34px; border-top: 1px solid var(--line-soft); background: rgba(5, 4, 10, 0.6); }

/* ---------- panels, cards ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--glow);
}
.panel + .panel { margin-top: 18px; }
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 14px; padding: 18px; }
.card h3 { color: var(--text); }
.card .icon { font-size: 1.6rem; margin-bottom: 6px; }
a.card { display: block; text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
a.card:hover { transform: translateY(-2px); border-color: var(--blue); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: clamp(30px, 8vw, 90px) 10px clamp(24px, 5vw, 50px); }
.hero-logo { width: min(640px, 92%); aspect-ratio: 5.2 / 1; object-fit: cover; object-position: 50% 49%; border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.6), 0 0 60px rgba(168, 85, 247, 0.5); margin-bottom: 22px; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 22px; font-size: 1.07rem; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); cursor: pointer;
  background: rgba(168, 85, 247, 0.14); color: var(--text); padding: 11px 18px; border-radius: 12px; font-weight: 700; font-size: 0.95rem;
  text-decoration: none; font-family: inherit; min-height: 44px; transition: filter .15s, transform .1s;
}
.btn:hover { filter: brightness(1.2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(90deg, var(--purple-deep), var(--purple) 45%, var(--blue)); border-color: transparent; color: #fff; box-shadow: 0 6px 24px -6px rgba(168, 85, 247, 0.7); }
.btn.blue { background: rgba(34, 211, 238, 0.14); border-color: rgba(34, 211, 238, 0.5); color: var(--blue); }
.btn.ok { background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.55); color: var(--ok); }
.btn.danger { background: rgba(251, 113, 133, 0.12); border-color: rgba(251, 113, 133, 0.55); color: var(--danger); }
.btn.warn { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.5); color: var(--warn); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 12px; min-height: 36px; font-size: 0.85rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.93rem; }
.field { margin-bottom: 16px; }
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; background: rgba(5, 4, 12, 0.75); color: var(--text); border: 1px solid rgba(168, 85, 247, 0.35); border-radius: 11px;
  padding: 12px 13px; font: inherit; font-size: 16px; min-height: 46px;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2); }
input[type=file] { width: 100%; color: var(--muted); padding: 10px; border: 1px dashed rgba(34, 211, 238, 0.5); border-radius: 11px; background: rgba(34, 211, 238, 0.05); font-size: 0.95rem; }
input[type=color] { width: 60px; height: 46px; border: 1px solid var(--line); border-radius: 10px; background: none; padding: 3px; }
input[type=range] { width: 100%; accent-color: var(--purple); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--purple); flex-shrink: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.req { color: var(--blue); }

.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; border: 1px solid; font-size: 0.94rem; }
.alert.error { background: rgba(251, 113, 133, 0.1); border-color: rgba(251, 113, 133, 0.5); color: #fecdd3; }
.alert.success { background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.5); color: #bbf7d0; }
.alert.info { background: rgba(34, 211, 238, 0.08); border-color: rgba(34, 211, 238, 0.45); color: #cffafe; }

.preview-img { margin-top: 10px; max-height: 220px; border-radius: 10px; border: 1px solid var(--line); display: block; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; background: rgba(5, 4, 12, 0.6); border: 1px solid var(--line); padding: 6px; border-radius: 14px; margin-bottom: 18px; overflow-x: auto; }
.tab { flex: 1; background: none; border: none; color: var(--muted); padding: 12px 14px; font-weight: 800; border-radius: 10px; cursor: pointer;
  font-family: var(--display); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; min-height: 46px; }
.tab.active { color: #fff; background: linear-gradient(90deg, rgba(109, 40, 217, 0.85), rgba(14, 116, 144, 0.85)); box-shadow: 0 0 20px rgba(168, 85, 247, 0.35); }

/* ---------- success ticket ---------- */
.ticket { border: 1px solid rgba(34, 211, 238, 0.6); border-radius: 14px; padding: 18px; background: rgba(34, 211, 238, 0.06); margin: 14px 0; }
.ticket .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px dashed var(--line-soft); }
.ticket .row:last-child { border-bottom: none; }
.code { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 1.15rem; color: var(--blue); letter-spacing: 0.06em; word-break: break-all; }

/* ---------- status badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid; white-space: nowrap; }
.badge.new { color: var(--blue); border-color: rgba(34, 211, 238, 0.6); background: rgba(34, 211, 238, 0.1); }
.badge.in_review, .badge.under_review { color: #c4b5fd; border-color: rgba(168, 85, 247, 0.6); background: rgba(168, 85, 247, 0.12); }
.badge.awaiting_reporter, .badge.info_requested { color: var(--warn); border-color: rgba(251, 191, 36, 0.6); background: rgba(251, 191, 36, 0.1); }
.badge.resolved, .badge.approved { color: var(--ok); border-color: rgba(52, 211, 153, 0.6); background: rgba(52, 211, 153, 0.1); }
.badge.dismissed, .badge.rejected { color: var(--danger); border-color: rgba(251, 113, 133, 0.6); background: rgba(251, 113, 133, 0.1); }
.badge.owner { color: #f0abfc; border-color: rgba(240, 171, 252, 0.6); background: rgba(240, 171, 252, 0.1); }
.badge.moderator { color: var(--muted); border-color: var(--line); }

/* ---------- conversation ---------- */
.thread { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 14px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; border: 1px solid var(--line-soft); white-space: pre-wrap; word-wrap: break-word; }
.msg .meta { display: block; font-size: 0.74rem; color: var(--muted); margin-bottom: 3px; white-space: normal; }
.msg.staff { align-self: flex-start; background: rgba(109, 40, 217, 0.22); border-color: rgba(168, 85, 247, 0.4); }
.msg.player { align-self: flex-end; background: rgba(14, 116, 144, 0.22); border-color: rgba(34, 211, 238, 0.4); }
.msg.note { align-self: stretch; max-width: 100%; background: rgba(251, 191, 36, 0.07); border-color: rgba(251, 191, 36, 0.35); }

/* ---------- rules ---------- */
.rules-list { counter-reset: r; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.rules-list li { counter-increment: r; position: relative; padding: 16px 16px 16px 62px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 14px; }
.rules-list li::before { content: counter(r); position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; background: linear-gradient(135deg, var(--purple-deep), var(--blue)); color: #fff; }
.rules-list strong { display: block; margin-bottom: 3px; }

.announcement { border-left: 3px solid var(--blue); padding: 10px 14px; background: rgba(5, 4, 12, 0.5); border-radius: 0 12px 12px 0; margin-bottom: 12px; }
.announcement p { white-space: pre-wrap; margin: 6px 0 0; }

.auth-wrap { max-width: 460px; margin: clamp(10px, 6vh, 60px) auto; }
.spinner { width: 22px; height: 22px; border: 3px solid rgba(255, 255, 255, 0.2); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
