:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0c1020;
  color: #f4f1e8;
  --panel: #171d31;
  --panel-2: #222a43;
  --line: #36405e;
  --accent: #d6a84b;
  --accent-2: #f2ce78;
  --danger: #ff7c7c;
  --muted: #aeb7ce;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #1c2542 0, #0c1020 42%); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem max(1rem, calc((100vw - 900px) / 2));
  background: rgb(12 16 32 / 90%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-family: Georgia, serif; letter-spacing: .08em; }
h2 { font-size: 1.1rem; grid-column: 1 / -1; }
.eyebrow { margin-bottom: .15rem; color: var(--accent-2); font-size: .68rem; letter-spacing: .2em; }
main { max-width: 900px; margin: 0 auto; padding: 1rem; }
.card { background: linear-gradient(145deg, var(--panel), #11172a); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; box-shadow: 0 12px 28px rgb(0 0 0 / 18%); }
.game-panel { margin-bottom: 1rem; }
.inline, .status-wrap { display: flex; gap: .6rem; align-items: center; }
.status-wrap { flex-wrap: wrap; justify-content: flex-end; }
.status { color: var(--muted); font-size: .85rem; }
.status.online { color: #8ce3a1; }
.status.offline { color: #ffad85; }
.muted { color: var(--muted); margin: .65rem 0 0; font-size: .88rem; }

input, textarea {
  width: 100%;
  margin-top: .35rem;
  padding: .75rem;
  color: inherit;
  background: #0d1324;
  border: 1px solid var(--line);
  border-radius: 10px;
}
textarea { min-height: 92px; resize: vertical; }
.button { border: 0; border-radius: 10px; padding: .75rem 1rem; color: #16110a; background: var(--accent); font-weight: 700; }
.button:hover { background: var(--accent-2); }
.button.secondary { color: #f4f1e8; background: var(--panel-2); border: 1px solid var(--line); }
.button.danger { color: var(--danger); background: transparent; border: 1px solid #653c4d; }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: 1rem; }
.tab { padding: .8rem .4rem; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid var(--line); }
.tab.active { color: var(--accent-2); border-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.form-grid button { align-self: end; }
.cards { display: grid; gap: .75rem; }
.item-head { display: flex; justify-content: space-between; gap: .8rem; align-items: start; }
.item-title { margin: 0; font-size: 1.05rem; }
.meta { color: var(--accent-2); font-size: .82rem; }
.item-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.empty { color: var(--muted); text-align: center; }

@media (max-width: 640px) {
  .topbar { align-items: flex-start; }
  .status-wrap { flex-direction: column; align-items: flex-end; }
  .form-grid { grid-template-columns: 1fr; }
  .inline { align-items: stretch; }
  .inline input { min-width: 0; }
}
