:root {
  --bg: #030304;
  --bg-2: #08080b;
  --card: #0b0b0f;
  --card-2: #111116;
  --border: #1a1a22;
  --text: #e4e4ec;
  --muted: #74748a;
  --accent: #9b8cff;
  --accent-2: #5b4bc4;
  --accent-soft: rgba(155, 140, 255, 0.12);
  --danger: #ff5c7a;
  --ok: #4ade80;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(90% 60% at 50% -10%, rgba(91, 75, 196, 0.10), transparent 70%),
    radial-gradient(60% 50% at 100% 100%, rgba(40, 20, 60, 0.18), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }

.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.logo img {
  height: 38px; width: auto;
  filter: brightness(2.4) saturate(1.3) drop-shadow(0 0 1px #d9d2ff) drop-shadow(0 0 6px rgba(155, 140, 255, 0.9));
  transition: transform 0.25s;
}
.logo:hover img { transform: rotate(-12deg); }
.logo span { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card-2); cursor: pointer; font-weight: 600; font-size: 0.92rem;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn:hover { border-color: #2a2a36; background: #17171e; }
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: linear-gradient(135deg, #a597ff, #6a58e8);
  border-color: rgba(255, 255, 255, 0.08); color: #08070f;
  box-shadow: 0 0 18px rgba(124, 107, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn.primary:hover { box-shadow: 0 0 28px rgba(124, 107, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn.danger { color: var(--danger); border-color: rgba(255, 92, 122, 0.35); background: rgba(255, 92, 122, 0.08); }
.btn.small { padding: 6px 12px; font-size: 0.82rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 80px; }
input[type='color'].input { padding: 4px; height: 42px; cursor: pointer; }
input[type='range'] { width: 100%; accent-color: var(--accent); }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px;
  border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); cursor: pointer; font-size: 0.9rem; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: #1f1f29; position: relative; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }

/* ---------- top nav ---------- */
.nav-wrap { position: sticky; top: 14px; z-index: 50; display: flex; justify-content: center; padding: 0 16px; }
.nav {
  width: min(1000px, 100%); display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 10px 20px; border-radius: 16px;
  background: rgba(8, 8, 11, 0.75); border: 1px solid var(--border); backdrop-filter: blur(14px);
}
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 0.9rem; color: #c9c9d6; }
.nav-links a:hover { color: #fff; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 40%), var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
}
.card h3 { font-size: 1rem; margin-bottom: 14px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---------- seasonal themes (set site-wide by founders/managers) ---------- */
[data-season="halloween"] { --accent: #ff8a1f; --accent-2: #a855f7; --accent-soft: rgba(255, 138, 31, 0.13); --sb1: rgba(255, 120, 20, 0.16); --sb2: rgba(120, 40, 180, 0.22); --sp1: #ffad5c; --sp2: #e0641a; --sglow: rgba(255, 138, 31, 0.35); }
[data-season="christmas"] { --accent: #ff4d5e; --accent-2: #22c55e; --accent-soft: rgba(255, 77, 94, 0.13); --sb1: rgba(220, 40, 60, 0.15); --sb2: rgba(30, 140, 70, 0.18); --sp1: #ff7a87; --sp2: #d92a3e; --sglow: rgba(255, 77, 94, 0.35); }
[data-season="easter"] { --accent: #f9a8d4; --accent-2: #a78bfa; --accent-soft: rgba(249, 168, 212, 0.13); --sb1: rgba(249, 168, 212, 0.14); --sb2: rgba(134, 239, 172, 0.12); --sp1: #fbcfe8; --sp2: #c084fc; --sglow: rgba(249, 168, 212, 0.35); }
[data-season="summer"] { --accent: #fbbf24; --accent-2: #fb7185; --accent-soft: rgba(251, 191, 36, 0.13); --sb1: rgba(251, 191, 36, 0.14); --sb2: rgba(251, 113, 133, 0.14); --sp1: #fcd34d; --sp2: #f97316; --sglow: rgba(251, 191, 36, 0.35); }
[data-season="newyear"] { --accent: #fcd34d; --accent-2: #c4b5fd; --accent-soft: rgba(252, 211, 77, 0.12); --sb1: rgba(252, 211, 77, 0.13); --sb2: rgba(99, 102, 241, 0.2); --sp1: #fde68a; --sp2: #d4a017; --sglow: rgba(252, 211, 77, 0.35); }
[data-season="valentines"] { --accent: #ff5c8a; --accent-2: #f9a8d4; --accent-soft: rgba(255, 92, 138, 0.13); --sb1: rgba(255, 92, 138, 0.16); --sb2: rgba(190, 24, 93, 0.18); --sp1: #ff8fb1; --sp2: #e11d63; --sglow: rgba(255, 92, 138, 0.38); }
[data-season="menshealth"] { --accent: #60a5fa; --accent-2: #2dd4bf; --accent-soft: rgba(96, 165, 250, 0.12); --sb1: rgba(59, 130, 246, 0.13); --sb2: rgba(45, 212, 191, 0.1); --sp1: #93c5fd; --sp2: #2563eb; --sglow: rgba(96, 165, 250, 0.3); }
[data-season] body:not(.profile-page) {
  background:
    radial-gradient(90% 60% at 50% -10%, var(--sb1), transparent 70%),
    radial-gradient(60% 50% at 100% 100%, var(--sb2), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
[data-season] .btn.primary { background: linear-gradient(135deg, var(--sp1), var(--sp2)); box-shadow: 0 0 18px var(--sglow), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
[data-season] .btn.primary:hover { box-shadow: 0 0 28px var(--sglow), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
[data-season] .logo img { filter: brightness(2.4) saturate(1.3) drop-shadow(0 0 1px #fff) drop-shadow(0 0 6px var(--accent)); }
.logo { position: relative; }
.logo-season { font-style: normal; font-size: 0.95rem; margin-left: -4px; animation: season-bob 2.4s ease-in-out infinite; }
@keyframes season-bob { 50% { transform: translateY(-3px) rotate(-8deg); } }

.season-fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.season-fx span { position: absolute; top: -40px; line-height: 1; animation: season-fall linear infinite; will-change: transform; }
.season-fx.snow span { color: #fff; text-shadow: 0 0 6px rgba(255, 255, 255, 0.8); }
@keyframes season-fall {
  from { transform: translate(0, -40px) rotate(0deg); }
  to { transform: translate(var(--drift), 110vh) rotate(260deg); }
}
.season-fx.rise span { top: auto; bottom: -40px; animation-name: season-rise; }
@keyframes season-rise {
  from { transform: translate(0, 40px) rotate(-10deg) scale(0.9); }
  50% { transform: translate(calc(var(--drift) * 0.5), -55vh) rotate(8deg) scale(1); }
  to { transform: translate(var(--drift), -110vh) rotate(-6deg) scale(1.05); }
}

/* glowing badge tile; --bc is the badge colour */
.bico {
  --bc: #9b8cff; display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 0.5em; vertical-align: middle; flex-shrink: 0;
  color: var(--bc); background: color-mix(in srgb, var(--bc) 15%, rgba(10, 10, 14, 0.6));
  border: 1px solid color-mix(in srgb, var(--bc) 35%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--bc) 28%, transparent), inset 0 0 8px color-mix(in srgb, var(--bc) 12%, transparent);
  transition: transform 0.15s, box-shadow 0.2s;
}
.bico svg { width: 62%; height: 62%; filter: drop-shadow(0 0 3px var(--bc)); }
.bico:hover { transform: translateY(-1px) scale(1.06); box-shadow: 0 0 18px color-mix(in srgb, var(--bc) 50%, transparent), inset 0 0 10px color-mix(in srgb, var(--bc) 20%, transparent); }

/* ---------- toasts ---------- */
.toasts {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  width: min(380px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  --tc: var(--ok);
  position: relative; display: flex; align-items: center; gap: 11px; max-width: 100%; overflow: hidden; pointer-events: auto;
  padding: 11px 10px 11px 12px; border-radius: 14px; color: #ececf3; font-size: 0.88rem; line-height: 1.35;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 9%, rgba(18, 17, 26, 0.92)), rgba(12, 12, 18, 0.92));
  border: 1px solid color-mix(in srgb, var(--tc) 22%, rgba(255, 255, 255, 0.07));
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.7), 0 0 24px -12px var(--tc);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: toastIn 0.38s cubic-bezier(0.2, 1.3, 0.4, 1); transition: opacity 0.25s, transform 0.25s, margin 0.25s;
  touch-action: pan-y;
}
.toast.err { --tc: var(--danger); }
.toast.warn { --tc: #fbbf24; }
.toast.info { --tc: var(--accent); }
.toast.out { opacity: 0; transform: translateX(24px) scale(0.96); }
.toast.bump { animation: toastBump 0.3s ease; }
.toast-icon {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  color: var(--tc); background: color-mix(in srgb, var(--tc) 15%, transparent);
}
.toast-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.toast.ok .toast-icon path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: toastTick 0.4s 0.15s ease forwards; }
.toast-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.toast-title { font-weight: 700; font-size: 0.88rem; }
.toast-title + .toast-msg { color: #a9a9bd; font-size: 0.82rem; }
.toast-count { flex: none; font-size: 0.72rem; font-weight: 700; padding: 2px 6px; border-radius: 99px; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); }
.toast-action {
  flex: none; padding: 5px 10px; border-radius: 8px; border: 0; cursor: pointer; font: inherit; font-size: 0.8rem; font-weight: 700;
  color: #0b0a10; background: var(--tc);
}
.toast-action:hover { filter: brightness(1.1); }
.toast-close {
  flex: none; width: 24px; height: 24px; border-radius: 7px; border: 0; cursor: pointer; font-size: 0.72rem;
  color: #8a8aa0; background: transparent; opacity: 0.6; transition: opacity 0.15s, background 0.15s;
}
.toast:hover .toast-close, .toast-close:focus-visible { opacity: 1; }
.toast-close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.toast-bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; transform-origin: left;
  background: linear-gradient(90deg, var(--tc), color-mix(in srgb, var(--tc) 40%, transparent));
  animation: toastBar var(--left, 3s) linear forwards;
}
.toast.paused .toast-bar { animation-play-state: paused; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.94); } }
@keyframes toastBump { 40% { transform: scale(1.04); } }
@keyframes toastTick { to { stroke-dashoffset: 0; } }
@keyframes toastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 560px) {
  .toasts { left: 16px; right: 16px; bottom: 16px; width: auto; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.bump { animation: none; }
  .toast.ok .toast-icon path { animation: none; stroke-dashoffset: 0; }
}

/* ---------- floating sparkles background ---------- */
.report-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); }
.report-box { width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 16px; background: #0b0a10; border: 1px solid rgba(255, 255, 255, 0.1); color: #eee; font-family: Inter, system-ui, sans-serif; text-align: left; }
.report-box h3 { margin: 0; }
.report-box p { margin: 0; font-size: 0.85rem; }
.report-box label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; }
.report-box select, .report-box textarea { padding: 9px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.12); background: #0b0a10; color: #eee; font: inherit; resize: vertical; }
.report-actions { display: flex; justify-content: flex-end; gap: 8px; }
.report-form { width: min(460px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; }
.rp-head { display: flex; align-items: center; justify-content: space-between; }
.rp-x { background: none; border: none; color: #888; font-size: 1rem; cursor: pointer; padding: 4px; }
.rp-x:hover { color: #fff; }
.rp-reasons { display: flex; flex-direction: column; gap: 6px; }
.report-box label.rp-reason {
  position: relative; flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.02); transition: border-color 0.15s, background 0.15s;
}
.rp-reason:hover { border-color: rgba(255, 255, 255, 0.2); }
.rp-reason:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.rp-reason:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.rp-reason input { position: absolute; opacity: 0; pointer-events: none; }
.rp-icon { font-size: 1.3rem; width: 28px; text-align: center; flex: none; }
.rp-text { display: flex; flex-direction: column; gap: 1px; }
.rp-text b { font-size: 0.88rem; }
.rp-text small { color: #8a8a9a; font-size: 0.76rem; }
.rp-fine { font-size: 0.75rem !important; }
.rp-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 10px 0 4px; }
.rp-done-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; color: #4ade80; background: rgba(74, 222, 128, 0.12); }
.site-banner { position: relative; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 44px; font-size: 0.88rem; text-align: center; background: linear-gradient(90deg, rgba(124, 58, 237, 0.85), rgba(94, 45, 167, 0.85)); color: #fff; }
[data-season] .site-banner { background: linear-gradient(90deg, color-mix(in srgb, var(--sp2) 85%, transparent), color-mix(in srgb, var(--accent-2) 80%, transparent)); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
[data-season] .site-banner.warn,
.site-banner.warn { background: linear-gradient(90deg, rgba(200, 120, 20, 0.9), rgba(170, 70, 20, 0.9)); }
.site-banner button { position: absolute; right: 12px; background: none; border: none; color: inherit; font-size: 1rem; cursor: pointer; opacity: 0.8; }
.float-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.float-bg span {
  position: absolute; bottom: -60px; font-size: 22px; opacity: 0.18; color: var(--accent); animation: floatUp linear infinite;
  filter: drop-shadow(0 0 6px var(--accent));
}
@keyframes floatUp {
  to { transform: translateY(-115vh) translateX(40px) rotate(15deg); }
}

.notice-pop {
  position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 20px;
  background: rgba(4, 4, 7, 0.78); backdrop-filter: blur(6px); animation: noticeIn 0.2s ease;
}
.notice-box {
  width: min(420px, 100%); background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 28px 24px 22px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  border-top: 3px solid var(--accent);
}
.notice-warning .notice-box { border-top-color: #ffb547; }
.notice-kick .notice-box { border-top-color: var(--danger); }
.notice-icon { font-size: 2.4rem; line-height: 1; margin-bottom: 10px; }
.notice-box h2 { font-size: 1.2rem; margin-bottom: 10px; }
.notice-warning h2 { color: #ffb547; }
.notice-text { white-space: pre-wrap; word-break: break-word; line-height: 1.5; margin-bottom: 12px; }
.notice-box small { display: block; color: var(--muted); font-size: 0.78rem; margin-bottom: 18px; }
@keyframes noticeIn { from { opacity: 0; } }

@media (max-width: 720px) {
  .nav-links .hide-sm { display: none; }
}
