/* ===================================================================
   Statewide Roleplay — Public Website
   Galaxy-blue dark theme, glassmorphism, animated starfield background.
=================================================================== */

:root {
  --bg-deep: #04060d;
  --bg-mid: #0a0f1f;
  --bg-panel: #0d1428;
  --blue: #4f8cff;
  --blue-soft: #7fb0ff;
  --violet: #7c6cff;
  --gold: #c9a227;
  --red: #d33b3b;
  --text: #eaf0ff;
  --text-dim: #a7b3d6;
  --text-faint: #6e7aa0;
  --glass-bg: rgba(18, 26, 54, 0.45);
  --glass-bg-strong: rgba(14, 20, 42, 0.72);
  --glass-border: rgba(140, 170, 255, 0.16);
  --glass-border-strong: rgba(140, 170, 255, 0.3);
  --radius: 18px;
  --shadow-glow: 0 8px 40px rgba(60, 100, 255, 0.15);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
}

a { color: var(--blue-soft); text-decoration: none; }
a:hover { color: var(--blue); }
img { max-width: 100%; }

/* ---------------- Animated galaxy background ---------------- */

#galaxy-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(79, 140, 255, 0.22), transparent 60%),
    radial-gradient(ellipse 70% 50% at 100% 10%, rgba(124, 108, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 60% at 50% 120%, rgba(201, 162, 39, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 45%, var(--bg-deep) 100%);
}

#galaxy-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  display: block;
}

.nebula-blob {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}
.nebula-blob.b1 {
  width: 480px; height: 480px; top: -120px; left: -100px;
  background: radial-gradient(circle, var(--blue) 0%, transparent 70%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.nebula-blob.b2 {
  width: 560px; height: 560px; top: 30%; right: -180px;
  background: radial-gradient(circle, var(--violet) 0%, transparent 70%);
  animation: drift2 32s ease-in-out infinite alternate;
}
.nebula-blob.b3 {
  width: 420px; height: 420px; bottom: -160px; left: 20%;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  opacity: 0.18;
  animation: drift3 40s ease-in-out infinite alternate;
}
@keyframes drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 80px) scale(1.15); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1); } to { transform: translate(-80px, -40px) scale(1.1); } }
@keyframes drift3 { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, -60px) scale(1.2); } }

@media (prefers-reduced-motion: reduce) {
  .nebula-blob { animation: none; }
}

/* ---------------- Layout ---------------- */

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.site-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  background: var(--glass-bg-strong);
  border-bottom: 1px solid var(--glass-border);
}
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.site-nav .brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.1rem; letter-spacing: 0.03em; }
.site-nav .brand img { height: 40px; }
.site-nav .brand .r { color: var(--red); }
.site-nav nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav nav a {
  color: var(--text-dim); padding: 9px 14px; border-radius: 10px; font-size: 0.92rem; font-weight: 500;
  transition: all 0.15s ease;
}
.site-nav nav a:hover, .site-nav nav a.active { color: var(--text); background: rgba(140, 170, 255, 0.1); }
.site-nav .cta {
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: #fff !important; padding: 9px 18px; border-radius: 10px; font-weight: 600;
  box-shadow: 0 4px 18px rgba(79, 140, 255, 0.35);
}

/* ---------------- Nav dropdown (Community menu, etc.) ---------------- */

.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none; cursor: pointer; color: var(--text-dim); padding: 9px 14px; border-radius: 10px;
  font-size: 0.92rem; font-weight: 500; transition: all 0.15s ease; display: flex; align-items: center; gap: 6px;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: '▾'; font-size: 0.7em; opacity: 0.7; }
.nav-dropdown summary:hover, .nav-dropdown summary.active { color: var(--text); background: rgba(140, 170, 255, 0.1); }
.nav-dropdown .dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 190px; padding: 8px;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border-strong); border-radius: 14px;
  backdrop-filter: blur(16px); box-shadow: 0 12px 34px rgba(0,0,0,0.4); z-index: 60;
  display: flex; flex-direction: column; gap: 2px;
}
.nav-dropdown .dropdown-menu a { padding: 9px 12px; border-radius: 8px; white-space: nowrap; }
/* Close other open dropdowns when one opens, and click-outside-to-close via the native <details> toggle */
.nav-dropdown[open] summary::after { content: '▴'; }
@media (max-width: 900px) {
  .nav-dropdown .dropdown-menu { position: static; margin-top: 4px; box-shadow: none; }
}
@media (max-width: 900px) {
  .site-nav .wrap { flex-direction: column; height: auto; padding: 14px 20px; gap: 10px; }
  .site-nav nav { justify-content: center; }
}

