@import url("cookie-consent.css");

:root {
  --bg: #0a0710;
  --bg-2: #120b14;
  --card: rgba(20, 14, 24, 0.92);
  --card-2: rgba(28, 18, 34, 0.95);
  --line: rgba(255, 180, 220, 0.14);
  --text: #f6eef4;
  --muted: #b69aa8;
  --pink: #ff2b9a;
  --pink-2: #ff8ab0;
  --cyan: #19d0c8;
  --gold: #e8c547;
  --ok: #3ddc97;
  --err: #ff6b81;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Segoe UI", system-ui, -apple-system, sans-serif;
  --header-h: 72px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pink-2); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; margin: 0 0 0.6rem; }
p { margin: 0 0 1rem; color: var(--muted); }

.bg-skyline,
.bg-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.bg-skyline {
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(255, 43, 154, 0.28), transparent 60%),
    radial-gradient(700px 420px at 90% 10%, rgba(25, 208, 200, 0.16), transparent 55%),
    linear-gradient(180deg, #140b16 0%, #0a0710 55%, #07050b 100%);
}
.bg-grain {
  opacity: 0.08;
  background-image: url("/assets/img/bg.png");
  background-size: cover;
  background-position: center top;
  mix-blend-mode: soft-light;
}

.site-shell { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: min(100% - 2rem, var(--wrap)); margin: 0 auto; }
.main { flex: 1; padding: 1.5rem 0 3rem; }
.content-page .main,
.main.content-page { padding-top: 1.25rem; }

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 7, 16, 0.78);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
}
.brand img { border-radius: 10px; }
.brand strong { display: block; font-size: 0.95rem; }
.brand small { color: var(--muted); font-size: 0.75rem; }
.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.85rem;
}
.topnav a {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.35rem 0.2rem;
}
.topnav a:hover,
.topnav a.is-active { color: var(--text); }
.topnav .btn { margin-left: 0.25rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 650;
  font-size: 0.92rem;
  cursor: pointer;
  transition: 0.15s ease;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--pink), #ff5fb4);
  color: #fff !important;
  box-shadow: 0 10px 28px rgba(255, 43, 154, 0.28);
}
.btn-primary:hover { filter: brightness(1.08); color: #fff !important; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--text) !important;
}
.btn-ghost:hover { border-color: rgba(255, 180, 220, 0.35); background: rgba(255, 255, 255, 0.07); }

/* Hero */
.hero {
  display: grid;
  gap: 1.5rem;
  padding: 2.2rem 0 1rem;
}
.hero-copy { max-width: 720px; }
.hero-brand { margin-bottom: 0.75rem; }
.hero-brand img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 12px 30px rgba(255, 43, 154, 0.35));
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.hero p { font-size: 1.05rem; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }

/* Sections */
.section { margin: 2.5rem 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.section-head h2 { font-size: 1.55rem; }
.section-head p { margin: 0; }
.brand-mark {
  background: linear-gradient(90deg, var(--pink-2), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.home-pulse {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}
.stat strong {
  display: block;
  font-size: 1.45rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.stat span { color: var(--muted); font-size: 0.88rem; }

/* News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.news-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
a.news-card:hover { transform: translateY(-2px); border-color: rgba(255, 43, 154, 0.35); }
.news-card-media {
  min-height: 140px;
  background:
    linear-gradient(135deg, rgba(255, 43, 154, 0.25), rgba(25, 208, 200, 0.12)),
    #1a101c;
}
.news-card-body { padding: 1rem 1.05rem 1.15rem; }
.news-card-body time { color: var(--muted); font-size: 0.8rem; }
.news-card-body h3 { margin: 0.35rem 0 0.45rem; font-size: 1.05rem; color: var(--text); }
.news-card-body p { margin: 0 0 0.7rem; font-size: 0.92rem; }
.news-more { color: var(--pink-2); font-size: 0.88rem; font-weight: 600; }
.content-empty {
  padding: 1.25rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}
.launcher-banner {
  display: grid;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(255, 43, 154, 0.18), rgba(25, 208, 200, 0.08)),
    var(--card-2);
}

/* Forms / cabinet */
.alert {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  border: 1px solid var(--line);
}
.alert-ok { background: rgba(61, 220, 151, 0.12); color: #b9ffdc; }
.alert-error { background: rgba(255, 107, 129, 0.12); color: #ffc0c8; }
.form-card,
.card,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
label { display: grid; gap: 0.35rem; margin-bottom: 0.9rem; color: var(--muted); font-size: 0.9rem; }
input, select, textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.7rem 0.85rem;
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(255, 43, 154, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 43, 154, 0.15);
}

/* Map */
.city-map {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.city-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.city-map-zoom, .city-map-tools { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.city-map-btn {
  min-width: 36px;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
}
.city-map-btn.is-active,
.city-map-btn:hover { border-color: rgba(255,43,154,0.45); }
.city-map-btn--danger { color: #ffb4be; }
.city-map-hint { margin: 0; font-size: 0.82rem; color: var(--muted); }
.city-map-frame { position: relative; height: min(70vh, 620px); background: #120b14; }
.city-map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.city-map-viewport.is-dragging { cursor: grabbing; }
.city-map-art {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center center;
  user-select: none;
  max-width: none;
  width: 1200px;
  height: auto;
  opacity: 0.95;
}
.city-map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.city-map-markers { position: absolute; inset: 0; pointer-events: none; }
.city-map-marker {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  pointer-events: auto;
  cursor: pointer;
}
.city-map-marker img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.city-map-popup {
  position: absolute;
  z-index: 5;
  min-width: 180px;
  max-width: 260px;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(14,10,16,0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--text);
}
.city-map-popup[hidden] { display: none !important; }

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: rgba(8, 5, 12, 0.85);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 1.5rem;
  padding: 2rem 0 1.25rem;
}
.footer-brand-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.footer-tagline { font-size: 0.9rem; max-width: 320px; }
.footer-social { display: flex; gap: 0.55rem; margin-top: 0.9rem; }
.footer-social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,0.03);
}
.footer-col h4 { margin-bottom: 0.7rem; font-size: 0.95rem; }
.footer-col a { display: block; color: var(--muted); margin: 0.35rem 0; font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0 1.2rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }

/* ===== Cabinet / UCP ===== */
.page-cabinet .main.content-page,
.main.content-page { max-width: var(--wrap); }

.cabinet-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 1.25rem;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(255, 43, 154, 0.16), rgba(25, 208, 200, 0.06)),
    var(--card);
  box-shadow: var(--shadow);
}
.cabinet-head h1 {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.02em;
}
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--pink-2);
  font-weight: 700;
}
.cabinet-head .muted { margin: 0; }

.panel + .panel,
.cabinet-account + .panel,
.panel { margin-bottom: 1.15rem; }
.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.panel h3 { margin: 1rem 0 0.6rem; font-size: 1rem; color: var(--pink-2); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin: 0;
}
.detail-grid > div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 180, 220, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  min-width: 0;
}
.detail-grid dt {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.detail-grid dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  word-break: break-word;
}
.detail-grid code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--cyan);
}

