:root {
  --bg-deep: #05040a;
  --bg-panel: rgba(12, 8, 22, 0.82);
  --bg-panel-solid: #0f0a18;
  --border-gold: #c9a227;
  --border-gold-hi: #f0cc55;
  --border-purple: #662288;
  --text: #f5f0e6;
  --text-muted: #a89bb8;
  --accent: #e8b4ff;
  --accent-pink: #ff6eb5;
  --link: #8ec5ff;
  --ok: #3dffa0;
  --bad: #ff5c7a;
  --font: "Nunito", Tahoma, sans-serif;
  --font-display: "Cinzel", Georgia, serif;
  --shadow-glow: 0 0 24px rgba(201, 162, 39, 0.25);
  --frame-gradient: linear-gradient(135deg, rgba(201,162,39,0.45), rgba(102,34,136,0.35));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--border-gold-hi); }

/* Background scene */
.scene-bg {
  position: fixed;
  inset: 0;
  background:
    url("/assets/img/background.png") center top / cover no-repeat,
    radial-gradient(circle at 18% 28%, rgba(109,51,180,0.45), transparent 30%),
    radial-gradient(circle at 72% 12%, rgba(255,110,181,0.18), transparent 26%),
    linear-gradient(145deg, #05040a 0%, #130922 42%, #05040a 100%);
  z-index: 0;
}

.scene-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5,4,10,0.06) 0%, rgba(5,4,10,0.16) 46%, rgba(5,4,10,0.78) 100%),
    linear-gradient(180deg, rgba(5,4,10,0.02) 0%, rgba(5,4,10,0.18) 52%, rgba(5,4,10,0.9) 100%);
  z-index: 1;
  pointer-events: none;
}

.scene-particles {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 80% 40%, rgba(232,180,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 50% 70%, rgba(201,162,39,0.35), transparent);
  background-size: 100% 100%;
  animation: drift 18s ease-in-out infinite alternate;
  opacity: 0.5;
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

/* Header */
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
}

.brand-main {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 20px rgba(232,180,255,0.4);
  letter-spacing: 0.04em;
}

.brand-ro {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--accent-pink);
  text-shadow: 0 0 16px rgba(255,110,181,0.5);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a,
.nav-btn {
  padding: 8px 14px;
  border-radius: 4px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.site-nav a:hover,
.nav-btn:hover {
  color: var(--text);
  border-color: rgba(201,162,39,0.35);
  background: rgba(0,0,0,0.25);
  text-decoration: none;
}

.nav-discord {
  background: linear-gradient(180deg, #5865f2, #4752c4) !important;
  border-color: #7289da !important;
  color: #fff !important;
}

/* Hero */
.hero {
  position: relative;
  z-index: 5;
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 24px 86px;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 360px;
  gap: 32px;
  align-items: start;
  min-height: 620px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  padding: 6px 12px;
  border: 1px solid rgba(232,180,255,0.25);
  background: rgba(0,0,0,0.35);
  border-radius: 999px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 4px 24px rgba(0,0,0,0.8);
  max-width: 520px;
}

.hero h1 span {
  color: var(--border-gold-hi);
  background: linear-gradient(180deg, #fff6d0, #c9a227);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-muted);
  max-width: 520px;
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 22px;
}

.hero-feature-strip span {
  padding: 7px 10px;
  border: 1px solid rgba(201,162,39,0.28);
  border-radius: 999px;
  background: rgba(0,0,0,0.28);
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
  text-decoration: none;
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.08); text-decoration: none; }

.btn-primary {
  color: #1a1208;
  background: linear-gradient(180deg, #f0cc55 0%, #c9a227 45%, #8a6d1d 100%);
  border-color: #f0cc55;
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  color: var(--text);
  background: rgba(0,0,0,0.45);
  border-color: rgba(201,162,39,0.5);
}

.btn-lg { padding: 14px 28px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
}

/* Status pills */
.status-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-pills li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(201,162,39,0.25);
  border-radius: 999px;
  font-size: 0.82rem;
  backdrop-filter: blur(6px);
}

.pill-label { color: var(--text-muted); font-weight: 600; }
.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bad);
  box-shadow: 0 0 8px var(--bad);
}
.pill-dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.pill-val { font-weight: 700; }