/* ---------------- Glass components ---------------- */

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-glow);
  padding: 28px;
}
.glass-card.tight { padding: 18px; }
.glass-card:hover { border-color: var(--glass-border-strong); }

.section { padding: 72px 0; }
.section.tight { padding: 40px 0; }
.section-title { font-size: 2rem; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.01em; }
.section-sub { color: var(--text-dim); margin: 0 0 40px; max-width: 640px; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem;
  font-weight: 700; color: var(--blue-soft); background: rgba(79, 140, 255, 0.12);
  padding: 5px 12px; border-radius: 100px; margin-bottom: 14px; border: 1px solid rgba(79,140,255,0.25);
}

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 12px;
  font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer; transition: all 0.15s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff; box-shadow: 0 6px 24px rgba(79,140,255,0.35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(79,140,255,0.45); color:#fff; }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--glass-border); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #e8c765); color: #1a1400; }
.btn.small { padding: 8px 16px; font-size: 0.85rem; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge.open { background: rgba(60, 200, 130, 0.15); color: #5fe3a4; border: 1px solid rgba(60,200,130,0.3); }
.badge.closed { background: rgba(210, 60, 60, 0.15); color: #ff8080; border: 1px solid rgba(210,60,60,0.3); }

/* ---------------- Hero ---------------- */

.hero { position: relative; padding: 90px 0 70px; text-align: center; }
.hero-banner {
  width: 100%; max-width: 980px; margin: 48px auto 36px; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--glass-border); box-shadow: 0 20px 70px rgba(0,0,0,0.5);
}
.hero-banner img { display: block; width: 100%; }
.hero h1 { font-size: 3rem; font-weight: 900; letter-spacing: -0.02em; margin: 0 0 16px; line-height: 1.1; }
.hero h1 .r { color: var(--red); }
.hero p.lead { color: var(--text-dim); font-size: 1.15rem; max-width: 620px; margin: 0 auto 32px; }
.hero .ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-top: 56px; }
.stat-row .stat { text-align: center; }
.stat-row .stat .num { font-size: 2rem; font-weight: 800; background: linear-gradient(135deg, var(--blue-soft), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-row .stat .lbl { color: var(--text-faint); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------------- Grids ---------------- */

.grid { display: grid; gap: 22px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.dept-card { display: flex; flex-direction: column; gap: 14px; transition: transform 0.15s ease; }
.dept-card:hover { transform: translateY(-4px); }
.dept-card .icon-badge {
  width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
}
.dept-card h3 { margin: 0; font-size: 1.15rem; }
.dept-card p { color: var(--text-dim); font-size: 0.92rem; margin: 0; flex: 1; }
.dept-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }

.feature-card { text-align: left; }
.feature-card .emoji { font-size: 1.8rem; margin-bottom: 12px; display: block; }
.feature-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.feature-card p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }

/* ---------------- Department detail ---------------- */

.dept-hero {
  border-radius: 22px; overflow: hidden; position: relative; margin-bottom: 32px;
  border: 1px solid var(--glass-border); min-height: 220px; display: flex; align-items: flex-end;
  background-size: cover; background-position: center;
}
.dept-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4,6,13,0.92), rgba(4,6,13,0.35)); }
.dept-hero .content { position: relative; padding: 32px; display: flex; align-items: center; gap: 20px; width: 100%; }
.dept-hero .badge-icon { width: 72px; height: 72px; border-radius: 16px; background: rgba(10,15,31,0.7); border: 2px solid rgba(255,255,255,0.2); display:flex; align-items:center; justify-content:center; font-size:1.8rem; font-weight:800; flex-shrink:0; }
.dept-hero h1 { margin: 0 0 6px; font-size: 2rem; }
.dept-hero .key { color: var(--text-dim); font-weight: 600; letter-spacing: 0.05em; }

.roster-group { margin-bottom: 28px; }
.roster-group h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); margin: 0 0 14px; }
.roster-member { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,0.03); margin-bottom: 8px; }
.roster-member img { width: 36px; height: 36px; border-radius: 50%; }
.roster-member .name { font-weight: 600; font-size: 0.92rem; }
.roster-member .tag { color: var(--text-faint); font-size: 0.78rem; }

/* ---------------- Rules ---------------- */

