/* =============================================
   MOOON DONATOR DASHBOARD 2.0 — STYLE.CSS
   Space / Moon Theme · Dark · Purple/Gold
   ============================================= */

:root {
  --bg-primary: #07050f;
  --bg-secondary: #0e0b1e;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border-glow: rgba(138,99,255,0.3);

  --gold: #f0c040;
  --gold-light: #ffd97a;
  --purple: #8a63ff;
  --purple-light: #b39ddb;
  --cyan: #4dd0e1;
  --green: #7fff7a;
  --red: #ff6b9d;

  --astral: #e05aff;
  --cosmic: #8a63ff;
  --lunar: #00bcd4;
  --celestial: #ffd700;

  --text-primary: #f0eeff;
  --text-secondary: rgba(240,238,255,0.55);
  --text-muted: rgba(240,238,255,0.3);

  --sidebar-w: 240px;
  --topbar-h: 60px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow-purple: 0 0 40px rgba(138,99,255,0.25);
  --shadow-glow-gold: 0 0 40px rgba(240,192,64,0.2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
}

/* ---- STARFIELD ---- */
.starfield {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}
.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: twinkle var(--dur, 3s) infinite alternate;
  opacity: var(--op, 0.5);
}
@keyframes twinkle {
  from { opacity: var(--op, 0.3); transform: scale(1); }
  to   { opacity: calc(var(--op, 0.3) * 0.3); transform: scale(0.7); }
}

.moon-bg {
  position: fixed;
  top: -120px; right: -80px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #2a1a6e, #0a0510 70%);
  box-shadow: 0 0 120px 30px rgba(60,20,120,0.4),
              inset 0 0 60px rgba(138,99,255,0.1);
  z-index: 0; pointer-events: none;
  animation: moonFloat 20s ease-in-out infinite alternate;
}
@keyframes moonFloat {
  from { transform: translateY(0); }
  to   { transform: translateY(30px); }
}

/* ---- SIDEBAR ---- */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: rgba(14,11,30,0.97);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100;
  backdrop-filter: blur(20px);
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.logo {
  display: flex; align-items: center; gap: 10px;
}
.logo-moon {
  font-size: 28px;
  color: var(--gold);
  text-shadow: 0 0 20px var(--gold);
  animation: moonFloat 4s ease-in-out infinite alternate;
}
.logo-text { display: flex; flex-direction: column; }
.logo-main {
  font-family: 'Cinzel', serif;
  font-size: 18px; font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 3px;
}
.logo-sub {
  font-size: 10px; color: var(--text-muted); letter-spacing: 1px;
}

.nav-links {
  list-style: none; padding: 12px 0; flex: 1; overflow-y: auto;
}
.nav-links::-webkit-scrollbar { width: 3px; }
.nav-links::-webkit-scrollbar-track { background: transparent; }
.nav-links::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  border-radius: 0;
  position: relative;
  transition: all 0.2s;
}
.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}
.nav-item.active {
  color: var(--purple-light);
  background: rgba(138,99,255,0.1);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: linear-gradient(180deg, var(--purple), var(--astral));
  border-radius: 0 2px 2px 0;
}
.nav-icon {
  font-size: 14px; width: 20px; text-align: center;
  opacity: 0.7;
}
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.user-card {
  display: flex; align-items: center; gap: 10px;
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--astral));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff;
  flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-role { font-size: 11px; color: var(--text-muted); }

/* ---- MAIN CONTENT ---- */
.main-content {
  margin-left: var(--sidebar-w);
  height: 100vh;
  display: flex; flex-direction: column;
  position: relative; z-index: 1;
}

