: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 { color: var(--accent); }

.ic { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.14em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.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.2) saturate(1.1); }
.logo span { color: var(--accent); }

.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: var(--accent); border-color: transparent; color: #0a0a0f; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); border-color: transparent; }
.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.nav-discord { display: inline-flex; align-items: center; gap: 6px; background: #5865f2; border-color: #5865f2; color: #fff; }
.btn.nav-discord:hover { background: #4752c4; border-color: #4752c4; color: #fff; }
.nav-discord img, .nav-discord svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .nav-discord span { display: none; } .btn.nav-discord { padding: 6px 8px; } }
@media (max-width: 420px) {
  [data-auth-slot] { gap: 5px !important; }
  [data-auth-slot] .btn.small { padding: 6px 9px; }
  [data-auth-slot] .btn.nav-discord { padding: 6px 7px; }
  [data-auth-slot] .theme-toggle { width: 30px; height: 30px; }
  .nav .logo { flex-shrink: 0; }
}
@media (max-width: 370px) { [data-auth-slot]:has(.nav-discord) .theme-toggle { display: none; } }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.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); }

.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; }

.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; }

[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;
}
.logo { position: relative; }
.logo-season { display: inline-flex; font-size: 0.95rem; margin-left: -4px; color: var(--accent); }

.season-fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.season-fx span { position: absolute; top: -40px; line-height: 1; color: var(--accent); animation: season-fall linear infinite; will-change: transform; }
.season-fx span:nth-child(3n) { color: var(--accent-2); }
.season-fx.snow span { color: #fff; }
@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); }
}

.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) 13%, rgba(10, 10, 14, 0.6));
  border: 1px solid color-mix(in srgb, var(--bc) 30%, transparent);
}
.bico svg { width: 62%; height: 62%; }

.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: rgba(16, 16, 22, 0.96); border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.7);
  animation: toastIn 0.25s ease-out; 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: color-mix(in srgb, var(--tc) 60%, transparent);
  animation: toastBar var(--left, 3s) linear forwards;
}
.toast.paused .toast-bar { animation-play-state: paused; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
@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; }
}

.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: fixed; z-index: 60; left: 50%; bottom: 16px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px);
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 44px 9px 18px; border-radius: 99px;
  font-size: 0.88rem; text-align: center; color: #e8e8ef; box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.7);
  background: rgba(16, 16, 22, 0.96); border: 1px solid rgba(255, 255, 255, 0.1);
  animation: bannerIn 0.3s ease-out;
}
.site-banner .ic { color: var(--accent); }
@keyframes bannerIn { from { opacity: 0; transform: translate(-50%, 8px); } }
body.has-banner .toasts { bottom: 72px; }
.site-banner.warn { border-color: rgba(251, 191, 36, 0.4); }
.site-banner.warn .ic { color: #fbbf24; }
.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.12; color: var(--accent); animation: floatUp linear infinite;
}
@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; } }

.nav .btn { white-space: nowrap; }
@media (max-width: 720px) {
  .nav-links .hide-sm { display: none; }
  .nav { padding: 8px 10px 8px 14px; }
  .nav-links { gap: 8px; }
}
@media (max-width: 400px) {
  .nav .logo { font-size: 1.05rem; gap: 6px; }
  .nav .logo img { height: 30px; }
  .nav .btn.small, .nav .btn { padding: 6px 10px; font-size: 0.8rem; }
}

@media (hover: none), (max-width: 820px) {
  body, [data-season] body:not(.profile-page) { background-attachment: scroll; }
}
button, a, input, select, textarea, label { touch-action: manipulation; }
* { -webkit-tap-highlight-color: transparent; }
.rarity {
  display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 99px; vertical-align: 1px;
  font: 700 0.62rem/1.5 'Inter', system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--r); background: color-mix(in srgb, var(--r) 14%, transparent); border: 1px solid color-mix(in srgb, var(--r) 45%, transparent);
}
.rarity-epic { box-shadow: 0 0 8px color-mix(in srgb, var(--r) 35%, transparent); }
.rarity-legendary, .rarity-mythic {
  background: linear-gradient(110deg, color-mix(in srgb, var(--r) 16%, transparent) 30%, color-mix(in srgb, var(--r) 45%, transparent) 50%, color-mix(in srgb, var(--r) 16%, transparent) 70%) 0 0 / 250% 100%;
  box-shadow: 0 0 10px color-mix(in srgb, var(--r) 45%, transparent); animation: rarity-shine 2.6s linear infinite;
}
.rarity-mythic { color: #fff; text-shadow: 0 0 6px var(--r); }
@keyframes rarity-shine { to { background-position: -250% 0; } }
@media (prefers-reduced-motion: reduce) { .rarity { animation: none !important; } }