.rule-item { padding: 18px 22px; margin-bottom: 12px; }
.rule-item h4 { margin: 0 0 6px; color: var(--blue-soft); }
.rule-item p { margin: 0; color: var(--text-dim); font-size: 0.93rem; }

/* ---------------- News ---------------- */

.news-item { margin-bottom: 20px; }
.news-item .version { font-size: 1.3rem; font-weight: 800; margin: 0; }
.news-item .date { color: var(--text-faint); font-size: 0.82rem; margin-bottom: 14px; }
.news-item ul { margin: 0; padding-left: 20px; }
.news-item li { margin-bottom: 6px; color: var(--text-dim); font-size: 0.92rem; }
.tag-added { color: #5fe3a4; } .tag-changed { color: #7fb0ff; } .tag-fixed { color: #ffc36b; } .tag-removed { color: #ff8080; }

/* ---------------- Gallery ---------------- */

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gallery-grid figure { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--glass-border); position: relative; }
.gallery-grid img { width: 100%; height: 200px; object-fit: cover; display: block; }
.gallery-grid figcaption { position: absolute; bottom: 0; left: 0; right: 0; padding: 10px 14px; background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent); font-size: 0.82rem; }

/* ---------------- Clickable / zoomable images ---------------- */

img.zoomable { cursor: zoom-in; transition: filter 0.15s ease, transform 0.15s ease; }
img.zoomable:hover { filter: brightness(1.08); }

.lightbox-overlay {
  position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center;
  background: rgba(4, 6, 13, 0.92); backdrop-filter: blur(6px); padding: 40px; cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay .lightbox-img {
  max-width: 100%; max-height: 100%; border-radius: 14px; box-shadow: 0 30px 90px rgba(0,0,0,0.6);
  border: 1px solid var(--glass-border); cursor: default;
}
.lightbox-close {
  position: absolute; top: 20px; right: 28px; background: rgba(255,255,255,0.08); border: 1px solid var(--glass-border);
  color: var(--text); width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.16); }

/* ---------------- Team ---------------- */

.team-member { text-align: center; }
.team-member img { width: 72px; height: 72px; border-radius: 50%; margin-bottom: 10px; border: 2px solid var(--glass-border); }
.team-member .name { font-weight: 600; font-size: 0.92rem; }

/* ---------------- Connect ---------------- */

.connect-box { text-align: center; padding: 48px; }
.connect-address { font-family: 'Consolas', monospace; font-size: 1.4rem; background: rgba(255,255,255,0.06); padding: 14px 24px; border-radius: 12px; display: inline-block; margin: 16px 0; letter-spacing: 0.03em; }
.step-list { counter-reset: step; text-align: left; max-width: 560px; margin: 32px auto 0; }
.step-list .step { display: flex; gap: 16px; margin-bottom: 20px; }
.step-list .step .num { counter-increment: step; content: counter(step); flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--violet)); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.step-list .step .num::before { content: counter(step); }

/* ---------------- Forms (public-facing: report a player, etc.) ---------------- */