/* ---- TOPBAR ---- */
.topbar {
  height: var(--topbar-h);
  background: rgba(14,11,30,0.9);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px;
  gap: 16px; flex-shrink: 0;
  backdrop-filter: blur(10px);
}
.sidebar-toggle {
  display: none;
  background: none; border: none; color: var(--text-secondary);
  font-size: 20px; cursor: pointer;
}
.topbar-breadcrumb {
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
  flex: 1;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.lunar-points-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(138,99,255,0.15);
  border: 1px solid rgba(138,99,255,0.3);
  border-radius: 20px; padding: 5px 14px;
  font-size: 13px; font-weight: 600; color: var(--purple-light);
}
.lp-icon { color: var(--gold); font-size: 14px; }

/* ---- PAGES ---- */
.page {
  display: none; flex: 1;
  overflow-y: auto; padding: 28px 28px 40px;
  position: relative;
}
.page::-webkit-scrollbar { width: 5px; }
.page::-webkit-scrollbar-track { background: transparent; }
.page::-webkit-scrollbar-thumb { background: rgba(138,99,255,0.3); border-radius: 3px; }
.page.active { display: block; }

.page-header {
  margin-bottom: 28px;
}
.page-header h1 {
  font-family: 'Cinzel', serif;
  font-size: 26px; font-weight: 700;
  background: linear-gradient(135deg, #fff 30%, var(--purple-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.page-subtitle {
  font-size: 13px; color: var(--text-secondary);
}

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(6px);
  position: relative; overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), var(--shadow-glow-purple);
}
.card-header-line {
  position: absolute; top: 0; left: 20px; right: 20px;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--astral), transparent);
  border-radius: 2px;
}
.card-title {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.8px;
}
.card-icon { font-size: 14px; }
.glow-purple { box-shadow: var(--shadow-card), var(--shadow-glow-purple); }

/* ---- OVERVIEW GRID ---- */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 18px;
}
.wide-card { grid-column: span 2; }

/* Profile Card */
.profile-card { grid-column: span 2; }
.profile-top {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 20px;
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--astral));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: #fff;
  box-shadow: 0 0 30px rgba(138,99,255,0.5);
  flex-shrink: 0;
}
.profile-meta h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.profile-role-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(138,99,255,0.15);
  border: 1px solid rgba(138,99,255,0.3);
  border-radius: 20px; padding: 4px 12px;
  font-size: 12px; color: var(--purple-light);
}
.profile-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-bottom: 16px;
}
.stat-item {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px; text-align: center;
}
.stat-value {
  font-size: 20px; font-weight: 700; margin-bottom: 4px;
}
.stat-value.gold { color: var(--gold); text-shadow: 0 0 15px rgba(240,192,64,0.4); }
.stat-value.purple { color: var(--purple-light); }
.stat-value.cyan { color: var(--cyan); }
.stat-label { font-size: 11px; color: var(--text-muted); }

/* Month Card */
.month-card {}
.month-role-display {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.month-role-icon { font-size: 36px; }
.month-role-name { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.month-role-price { font-size: 13px; color: var(--gold); font-weight: 600; }
.month-benefits { font-size: 12.5px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 14px; }
.month-benefits li { list-style: none; padding: 2px 0; }
.month-benefits li::before { content: '• '; color: var(--purple-light); }
.month-renewal {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted);
  padding-top: 12px; border-top: 1px solid var(--border);
}
.renewal-days { color: var(--gold); font-weight: 600; }

/* LP Card */
.lp-card {}
.lp-display { text-align: center; margin: 16px 0; }
.lp-big {
  font-size: 48px; font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--astral));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1;
}
.lp-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.lp-hint { font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.5; }