/* RO ornate frame */
.ro-frame {
  background: var(--bg-panel);
  border: 1px solid rgba(201,162,39,0.35);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  position: relative;
}

.ro-frame::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(102,34,136,0.35);
  border-radius: 6px;
  pointer-events: none;
}

.ro-frame-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px 8px;
}

.ro-frame-head.sm { padding: 12px 16px 4px; }

.ro-frame-head h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--border-gold-hi);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ro-diamond {
  width: 8px;
  height: 8px;
  background: var(--border-gold);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(201,162,39,0.6);
}

.hero-panel { padding-bottom: 18px; }

#hero-login-panel {
  margin-top: 42px;
  background: rgba(8, 6, 14, 0.72);
}

.hero-login-form {
  padding: 8px 22px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-login-form label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.hero-login-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(102,34,136,0.5);
  border-radius: 4px;
  background: rgba(5,4,10,0.75);
  color: var(--text);
  font: inherit;
}

.hero-login-form input:focus {
  outline: none;
  border-color: var(--border-gold);
  box-shadow: 0 0 0 2px rgba(201,162,39,0.2);
}

.hero-register {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 12px 20px 0;
}

/* Main content */
.main-content {
  position: relative;
  z-index: 5;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.ro-panel {
  padding: 20px 22px 24px;
  background: rgba(8, 6, 14, 0.78);
  border: 1px solid rgba(201,162,39,0.28);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.ro-panel-wide { margin-bottom: 24px; }

.section-hero {
  text-align: center;
  margin-bottom: 24px;
}

.section-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}

.section-hero h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--border-gold-hi);
  margin-bottom: 8px;
}

.section-sub { color: var(--text-muted); font-size: 0.9rem; }

.version-badge {
  display: inline-block;
  margin: 8px 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  color: var(--border-gold-hi);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(201,162,39,0.1);
}

.news-body ul { padding-left: 1.2rem; margin: 8px 0; }
.news-body li { margin: 6px 0; }

.changelog-entry { margin-bottom: 14px; }
.changelog-entry h3 { color: var(--border-gold); font-size: 0.92rem; margin-bottom: 4px; }
.changelog-entry ul { padding-left: 1.2rem; color: var(--text-muted); }

.muted { color: var(--text-muted); }
.center { text-align: center; }
.hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 8px; }
.sub-head { font-size: 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }

/* Rankings featured #1 */
.rank-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.feature-card {
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(201,162,39,0.4);
  background: linear-gradient(145deg, rgba(201,162,39,0.12), rgba(102,34,136,0.15));
  text-align: center;
}

.feature-card .rank-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--border-gold-hi);
  line-height: 1;
}

.feature-card .rank-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 8px 0 4px;
  color: #fff;
}

.feature-card .rank-meta { font-size: 0.85rem; color: var(--text-muted); }

.rank-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.rank-month {
  min-width: 150px;
  padding: 10px;
  border: 1px solid rgba(102,34,136,0.5);
  border-radius: 4px;
  background: rgba(0,0,0,0.35);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border: 1px solid rgba(102,34,136,0.5);
  border-radius: 4px;
  background: rgba(0,0,0,0.35);
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
}

.tab.active {
  border-color: var(--border-gold);
  color: var(--border-gold-hi);
  background: rgba(201,162,39,0.12);
  box-shadow: inset 0 0 12px rgba(201,162,39,0.1);
}

.rank-table-wrap { overflow-x: auto; border-radius: 6px; border: 1px solid rgba(102,34,136,0.35); }

.rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  background: rgba(0,0,0,0.25);
}