.cabinet-admin-perms { margin-top: 1.1rem; }
.perm-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.perm-tags li {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 43, 154, 0.35);
  background: rgba(255, 43, 154, 0.12);
  color: #ffd0e6;
  font-size: 0.82rem;
}

.char-grid,
.char-grid-wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.char-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}
.char-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.char-card h3 { margin: 0; font-size: 1.05rem; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  white-space: nowrap;
}
.char-card.status-1 .badge { border-color: rgba(61, 220, 151, 0.45); color: #b9ffdc; background: rgba(61, 220, 151, 0.12); }
.char-card.status-2 .badge { border-color: rgba(232, 197, 71, 0.45); color: #ffe9a8; background: rgba(232, 197, 71, 0.12); }
.char-card.status-3 .badge { border-color: rgba(255, 107, 129, 0.45); color: #ffc0c8; background: rgba(255, 107, 129, 0.12); }
.char-card.status-0 .badge { border-color: rgba(25, 208, 200, 0.4); color: #9ff3ef; background: rgba(25, 208, 200, 0.1); }

.char-meta,
.char-meta-wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.75rem;
  margin: 0;
}
.char-meta > div,
.char-meta-wide > div {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
}
.char-meta > div.full,
.char-meta-wide > div.full { grid-column: 1 / -1; }
.char-meta dt,
.char-meta-wide dt {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.char-meta dd,
.char-meta-wide dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
  color: var(--text);
  font-size: 0.92rem;
}

.char-history {
  margin-top: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
}
.char-history summary {
  cursor: pointer;
  color: var(--pink-2);
  font-weight: 600;
}
.char-history p { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.9rem; }

.reject-reason-box {
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 107, 129, 0.35);
  background: rgba(255, 107, 129, 0.08);
}
.reject-reason { margin: 0; color: #ffc0c8; }
.reject-meta { margin: 0.4rem 0 0; font-size: 0.85rem; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1rem;
}
.form-grid .full,
.form-grid label.full,
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { margin-bottom: 0.55rem; }
.counter {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
}

.muted-box {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--line);
}
.request-list { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.request-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
}
.request-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}
.request-form { margin-top: 0.5rem; }
.empty { padding: 0.5rem 0; }
code {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
}

@media (max-width: 960px) {
  .home-pulse,
  .news-grid,
  .feature-grid,
  .footer-top,
  .detail-grid,
  .char-grid,
  .char-grid-wide { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .topbar-inner { flex-direction: column; align-items: flex-start; padding: 0.75rem 0; }
  .topnav { justify-content: flex-start; }
  .home-pulse,
  .news-grid,
  .feature-grid,
  .footer-top,
  .detail-grid,
  .char-grid,
  .char-grid-wide,
  .form-grid,
  .char-meta,
  .char-meta-wide { grid-template-columns: 1fr; }
  .cabinet-head { flex-direction: column; align-items: flex-start; }
  .city-map-frame { height: 420px; }
}