/* Badge Card */
.badge-display {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.badge-icon { font-size: 36px; }
.badge-name { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.badge-threshold { font-size: 12px; color: var(--text-muted); }
.badge-progress-bar-wrap {
  height: 6px; background: rgba(255,255,255,0.08);
  border-radius: 3px; margin-bottom: 6px; overflow: hidden;
}
.badge-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 3px;
  transition: width 0.6s ease;
  box-shadow: 0 0 10px rgba(240,192,64,0.4);
}
.badge-progress-label { font-size: 11px; color: var(--text-muted); }

/* Feed */
.feed-list { display: flex; flex-direction: column; gap: 12px; }
.feed-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px;
  background: rgba(0,0,0,0.2); border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.feed-item:hover { border-color: var(--border-glow); }
.feed-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--astral));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.feed-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.feed-name { font-size: 13px; font-weight: 600; }
.feed-role {
  font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600;
}
.feed-role.astral { background: rgba(224,90,255,0.15); color: var(--astral); border: 1px solid rgba(224,90,255,0.3); }
.feed-role.cosmic { background: rgba(138,99,255,0.15); color: var(--cosmic); border: 1px solid rgba(138,99,255,0.3); }
.feed-role.lunar { background: rgba(0,188,212,0.15); color: var(--lunar); border: 1px solid rgba(0,188,212,0.3); }
.feed-role.celestial { background: rgba(255,215,0,0.15); color: var(--celestial); border: 1px solid rgba(255,215,0,0.3); }
.feed-text { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 3px; }
.feed-time { font-size: 11px; color: var(--text-muted); }

/* Actions */
.actions-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.action-btn:hover {
  background: rgba(138,99,255,0.1);
  border-color: var(--border-glow);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.action-icon { font-size: 22px; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.2s; text-decoration: none;
}
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--astral));
  color: #fff; box-shadow: 0 4px 15px rgba(138,99,255,0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(138,99,255,0.5);
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