.rank-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(102,34,136,0.2);
  border-bottom: 1px solid rgba(201,162,39,0.2);
}

.rank-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.rank-table tr:hover td { background: rgba(201,162,39,0.06); }
.rank-table .top1 td { color: var(--border-gold-hi); font-weight: 700; }
.rank-table .top2 td { color: #e8d8ff; }
.rank-table .top3 td { color: #c9a227; }
.rank-table .muted { text-align: center; color: var(--text-muted); }

.download-panel { text-align: center; }
.download-text { color: var(--text-muted); margin: 12px 0 20px; max-width: 560px; margin-left: auto; margin-right: auto; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.info-card {
  padding: 16px;
  border: 1px solid rgba(102,34,136,0.35);
  border-radius: 8px;
  background: rgba(0,0,0,0.25);
  text-align: left;
}

.info-card h3 {
  color: var(--border-gold-hi);
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.info-card p,
.rules-list p {
  color: var(--text-muted);
  line-height: 1.6;
}

.rules-list {
  max-width: 860px;
  margin: 16px auto 0;
}

/* Anime class showcase */
.anime-showcase {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  background:
    linear-gradient(180deg, rgba(12,8,22,0.72), rgba(5,4,10,0.9)),
    radial-gradient(circle at 20% 0%, rgba(255,110,181,0.16), transparent 32%),
    radial-gradient(circle at 80% 20%, rgba(201,162,39,0.14), transparent 36%);
}

.anime-showcase::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(232,180,255,0.08), transparent),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 18px);
  opacity: 0.7;
}

.class-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
}

.class-card {
  position: relative;
  min-height: 290px;
  padding: 18px 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(201,162,39,0.24);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), transparent 36%),
    rgba(0,0,0,0.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 28px rgba(0,0,0,0.28);
  text-align: center;
  overflow: hidden;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.class-card:hover {
  transform: translateY(-6px);
  border-color: rgba(240,204,85,0.65);
  box-shadow: 0 16px 36px rgba(0,0,0,0.36), 0 0 24px rgba(201,162,39,0.18);
}

.class-card::before {
  content: "";
  position: absolute;
  inset: auto 16px 86px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(232,180,255,0.32), transparent 70%);
  filter: blur(2px);
}

.class-card h3 {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  color: var(--border-gold-hi);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  margin-top: 10px;
}

.class-card p {
  position: relative;
  z-index: 2;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 6px;
}

.class-figure {
  position: relative;
  z-index: 1;
  height: 168px;
  margin: 0 auto;
  display: flex;
  align-items: end;
  justify-content: center;
}

.class-figure::before {
  content: "";
  width: 62px;
  height: 126px;
  border-radius: 42% 42% 18% 18%;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.3), transparent 28%),
    linear-gradient(180deg, var(--figure-hi), var(--figure-lo));
  clip-path: polygon(50% 0, 70% 13%, 76% 38%, 93% 54%, 76% 65%, 68% 100%, 32% 100%, 24% 65%, 7% 54%, 24% 38%, 30% 13%);
  box-shadow: 0 0 20px var(--figure-glow);
}