.site-form label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-dim); margin: 16px 0 6px; }
.site-form label:first-child { margin-top: 0; }
.site-form input[type="text"], .site-form input[type="url"], .site-form input[type="email"],
.site-form select, .site-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--glass-border);
  background: rgba(6, 10, 22, 0.6); color: var(--text); font-family: inherit; font-size: 0.95rem;
}
.site-form input:focus, .site-form select:focus, .site-form textarea:focus { outline: none; border-color: var(--blue-soft); }
.site-form textarea { resize: vertical; min-height: 120px; }
.site-form .hint { color: var(--text-faint); font-size: 0.8rem; margin-top: 4px; }
.site-form .form-actions { margin-top: 24px; }
.form-success { padding: 20px 24px; border-radius: 14px; background: rgba(60, 200, 130, 0.1); border: 1px solid rgba(60,200,130,0.3); color: #5fe3a4; }
.form-error { padding: 14px 18px; border-radius: 12px; background: rgba(210, 60, 60, 0.12); border: 1px solid rgba(210,60,60,0.3); color: #ff8080; margin-bottom: 20px; font-size: 0.9rem; }

/* ---------------- Dispatch / CAD board ---------------- */

.call-card { display: flex; flex-direction: column; gap: 10px; }
.call-card .call-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.call-card .call-num { font-family: 'Consolas', monospace; color: var(--text-faint); font-size: 0.8rem; }
.priority-pill { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 10px; border-radius: 20px; }
.priority-low { background: rgba(90,150,255,0.15); color: #7fb0ff; border: 1px solid rgba(90,150,255,0.3); }
.priority-medium { background: rgba(230,180,50,0.15); color: #ffc36b; border: 1px solid rgba(230,180,50,0.3); }
.priority-high { background: rgba(230,120,40,0.15); color: #ff9a4d; border: 1px solid rgba(230,120,40,0.3); }
.priority-emergency { background: rgba(210,60,60,0.18); color: #ff6b6b; border: 1px solid rgba(210,60,60,0.4); animation: pulseCall 1.6s ease-in-out infinite; }
@keyframes pulseCall { 0%, 100% { box-shadow: 0 0 0 rgba(210,60,60,0); } 50% { box-shadow: 0 0 14px rgba(210,60,60,0.45); } }
.status-pill { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: 20px; background: rgba(255,255,255,0.06); color: var(--text-dim); }
.status-pill.status-resolved, .status-pill.status-cleared { color: #5fe3a4; }
.status-pill.status-cancelled { color: var(--text-faint); }
.call-card .loc { font-weight: 700; }
.call-card .desc { color: var(--text-dim); font-size: 0.9rem; margin: 0; }
.call-card .meta { color: var(--text-faint); font-size: 0.78rem; }

/* ---------------- BOLO / Wanted board ---------------- */

.wanted-card { position: relative; overflow: hidden; }
.wanted-card.cleared { opacity: 0.55; }
.wanted-card .wanted-photo { width: 100%; height: 180px; object-fit: cover; border-radius: 12px; margin-bottom: 14px; border: 1px solid var(--glass-border); }
.wanted-card .wanted-stamp {
  position: absolute; top: 18px; right: -34px; transform: rotate(38deg); background: rgba(60,200,130,0.85);
  color: #04150d; font-weight: 900; font-size: 0.75rem; letter-spacing: 0.08em; padding: 4px 46px; text-transform: uppercase;
}
.wanted-card h3 { margin: 0 0 4px; }
.wanted-card .charges { color: var(--red); font-weight: 700; font-size: 0.88rem; margin: 0 0 8px; }
.wanted-card .vehicle { color: var(--text-dim); font-size: 0.85rem; }
.wanted-card .issued { color: var(--text-faint); font-size: 0.76rem; margin-top: 10px; }

/* ---------------- Profile pages ---------------- */

.profile-hero { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.profile-hero img.avatar-lg { width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--glass-border-strong); }
.profile-hero h1 { margin: 0 0 4px; }
.profile-hero .sub { color: var(--text-dim); margin: 0; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-top: 32px; }
.profile-stats .stat { text-align: center; padding: 22px 12px; }
.profile-stats .stat .num { font-size: 1.6rem; font-weight: 800; color: var(--blue-soft); }
.profile-stats .stat .lbl { color: var(--text-faint); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 4px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 16px; }
.badge-chip { text-align: center; padding: 18px 10px; }
.badge-chip .icon { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.badge-chip .label { font-size: 0.78rem; color: var(--text-dim); font-weight: 600; }
.badge-chip .desc { font-size: 0.7rem; color: var(--text-faint); margin-top: 4px; }
.member-search { display: flex; gap: 10px; margin-bottom: 32px; }
.member-search select { flex: 1; }

/* ---------------- Spotlight (Roleplayer of the Month) ---------------- */

.spotlight-hero { text-align: center; padding: 56px 40px; position: relative; }
.spotlight-hero img.crown-avatar { width: 140px; height: 140px; border-radius: 50%; border: 4px solid var(--gold); margin-bottom: 20px; box-shadow: 0 0 40px rgba(201,162,39,0.35); }
.spotlight-hero .month { color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; font-size: 0.85rem; }
.spotlight-hero h1 { margin: 10px 0; }
.spotlight-hero p.reason { color: var(--text-dim); max-width: 560px; margin: 16px auto 0; }
.spotlight-history .glass-card { display: flex; align-items: center; gap: 16px; }
.spotlight-history img { width: 48px; height: 48px; border-radius: 50%; }

/* ---------------- Digest history ---------------- */

.digest-item .digest-week { color: var(--gold); font-weight: 800; font-size: 1.1rem; margin: 0 0 14px; }
.digest-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.digest-stats .stat { text-align: center; padding: 14px 8px; background: rgba(255,255,255,0.03); border-radius: 12px; }
.digest-stats .stat .num { font-size: 1.3rem; font-weight: 800; }
.digest-stats .stat .lbl { font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; }

/* ---------------- Interactive map (pan & zoom) ---------------- */

.map-viewport {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--glass-border);
  background: var(--bg-panel); height: 70vh; max-height: 720px; min-height: 360px; cursor: grab; touch-action: none;
  user-select: none;
}
.map-viewport.dragging { cursor: grabbing; }
.map-canvas { position: absolute; top: 0; left: 0; width: 100%; transform-origin: 0 0; will-change: transform; }
.map-canvas img { display: block; width: 100%; pointer-events: none; }
.map-pin {
  position: absolute; cursor: pointer; transition: transform 0.15s ease; transform: translate(-50%, -50%);
}
.map-pin:hover { transform: translate(-50%, -50%) scale(1.15); }
.map-tooltip {
  position: absolute; pointer-events: none; background: var(--glass-bg-strong); border: 1px solid var(--glass-border-strong);
  border-radius: 10px; padding: 8px 12px; font-size: 0.82rem; backdrop-filter: blur(10px); display: none; z-index: 20; white-space: nowrap;
}
.map-controls {
  position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 15;
}
.map-controls button {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--glass-border-strong);
  background: var(--glass-bg-strong); color: var(--text); font-size: 1.1rem; font-weight: 700; cursor: pointer;
  backdrop-filter: blur(10px); transition: background 0.15s ease;
}
.map-controls button:hover { background: rgba(140, 170, 255, 0.18); }
.step-list .step h4 { margin: 0 0 4px; }
.step-list .step p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }

/* ---------------- Footer ---------------- */

.site-footer { border-top: 1px solid var(--glass-border); padding: 40px 0; margin-top: 60px; color: var(--text-faint); font-size: 0.85rem; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.site-footer .socials { display: flex; gap: 14px; }
.site-footer .socials a { color: var(--text-dim); font-size: 1.2rem; }

/* ---------------- Rich text content (custom pages / about) ---------------- */

.rich-content { color: var(--text-dim); line-height: 1.7; }
.rich-content h1, .rich-content h2, .rich-content h3 { color: var(--text); }
.rich-content a { color: var(--blue-soft); }
.rich-content img { border-radius: 12px; margin: 16px 0; }

/* ---------------- Misc ---------------- */

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-faint); }

/* ---------------- Suggestions ---------------- */

.suggestion-list { display: flex; flex-direction: column; gap: 16px; }
.suggestion-card { display: block; }
.suggestion-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.suggestion-head h3 { margin: 0; font-size: 1.1rem; }
.suggestion-content { color: var(--text-dim); margin: 10px 0 0; line-height: 1.6; }
.suggestion-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.vote-tally { display: flex; gap: 16px; font-size: 0.88rem; font-weight: 600; }
.vote-tally .up { color: #5fe3a4; }
.vote-tally .down { color: #ff8080; }
.vote-tally .pct { color: var(--text-dim); font-weight: 500; }
.ref-link { color: var(--blue-soft); font-size: 0.85rem; font-weight: 600; text-decoration: none; }

/* ---------------- Leaderboard ---------------- */

.leaderboard-list { display: flex; flex-direction: column; gap: 4px; }
.leaderboard-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; }
.leaderboard-row:hover { background: rgba(255,255,255,0.03); }
.leaderboard-row .rank { width: 28px; flex-shrink: 0; font-weight: 800; color: var(--gold); font-size: 0.9rem; }
.leaderboard-row img { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.leaderboard-row .name { flex: 1; font-weight: 600; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-row .stat { font-weight: 700; color: var(--text-dim); font-size: 0.88rem; flex-shrink: 0; }

/* ---------------- Training requirements ---------------- */

.training-req-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.training-req-list li { display: flex; align-items: flex-start; gap: 12px; }
.training-req-list .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: 6px; flex-shrink: 0; }
.training-req-list .title { font-weight: 600; font-size: 0.94rem; }
.training-req-list .desc { color: var(--text-dim); font-size: 0.85rem; margin-top: 2px; }

/* ---------------- Chain of command ladder ---------------- */

.ladder { display: flex; flex-direction: column; align-items: center; }
.ladder-rung {
  width: 100%; text-align: center; padding: 10px 16px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.ladder-index { font-size: 0.72rem; font-weight: 800; color: var(--text-faint); }
.ladder-name { font-weight: 700; font-size: 0.92rem; }
.ladder-connector { width: 2px; height: 14px; background: var(--glass-border); }