/* ---- ROLES PAGE ---- */
.roles-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-bottom: 32px;
}
.role-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  position: relative; overflow: hidden;
  transition: all 0.3s;
}
.role-card:hover { transform: translateY(-4px); }
.role-glow {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.role-astral .role-glow { background: linear-gradient(90deg, var(--astral), transparent); }
.role-cosmic .role-glow { background: linear-gradient(90deg, var(--cosmic), transparent); }
.role-lunar .role-glow { background: linear-gradient(90deg, var(--lunar), transparent); }
.role-celestial .role-glow { background: linear-gradient(90deg, var(--celestial), transparent); }

.role-astral { border-color: rgba(224,90,255,0.2); }
.role-cosmic { border-color: rgba(138,99,255,0.2); }
.role-lunar  { border-color: rgba(0,188,212,0.2); }
.role-celestial { border-color: rgba(255,215,0,0.2); box-shadow: 0 0 30px rgba(255,215,0,0.1); }

.role-badge-crown {
  position: absolute; top: 14px; right: 14px; font-size: 18px;
  animation: crownFloat 3s ease-in-out infinite alternate;
}
@keyframes crownFloat {
  from { transform: translateY(0) rotate(-5deg); }
  to   { transform: translateY(-4px) rotate(5deg); }
}
.role-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-top: 8px; }
.role-emoji { font-size: 30px; }
.role-name { font-size: 14px; font-weight: 700; font-family: 'Cinzel', serif; margin-bottom: 3px; }
.role-name.astral { color: var(--astral); }
.role-name.cosmic { color: var(--cosmic); }
.role-name.lunar  { color: var(--lunar); }
.role-name.celestial { color: var(--celestial); }
.role-price { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.role-price span { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.role-divider { height: 1px; background: var(--border); margin-bottom: 14px; }
.role-benefits {
  list-style: none; font-size: 12px; color: var(--text-secondary);
  line-height: 1.8; margin-bottom: 16px;
}
.role-benefits li::before { content: '• '; color: var(--purple-light); }
.role-stats-row {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.role-stat {
  flex: 1; background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 6px; text-align: center;
}
.rs-label { display: block; font-size: 10px; color: var(--text-muted); margin-bottom: 2px; }
.rs-val { font-size: 13px; font-weight: 700; color: var(--text-primary); }

.btn-role { width: 100%; justify-content: center; }
.btn-astral { background: linear-gradient(135deg, rgba(224,90,255,0.2), rgba(224,90,255,0.05)); border: 1px solid rgba(224,90,255,0.4); color: var(--astral); }
.btn-cosmic { background: linear-gradient(135deg, rgba(138,99,255,0.2), rgba(138,99,255,0.05)); border: 1px solid rgba(138,99,255,0.4); color: var(--cosmic); }
.btn-lunar  { background: linear-gradient(135deg, rgba(0,188,212,0.2), rgba(0,188,212,0.05)); border: 1px solid rgba(0,188,212,0.4); color: var(--lunar); }
.btn-celestial { background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,215,0,0.05)); border: 1px solid rgba(255,215,0,0.4); color: var(--celestial); }
.btn-role:hover { transform: translateY(-1px); filter: brightness(1.2); }

/* Legacy */
.legacy-section { margin-top: 10px; }
.section-title {
  font-size: 15px; font-weight: 600;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.legacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.legacy-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  text-align: center;
}
.legacy-icon { font-size: 32px; margin-bottom: 8px; }
.legacy-name { font-size: 14px; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.legacy-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* ---- CHESTS PAGE ---- */
.chest-hero {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  margin-bottom: 24px;
  display: flex; gap: 40px; align-items: center;
}
.command-label { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.command-box {
  background: rgba(0,0,0,0.5); border: 1px solid rgba(138,99,255,0.4);
  border-radius: 8px; padding: 10px 20px;
  font-family: 'Courier New', monospace; font-size: 18px; font-weight: 700;
  color: var(--text-primary); white-space: nowrap;
  box-shadow: 0 0 20px rgba(138,99,255,0.2);
}
.cmd-slash { color: var(--purple-light); }
.chest-hero-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.7; flex: 1; }

.chest-table-wrap { margin-bottom: 24px; }
.chest-table { width: 100%; border-collapse: collapse; }
.chest-table th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--gold); border-bottom: 1px solid var(--border);
}
.chest-table td {
  padding: 13px 14px; font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.chest-table tr:hover td { background: rgba(255,255,255,0.02); }
.role-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.astral-dot { background: var(--astral); }
.cosmic-dot { background: var(--cosmic); }
.lunar-dot  { background: var(--lunar); }
.celestial-dot { background: var(--celestial); }

.chest-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.abuse-title { color: var(--red) !important; }
.abuse-list { list-style: none; font-size: 13px; color: var(--text-secondary); line-height: 2; }
.abuse-list li::before { content: '⚠ '; color: var(--red); }

.chest-tracker { margin-bottom: 16px; }
.chest-track-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.chest-track-label { font-size: 12.5px; color: var(--text-secondary); }
.chest-track-val { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.chest-track-val.green { color: var(--green); }

/* ---- GOALS PAGE ---- */
.goals-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-bottom: 28px;
}
.goal-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 18px; text-align: center;
  position: relative; overflow: hidden; transition: all 0.3s;
}
.goal-card:hover { transform: translateY(-4px); }
.goal-amount {
  font-family: 'Cinzel', serif; font-size: 30px; font-weight: 700;
  margin-bottom: 4px;
}
.goal-tier { font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.goal-divider { height: 1px; background: var(--border); margin: 12px 0; }
.goal-coins { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.goal-reward { font-size: 12.5px; color: var(--text-primary); line-height: 1.5; margin-bottom: 16px; }
.goal-icon { font-size: 32px; }

.goal-bronze { border-color: rgba(205,127,50,0.3); }
.goal-bronze .goal-amount { color: #cd7f32; }
.goal-bronze .goal-tier { color: #cd7f32; }

.goal-silver { border-color: rgba(192,192,192,0.3); }
.goal-silver .goal-amount { color: #c0c0c0; }
.goal-silver .goal-tier { color: #c0c0c0; }

.goal-gold { border-color: rgba(255,215,0,0.3); box-shadow: 0 0 20px rgba(255,215,0,0.1); }
.goal-gold .goal-amount { color: var(--gold); }
.goal-gold .goal-tier { color: var(--gold); }

.goal-diamond { border-color: rgba(0,191,255,0.3); box-shadow: 0 0 20px rgba(0,191,255,0.1); }
.goal-diamond .goal-amount { color: #00bfff; }
.goal-diamond .goal-tier { color: #00bfff; }

.goals-progress-card {}
.goals-progress-content { margin-bottom: 16px; }
.current-goal-info { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.current-goal-label { font-size: 12px; color: var(--text-muted); }
.current-goal-name { font-size: 14px; font-weight: 600; color: var(--gold); }
.goals-progress-bar-wrap { height: 10px; background: rgba(255,255,255,0.08); border-radius: 5px; margin-bottom: 8px; overflow: hidden; }
.goals-progress-bar {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  position: relative; transition: width 0.6s ease;
}
.goals-progress-shine {
  position: absolute; top: 0; bottom: 0; right: 0; width: 30px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  animation: shine 2s ease-in-out infinite;
}
@keyframes shine { 0%,100% { opacity: 0; } 50% { opacity: 1; } }
.goals-progress-nums { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.goals-note { font-size: 12px; color: var(--text-secondary); line-height: 1.5; padding-top: 14px; border-top: 1px solid var(--border); }

/* ---- SHOP PAGE ---- */
.shop-balance-bar {
  background: rgba(138,99,255,0.1); border: 1px solid rgba(138,99,255,0.25);
  border-radius: var(--radius); padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.shop-balance-info { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.shop-balance-icon { color: var(--gold); font-size: 18px; }
.shop-balance-info strong { color: var(--purple-light); font-size: 18px; }
.shop-hint { font-size: 11.5px; color: var(--text-muted); font-style: italic; }

.shop-categories { display: flex; gap: 8px; margin-bottom: 22px; }
.shop-cat {
  padding: 7px 18px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.shop-cat:hover, .shop-cat.active {
  background: rgba(138,99,255,0.15);
  border-color: rgba(138,99,255,0.4);
  color: var(--purple-light);
}

.shop-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.shop-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
  transition: all 0.25s; position: relative; overflow: hidden;
}
.shop-item:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), var(--shadow-glow-purple);
}
.shop-item.featured {
  border-color: rgba(240,192,64,0.3);
  box-shadow: 0 0 20px rgba(240,192,64,0.08);
}
.shop-item-featured-tag {
  position: absolute; top: 0; right: 0;
  background: var(--gold); color: #000;
  font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 0 var(--radius) 0 8px;
}
.shop-item-icon { font-size: 32px; }
.shop-item-name { font-size: 14px; font-weight: 600; }
.shop-item-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; flex: 1; }
.shop-item-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--border); margin-top: auto; }
.shop-item-cost { font-size: 13px; font-weight: 700; color: var(--purple-light); display: flex; align-items: center; gap: 4px; }
.lp-icon-small { color: var(--gold); font-size: 12px; }
.btn-shop {
  padding: 6px 14px; border-radius: 6px;
  background: rgba(138,99,255,0.2); border: 1px solid rgba(138,99,255,0.35);
  color: var(--purple-light); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all 0.2s;
}
.btn-shop:hover { background: rgba(138,99,255,0.35); transform: scale(1.03); }
.btn-shop:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- HALL OF FAME ---- */
.hof-info-bar {
  display: flex; gap: 24px; flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  margin-bottom: 20px;
}
.hof-info-item { font-size: 12.5px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.hof-info-icon { color: var(--gold); }

.hof-filter { display: flex; gap: 8px; margin-bottom: 22px; }
.hof-filter-btn {
  padding: 7px 16px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: all 0.2s;
}
.hof-filter-btn.active, .hof-filter-btn:hover { background: rgba(138,99,255,0.15); border-color: rgba(138,99,255,0.4); color: var(--text-primary); }

.hof-grid { display: flex; flex-direction: column; gap: 20px; }
.hof-section {}
.hof-tier-header {
  font-family: 'Cinzel', serif; font-size: 16px; font-weight: 700;
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.hof-tier-header.diamond { color: #00bfff; }
.hof-tier-header.gold-tier { color: var(--gold); }
.hof-tier-header.silver-tier { color: #c0c0c0; }
.hof-tier-header.bronze-tier { color: #cd7f32; }

.hof-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.hof-member {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  transition: all 0.2s;
}
.hof-member:hover { border-color: var(--border-glow); background: var(--bg-card-hover); }
.hof-member.legacy { border-color: rgba(240,192,64,0.2); }
.hof-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--astral));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.hof-member-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.hof-member-meta { font-size: 11.5px; color: var(--text-muted); }
.hof-stars { margin-left: auto; font-size: 13px; }
.legacy-badge {
  display: inline; padding: 2px 6px; border-radius: 6px;
  background: rgba(240,192,64,0.15); color: var(--gold);
  font-size: 9px; font-weight: 700; margin-left: 4px;
  border: 1px solid rgba(240,192,64,0.3);
}

/* ---- RULES PAGE ---- */
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.rule-card { display: flex; gap: 16px; align-items: flex-start; }
.rule-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.rule-red { background: rgba(255,107,157,0.15); }
.rule-green { background: rgba(127,255,122,0.15); }
.rule-yellow { background: rgba(255,215,0,0.15); }
.rule-purple { background: rgba(179,157,219,0.15); }
.rule-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.rule-content p { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }

.leitsatz-card {
  background: rgba(138,99,255,0.06);
  border-color: rgba(138,99,255,0.2);
  margin-bottom: 24px; text-align: center;
}
.leitsatz-quote {
  font-size: 15px; font-style: italic; line-height: 1.7;
  color: var(--text-primary); margin-bottom: 10px;
}
.leitsatz-quote::before { content: '"'; color: var(--purple-light); }
.leitsatz-quote::after  { content: '"'; color: var(--purple-light); }
.leitsatz-sub { font-size: 12px; color: var(--text-muted); }

.contact-section { }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0 12px; }
.contact-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; text-align: center;
}
.contact-role { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.contact-type { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.contact-desc { font-size: 12px; color: var(--text-secondary); }
.contact-note { font-size: 12px; color: var(--text-muted); font-style: italic; }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg); width: 420px; max-width: 95vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), var(--shadow-glow-purple);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.92) translateY(-10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 0;
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.form-input {
  background: rgba(0,0,0,0.3); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px; color: var(--text-primary); font-size: 14px;
  outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--border-glow); }
.modal-footer { padding: 0 22px 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* ---- TOAST ---- */
.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 300;
  background: rgba(20,15,40,0.97);
  border: 1px solid var(--border-glow);
  border-radius: 10px; padding: 12px 20px;
  font-size: 13px; color: var(--text-primary);
  box-shadow: var(--shadow-card), var(--shadow-glow-purple);
  opacity: 0; transform: translateY(10px);
  transition: all 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---- COLOR HELPERS ---- */
.gold { color: var(--gold); }
.purple { color: var(--purple); }
.cyan { color: var(--cyan); }
.green { color: var(--green); }
.muted { color: var(--text-muted); }
.astral { color: var(--astral); }
.cosmic { color: var(--cosmic); }
.lunar  { color: var(--lunar); }
.celestial { color: var(--celestial); }

/* ---- SCROLLBAR GLOBAL ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(138,99,255,0.3); border-radius: 3px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1200px) {
  .roles-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .profile-card { grid-column: span 2; }
  .wide-card { grid-column: span 2; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .goals-grid { grid-template-columns: repeat(2, 1fr); }
  .rules-grid { grid-template-columns: 1fr; }
  .chest-bottom-grid { grid-template-columns: 1fr; }
  .overview-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .legacy-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .page { padding: 16px 14px 30px; }
  .roles-grid { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: 1fr; }
  .goals-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .chest-hero { flex-direction: column; gap: 20px; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
}