.class-figure::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 46px;
  height: 46px;
  border-radius: 50% 50% 46% 46%;
  background:
    radial-gradient(circle at 38% 42%, rgba(255,255,255,0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 62% 42%, rgba(255,255,255,0.9) 0 2px, transparent 3px),
    linear-gradient(180deg, #f2d1b2, #c88d77);
  border: 2px solid rgba(0,0,0,0.3);
  box-shadow: 0 -10px 0 -2px var(--hair), 0 0 18px var(--figure-glow);
}

.class-figure span {
  position: absolute;
  width: var(--weapon-w);
  height: var(--weapon-h);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7d0, #8a6d1d);
  transform: rotate(var(--weapon-rot));
  transform-origin: center bottom;
  box-shadow: 0 0 14px var(--figure-glow);
}

.class-card.knight {
  --figure-hi: #d7d7e8;
  --figure-lo: #313142;
  --figure-glow: rgba(142,197,255,0.45);
  --hair: #262131;
  --weapon-w: 10px;
  --weapon-h: 92px;
  --weapon-rot: 42deg;
}

.class-card.mage {
  --figure-hi: #bf7bff;
  --figure-lo: #38135e;
  --figure-glow: rgba(191,123,255,0.65);
  --hair: #3b205a;
  --weapon-w: 9px;
  --weapon-h: 104px;
  --weapon-rot: -28deg;
}

.class-card.archer {
  --figure-hi: #7ee0a0;
  --figure-lo: #1d4d36;
  --figure-glow: rgba(126,224,160,0.45);
  --hair: #d4bd80;
  --weapon-w: 8px;
  --weapon-h: 112px;
  --weapon-rot: 78deg;
}

.class-card.priest {
  --figure-hi: #fff1c7;
  --figure-lo: #b98d4c;
  --figure-glow: rgba(255,241,199,0.65);
  --hair: #f3d8c8;
  --weapon-w: 8px;
  --weapon-h: 110px;
  --weapon-rot: -10deg;
}

.class-card.assassin {
  --figure-hi: #8aa0bf;
  --figure-lo: #151923;
  --figure-glow: rgba(255,110,181,0.45);
  --hair: #d8d8e8;
  --weapon-w: 9px;
  --weapon-h: 74px;
  --weapon-rot: -54deg;
}

.site-footer {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid rgba(201,162,39,0.15);
  background: rgba(5,4,10,0.6);
}

/* Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-backdrop.open { display: flex; }

.modal {
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 8px 8px 20px;
}

.modal.wide { max-width: 980px; }

.form-row { margin-bottom: 12px; }
.form-row label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(102,34,136,0.5);
  border-radius: 4px;
  background: rgba(5,4,10,0.8);
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--border-gold);
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.tabs { display: flex; gap: 8px; margin: 12px 16px 16px; }

.account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 12px 18px;
}

.account-tabs .tab {
  flex: 1 1 130px;
}

.account-section {
  margin: 0 12px 14px;
}

.section-mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.section-mini-head h3 {
  color: var(--border-gold-hi);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.msg {
  margin-top: 10px;
  padding: 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  display: none;
}
.msg.err { display: block; background: rgba(255,92,122,0.15); color: #ffb4c4; border: 1px solid rgba(255,92,122,0.3); }
.msg.ok { display: block; background: rgba(61,255,160,0.1); color: #9fefc0; border: 1px solid rgba(61,255,160,0.25); }

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  padding: 0;
}

.char-card {
  padding: 12px;
  border: 1px solid rgba(102,34,136,0.45);
  border-radius: 6px;
  cursor: pointer;
  background: rgba(0,0,0,0.35);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.char-card:hover, .char-card.active {
  border-color: var(--border-gold);
  box-shadow: 0 0 12px rgba(201,162,39,0.2);
}
.char-card .name { font-weight: 700; color: var(--border-gold-hi); }
.char-card .meta { font-size: 0.78rem; color: var(--text-muted); }
.char-card .zeny { color: var(--accent); font-size: 0.82rem; margin-top: 4px; }
.char-card.online { opacity: 0.55; }

.panel-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0;
}

.item-list {
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid rgba(102,34,136,0.4);
  border-radius: 4px;
  background: rgba(0,0,0,0.3);
}
.item-list li { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.84rem; cursor: pointer; }
.item-list li:hover, .item-list li.selected { background: rgba(201,162,39,0.1); }
.item-list li.equipped { opacity: 0.45; cursor: not-allowed; }

.transfer-box {
  border: 1px solid rgba(102,34,136,0.4);
  border-radius: 6px;
  padding: 12px;
  margin-top: 10px;
  background: rgba(0,0,0,0.25);
}
.transfer-box h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.account-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px 0;
  gap: 12px;
}
.account-head h2 { font-family: var(--font-display); font-size: 1rem; color: var(--border-gold-hi); }
.account-head span { color: var(--text-muted); }

.account-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-panel {
  margin: 18px 12px 0;
  padding: 14px;
  border: 1px solid rgba(201,162,39,0.3);
  border-radius: 8px;
  background: rgba(0,0,0,0.28);
}

.admin-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 12px 0;
}

.admin-search input {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(102,34,136,0.5);
  border-radius: 4px;
  background: rgba(5,4,10,0.8);
  color: var(--text);
  font: inherit;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 10px;
}

.admin-table th,
.admin-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: left;
}

.admin-table th {
  color: var(--accent);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-table .state-ok { color: var(--ok); }
.admin-table .state-bad { color: var(--bad); }

.admin-status {
  align-self: center;
  padding: 6px 10px;
  border: 1px solid rgba(201,162,39,0.35);
  border-radius: 999px;
  color: var(--border-gold-hi);
  background: rgba(201,162,39,0.1);
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.admin-detail {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(102,34,136,0.35);
  border-radius: 6px;
  background: rgba(0,0,0,0.28);
  color: var(--text-muted);
  font-size: 0.84rem;
}

.admin-detail h3 {
  color: var(--border-gold-hi);
  margin-bottom: 8px;
}

.admin-detail ul {
  list-style: none;
}

.admin-detail li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.admin-detail .ticket-admin-card {
  padding: 12px 0;
}

.ticket-admin-card p {
  margin: 8px 0;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  background: rgba(0,0,0,0.22);
  color: var(--text);
  white-space: pre-wrap;
}

#admin-manifest-editor,
#admin-settings-editor {
  width: 100%;
  min-height: 260px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(102,34,136,0.5);
  border-radius: 6px;
  background: rgba(5,4,10,0.82);
  color: var(--text);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  resize: vertical;
}

.item-search-results {
  display: grid;
  gap: 6px;
  margin: 8px 0 12px;
}

.item-search-results button {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid rgba(102,34,136,0.35);
  border-radius: 4px;
  background: rgba(0,0,0,0.25);
  color: var(--text-muted);
  cursor: pointer;
}

.item-search-results button:hover {
  border-color: var(--border-gold);
  color: var(--border-gold-hi);
}

.point-balance {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.point-balance span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(201,162,39,0.22);
  background: rgba(0,0,0,0.24);
  border-radius: 6px;
}

.vote-sites {
  display: grid;
  gap: 10px;
}

.vote-site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(232,180,255,0.18);
  background: rgba(0,0,0,0.22);
  border-radius: 6px;
}

.vote-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.news-preview {
  min-height: 150px;
  padding: 12px;
  border: 1px solid rgba(102,34,136,0.35);
  border-radius: 6px;
  background: rgba(0,0,0,0.28);
  color: var(--text-muted);
  line-height: 1.6;
}

.news-preview b {
  color: var(--border-gold-hi);
}

.self-service-panel {
  margin-top: 0;
  padding: 14px;
  border: 1px solid rgba(102,34,136,0.35);
  border-radius: 8px;
  background: rgba(0,0,0,0.2);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.service-grid.single {
  grid-template-columns: minmax(260px, 520px);
  justify-content: center;
}

.account-history {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  background: rgba(0,0,0,0.25);
  font-size: 0.82rem;
}

.history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.history-grid ul {
  list-style: none;
}

.history-grid li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-panel { order: -1; }
  .site-header { flex-direction: column; align-items: flex-start; }
  .panel-split { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .history-grid { grid-template-columns: 1fr; }
  .admin-tools-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .class-stage { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

@media (max-width: 600px) {
  .site-nav { width: 100%; }
  .site-nav a, .nav-btn { flex: 1; text-align: center; }
  .class-stage { grid-template-columns: 1fr; }
  .class-card { min-height: 250px; }
}
