* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --bg: #030304;
  --bg-soft: #06070b;
  --panel: rgba(10, 10, 12, 0.7);
  --panel-strong: rgba(12, 12, 16, 0.9);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #f5f7fb;
  --muted: #99a0ae;
  --blue: #4ea1ff;
  --green: #31d06d;
  --purple: #a970ff;
  --red: #ef4444;
  --shadow-blue: rgba(78, 161, 255, 0.24);
  --shadow-green: rgba(49, 208, 109, 0.22);
  --shadow-purple: rgba(169, 112, 255, 0.24);
  --font: 'Inter', sans-serif;
  --font-heavy: 'Montserrat', sans-serif;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
}

.theme-body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(3, 3, 4, 0.92) 100%);
  pointer-events: none;
  z-index: -1;
}

.background-wrapper {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #030304;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.42;
  animation: floatOrb 20s infinite ease-in-out alternate;
}

.orb-1 {
  top: -12%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: rgba(32, 60, 150, 0.18);
}

.orb-2 {
  right: -10%;
  bottom: -12%;
  width: 54vw;
  height: 54vw;
  background: rgba(20, 20, 32, 0.85);
  animation-delay: -5s;
}

.orb-3 {
  top: 38%;
  left: 38%;
  width: 36vw;
  height: 36vw;
  background: rgba(58, 58, 74, 0.16);
  animation-delay: -9s;
}

.grid-glow {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
  opacity: 0.35;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, 36px) scale(1.08); }
  100% { transform: translate(-20px, -18px) scale(0.95); }
}

.fade-in { animation: fadeIn 0.8s ease forwards; }
.slide-down { animation: slideDown 0.6s ease forwards; }
.slide-up {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.7s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

.glass-panel,
.panel,
.panel-box {
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.lift-card {
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.lift-card:hover,
.panel:hover,
.panel-box:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.panel-topline {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
}

.blue-line { background: linear-gradient(90deg, rgba(78,161,255,0), rgba(78,161,255,1), rgba(78,161,255,0)); }
.green-line { background: linear-gradient(90deg, rgba(49,208,109,0), rgba(49,208,109,1), rgba(49,208,109,0)); }
.purple-line { background: linear-gradient(90deg, rgba(169,112,255,0), rgba(169,112,255,1), rgba(169,112,255,0)); }

/* AUTH */
.auth-page-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.auth-shell {
  width: 100%;
  max-width: 1240px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px;
  align-items: stretch;
}

.auth-showcase,
.auth-panel {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
}

.auth-showcase {
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 720px;
}

.auth-badge,
.hero-status-pill,
.tiny-pill,
.topbar-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(78, 161, 255, 0.22);
  background: rgba(78, 161, 255, 0.1);
  color: var(--blue);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-showcase-title,
.auth-title,
.dashboard-hero-card h1,
.panel-card-head h2,
.brand-name {
  font-family: var(--font-heavy);
  letter-spacing: 0.02em;
}

.auth-showcase-title {
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 0.98;
  margin: 22px 0 14px;
  text-transform: uppercase;
}

.auth-showcase-copy,
.auth-subtitle,
.dashboard-hero-card p,
.dashboard-note-item p,
.module-card p,
.profile-subtext {
  color: var(--muted);
  line-height: 1.7;
}

.auth-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.auth-rule-card,
.hero-stat-card,
.mini-stat-box,
.auth-password-box,
.dashboard-note-item,
.news-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.auth-rule-card {
  padding: 18px;
}

.auth-rule-card span,
.hero-stat-card span,
.mini-stat-box span,
.auth-password-title,
.panel-kicker,
.brand-kicker,
.profile-rank,
.profile-overline,
.game-stage-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.auth-rule-card strong,
.hero-stat-card strong,
.mini-stat-box strong,
.panel-card-head h2,
.module-card strong,
.dashboard-note-item strong,
.profile-info .player-name {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.auth-password-box {
  padding: 24px;
}

.auth-password-box ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.auth-panel {
  padding: 34px;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.auth-tab {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
}

.auth-tab.active,
.auth-tab:hover {
  color: var(--text);
  border-color: rgba(78, 161, 255, 0.3);
  background: rgba(78, 161, 255, 0.1);
}

.auth-title {
  font-size: 2rem;
  margin: 0 0 8px;
}

.auth-subtitle {
  margin: 0 0 26px;
  font-size: 14px;
}

.auth-form { display: grid; gap: 18px; }
.input-group { display: grid; gap: 8px; }
.input-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-input {
  width: 100%;
  padding: 15px 16px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input:focus {
  outline: none;
  border-color: rgba(78, 161, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(78, 161, 255, 0.12);
  background: rgba(0, 0, 0, 0.38);
}

.auth-code-input { text-transform: uppercase; letter-spacing: 0.08em; }
.muted-inline { color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }

.auth-btn,
.nexus-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  border-radius: 14px;
  padding: 15px 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.auth-btn {
  width: 100%;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 28px var(--shadow-blue);
}

.auth-btn:hover,
.nexus-btn:hover {
  transform: translateY(-2px);
}

.auth-btn-green { background: var(--green); box-shadow: 0 12px 28px var(--shadow-green); }
.auth-btn-purple { background: var(--purple); box-shadow: 0 12px 28px var(--shadow-purple); }

.auth-alert {
  padding: 16px 18px;
  border-radius: 16px;
  margin-bottom: 20px;
  border: 1px solid;
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.auth-alert-error {
  background: rgba(239, 68, 68, 0.09);
  border-color: rgba(239, 68, 68, 0.22);
  color: #ffb7b7;
}

.auth-alert-success {
  background: rgba(49, 208, 109, 0.1);
  border-color: rgba(49, 208, 109, 0.24);
  color: #c8ffd9;
}

.reset-code-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
}

.reset-code-box strong {
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.08em;
}

/* DASHBOARD */
.dashboard-theme-body {
  padding-bottom: 40px;
}

.nexus-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 7, 11, 0.72);
  backdrop-filter: blur(16px);
}

.brand-shell,
.profile-identity-card,
.panel-card-head-inline,
.hero-action-row,
.system-item,
.profile-main,
.brand,
.top-nav {
  display: flex;
  align-items: center;
}

.brand-shell { gap: 14px; }
.brand-cube,
.brand-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 0 24px rgba(78, 161, 255, 0.34);
}

.brand-kicker { margin-bottom: 4px; }
.brand-name { font-size: 1.2rem; text-transform: uppercase; }

.nexus-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nexus-nav a,
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}

.nexus-nav a:hover,
.nexus-nav a.active,
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border-color: var(--line);
}

.nexus-dashboard-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px 0;
}

.dashboard-hero-card,
.dashboard-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
}

.dashboard-hero-card {
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.7fr);
  gap: 26px;
  margin-bottom: 28px;
}

.dashboard-hero-card h1 {
  margin: 18px 0 14px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.hero-copy-block p { max-width: 720px; }
.hero-action-row { gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.hero-side-stats { display: grid; gap: 14px; }
.hero-stat-card { padding: 18px; }

.nexus-btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 25px var(--shadow-blue);
}

.nexus-btn-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
}

.dashboard-side-stack,
.dashboard-center-stack,
.status-list-clean,
.dashboard-note-list,
.news-feed,
.system-list,
.game-sidebar {
  display: grid;
  gap: 24px;
}

.dashboard-card { padding: 26px; }
.panel-card-head { margin-bottom: 22px; }
.panel-card-head h2 { margin: 8px 0 0; font-size: 1.7rem; }
.panel-card-head-inline { justify-content: space-between; gap: 16px; }
.profile-identity-card { gap: 16px; margin-bottom: 20px; }
.profile-avatar-glow,
.avatar-large,
.avatar-mini {
  background: radial-gradient(circle at 30% 30%, rgba(78,161,255,0.95), rgba(33, 48, 92, 0.25) 70%);
  border: 1px solid rgba(78, 161, 255, 0.22);
}

.profile-avatar-glow,
.avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 0 28px rgba(78, 161, 255, 0.22);
}

.profile-rank { margin-bottom: 10px; }
.dashboard-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mini-stat-box { padding: 16px; }
.status-list-clean div,
.controls-list div,
.system-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
}

.status-list-clean div:last-child,
.controls-list div:last-child,
.system-item:last-child { border-bottom: 0; }
.status-list-clean span,
.controls-list span,
.sys-name { color: var(--muted); }
.good-text,
.sys-state.good { color: var(--green); }

.module-grid,
.features-row,
.stats-grid {
  display: grid;
  gap: 18px;
}

.module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-card {
  text-decoration: none;
  color: inherit;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.module-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.module-card span { display: inline-block; margin-bottom: 16px; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 0.14em; }
.module-card p { margin: 10px 0 0; }
.module-card-blue:hover { box-shadow: 0 14px 30px rgba(78, 161, 255, 0.16); }
.module-card-green:hover { box-shadow: 0 14px 30px rgba(49, 208, 109, 0.16); }
.module-card-purple:hover { box-shadow: 0 14px 30px rgba(169, 112, 255, 0.16); }
.module-card-red:hover { box-shadow: 0 14px 30px rgba(239, 68, 68, 0.16); }
.dashboard-note-item { padding: 18px; }
.dashboard-note-item p { margin: 10px 0 0; }

/* ORIGINAL/GAME AREA */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 50%, rgba(78, 161, 255, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(169, 112, 255, 0.08), transparent 25%);
}

.top-nav {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  padding: 0 32px;
  height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand { gap: 12px; font-weight: 800; font-size: 16px; letter-spacing: 0.08em; justify-self: start; }
.nav-links { display: flex; gap: 12px; justify-self: center; align-items: center; }
.header-menu { justify-self: end; position: relative; }
.header-menu summary { list-style: none; }
.header-menu summary::-webkit-details-marker { display: none; }
.header-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.header-menu-trigger:hover,
.header-menu[open] .header-menu-trigger {
  transform: translateY(-1px);
  border-color: rgba(78, 161, 255, 0.32);
  background: linear-gradient(180deg, rgba(78, 161, 255, 0.16), rgba(255,255,255,0.05));
  box-shadow: 0 14px 28px rgba(0,0,0,0.2);
}
.header-menu-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(14, 18, 28, 0.98), rgba(8, 10, 18, 0.98));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 22px 42px rgba(0,0,0,0.34);
}
.header-menu-label {
  padding: 10px 12px 12px;
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  font-weight: 700;
}
.header-menu-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.header-menu-action:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(78, 161, 255, 0.24);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 24px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px;
  min-height: calc(100vh - 72px);
}

.panel {
  border-radius: 20px;
  padding: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.panel-header h2,
.hero-panel h1,
.feature-card h3,
.game-stage-header h2 {
  margin: 0;
}

.profile-main { gap: 16px; margin-bottom: 32px; }
.player-name { font-size: 18px; font-weight: 700; }
.player-title { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 18px; font-weight: 700; }

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 48px;
}
.hero-content { position: relative; z-index: 2; max-width: 600px; }
.status-badge {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 24px;
}
.hero-panel h1 { font-size: 48px; line-height: 1.1; margin-bottom: 24px; letter-spacing: -0.02em; }
.hero-panel p { font-size: 16px; color: var(--muted); line-height: 1.6; margin: 0 0 32px; }
.action-row { display: flex; gap: 16px; }
.btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary {
  background: var(--blue);
  color: white;
  border: 1px solid var(--blue);
  box-shadow: 0 4px 14px var(--shadow-blue);
}
.btn-primary:hover { background: #3a8ce8; box-shadow: 0 6px 20px var(--shadow-blue); transform: translateY(-2px); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-secondary:hover { background: rgba(255,255,255,0.06); border-color: var(--line-strong); }
.hero-graphics {
  position: absolute;
  right: -100px;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78,161,255,0.14) 0%, transparent 70%);
  z-index: 1;
}

.status-indicator {
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green);
}
.mt-4 { margin-top: 32px; }
.news-card { padding: 16px; }
.news-date { font-size: 12px; color: var(--blue); margin-bottom: 8px; font-weight: 700; }
.news-text { font-size: 14px; line-height: 1.5; color: var(--muted); }
.features-row { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-card { display: flex; flex-direction: column; gap: 16px; }
.feat-icon { width: 40px; height: 40px; border-radius: 10px; }
.feat-icon.blue { background: rgba(78, 161, 255, 0.1); border: 1px solid var(--blue); }
.feat-icon.green { background: rgba(49, 208, 109, 0.1); border: 1px solid var(--green); }
.feat-icon.purple { background: rgba(169, 112, 255, 0.1); border: 1px solid var(--purple); }
.feature-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }

.game-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.game-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 348px;
  gap: 20px;
  padding: 18px 24px 24px;
  width: min(1720px, 100%);
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
}

.game-layout-refined {
  height: calc(100vh - 82px);
  align-items: stretch;
}

.game-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.game-left-sidebar,
.game-right-sidebar {
  justify-content: flex-start;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  box-shadow: 0 12px 28px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.back-btn-compact {
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.back-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(78, 161, 255, 0.3);
  background: linear-gradient(180deg, rgba(78, 161, 255, 0.16), rgba(255,255,255,0.04));
  box-shadow: 0 16px 32px rgba(0,0,0,0.24), 0 0 0 1px rgba(78, 161, 255, 0.08);
}

.back-btn:active {
  transform: translateY(1px) scale(0.985);
}

.panel-box {
  border-radius: 22px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(12, 15, 24, 0.88), rgba(7, 9, 16, 0.92));
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.panel-box h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}

.panel-box-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.66);
  margin-bottom: 10px;
}

.area-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.current-area-line {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  color: #ffffff;
}

.profile-launch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.profile-launch-card:hover {
  transform: translateY(-2px);
  border-color: rgba(78, 161, 255, 0.28);
  background: linear-gradient(180deg, rgba(15, 24, 40, 0.96), rgba(8, 11, 18, 0.96));
}

.profile-launch-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-launch-copy strong {
  font-size: 20px;
  line-height: 1.1;
  color: #fff;
}

.profile-launch-copy span:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.profile-launch-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  background: rgba(78, 161, 255, 0.12);
  border: 1px solid rgba(78, 161, 255, 0.16);
  color: #dceeff;
  font-size: 20px;
  font-weight: 800;
}

.radio-card {
  display: grid;
  gap: 14px;
}

.radio-player-shell {
  display: grid;
  gap: 10px;
}

.radio-now-playing {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  line-height: 1.4;
  word-break: break-word;
}

.radio-player {
  width: 100%;
  height: 40px;
}

.radio-track-list {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
  padding-right: 4px;
}

.radio-track {
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.84);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.radio-track:hover,
.radio-track.active {
  transform: translateY(-1px);
  background: rgba(78, 161, 255, 0.12);
  border-color: rgba(78, 161, 255, 0.22);
  color: #fff;
}

.radio-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.game-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(5,7,12,0.96), rgba(2,3,6,0.98));
}

.refined-stage {
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 28px 64px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
}

.game-canvas-wrap,
.refined-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 0;
  background: #020307;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.dialog-box {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px 18px;
  background: rgba(9, 10, 14, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
}

.dialog-box.hidden { display: none; }
.dialog-title { font-weight: 800; margin-bottom: 4px; }
.dialog-text { color: var(--text); }
.dialog-hint { margin-top: 8px; color: var(--muted); font-size: 12px; }

.refined-joypad-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 18px 16px;
}

.joypad-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.joypad-head-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.joypad-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 18px;
  align-items: center;
}

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  grid-template-rows: repeat(3, 42px);
  gap: 5px;
  justify-content: center;
  margin: 0;
}

.pad-btn {
  background: linear-gradient(180deg, #1b1d2a, #121521);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: var(--text);
  font-size: 17px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pad-btn:hover,
.round-btn:hover,
.mini-btn:hover {
  transform: translateY(-1px);
}

.pad-btn:active,
.pad-btn.active {
  background: rgba(78, 161, 255, 0.8);
  border-color: rgba(78, 161, 255, 0.9);
}

.pad-up { grid-column: 2; grid-row: 1; }
.pad-left { grid-column: 1; grid-row: 2; }
.pad-center { grid-column: 2; grid-row: 2; cursor: default; }
.pad-right { grid-column: 3; grid-row: 2; }
.pad-down { grid-column: 2; grid-row: 3; }

.joypad-actions-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.action-row.pad-action,
.compact-pad-action {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 0;
}

.round-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(180deg, #1b1d2a, #11131d);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  font-weight: 800;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.round-btn:active,
.round-btn.active {
  background: rgba(49, 208, 109, 0.8);
  border-color: rgba(49, 208, 109, 0.92);
}

.mini-controls,
.compact-mini-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  margin: 0;
}

.mini-btn {
  width: 100%;
  padding: 9px 12px;
  background: linear-gradient(180deg, #181b27, #11131d);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.mini-btn:active,
.mini-btn.active {
  background: #f5f7fb;
  color: #000;
}

.joypad-controls-embed {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 14px;
}

.controls-list,
.compact-controls-list {
  display: grid;
  gap: 0;
}

.controls-list div,
.compact-controls-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}

.controls-list div:last-child,
.compact-controls-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.controls-list span,
.compact-controls-list span {
  color: var(--muted);
}

.controls-list strong,
.compact-controls-list strong {
  color: #fff;
  font-size: 13px;
}

.profile-shell {
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 22px 24px 28px;
}

.profile-page-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
}

.profile-card,
.profile-stats-panel,
.profile-section-panel {
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(11, 14, 23, 0.9), rgba(7, 9, 16, 0.96));
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 22px 56px rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,255,255,0.03);
}

.profile-card {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.profile-card-avatar {
  width: 86px;
  height: 86px;
  border-radius: 24px;
  background: radial-gradient(circle at 35% 35%, rgba(124, 192, 255, 0.9), rgba(34, 88, 160, 0.75) 50%, rgba(10, 18, 42, 0.92));
  box-shadow: 0 0 0 1px rgba(124,192,255,0.24), 0 18px 42px rgba(29, 82, 171, 0.28);
}

.profile-card-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-card-head h1,
.profile-section-head h2 {
  margin: 0;
}

.profile-card-subline,
.profile-section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.profile-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.84);
  font-size: 12px;
  font-weight: 700;
}

.profile-meta-list {
  display: grid;
  gap: 12px;
}

.profile-meta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.profile-meta-item span { color: var(--muted); }
.profile-meta-item strong { color: #fff; }

.profile-main-stack {
  display: grid;
  gap: 24px;
}

.profile-stats-panel,
.profile-section-panel {
  padding: 24px;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.profile-stat-card {
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(15, 18, 30, 0.96), rgba(8, 10, 17, 0.96));
  border: 1px solid rgba(255,255,255,0.06);
}

.profile-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.profile-stat-card strong {
  display: block;
  color: #fff;
  font-size: 28px;
  line-height: 1.05;
}

.profile-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.profile-detail-card {
  border-radius: 22px;
  padding: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}

.profile-detail-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.72);
}

.profile-detail-list {
  display: grid;
  gap: 12px;
}

.profile-detail-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.profile-detail-list span { color: var(--muted); }
.profile-detail-list strong { color: #fff; }

@media (max-width: 1380px) {
  .game-layout {
    grid-template-columns: 240px minmax(0, 1fr) 320px;
    padding: 16px 18px 18px;
    gap: 16px;
  }

  .profile-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .game-body {
    overflow: auto;
  }

  .game-layout-refined {
    height: auto;
  }

  .game-layout {
    grid-template-columns: 1fr;
  }

  .game-stage {
    min-height: 68vh;
  }

  .profile-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .joypad-grid,
  .profile-split-grid,
  .profile-stat-grid {
    grid-template-columns: 1fr;
  }

  .game-stage {
    min-height: 56vh;
  }

  .controls-list div,
  .compact-controls-list div,
  .profile-detail-list div,
  .profile-meta-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-shell,
  .game-layout {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 1200px) {
  .auth-shell,
  .dashboard-main-grid,
  .dashboard-hero-card,
  .dashboard-grid,
  .game-layout,
  .features-row { grid-template-columns: 1fr; }
  .hero-panel { min-height: 400px; }
  .hero-graphics { display: none; }
  .nexus-nav,
  .nav-links { display: none; }

  .top-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 12px;
  }

  .header-menu {
    justify-self: end;
  }
}

@media (max-width: 820px) {
  .auth-page-body,
  .nexus-dashboard-wrap,
  .game-layout { padding-left: 16px; padding-right: 16px; }
  .auth-showcase,
  .auth-panel,
  .dashboard-hero-card,
  .dashboard-card,
  .panel,
  .panel-box { padding: 20px; }
  .auth-showcase { min-height: auto; }
  .auth-rule-grid,
  .module-grid,
  .dashboard-mini-grid,
  .stats-grid { grid-template-columns: 1fr; }
  .nexus-topbar,
  .top-nav { padding-left: 16px; padding-right: 16px; }

  .top-nav {
    grid-template-columns: 1fr;
    height: auto;
    padding-top: 16px;
    padding-bottom: 16px;
    justify-items: stretch;
  }

  .brand,
  .header-menu {
    justify-self: stretch;
  }

  .header-menu-trigger {
    width: 100%;
  }
  .game-stage-header,
  .panel-card-head-inline,
  .brand-shell { align-items: flex-start; }
  .game-stage-header,
  .panel-card-head-inline { flex-direction: column; }
}

/* AUTH REDESIGN */
.auth-page-body {
  padding: 24px;
  align-items: stretch;
}

.auth-shell-redesign {
  width: min(1380px, 100%);
  min-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(420px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.auth-showcase,
.auth-panel-redesign {
  border-radius: 32px;
}

.auth-showcase {
  position: relative;
  padding: 34px;
  min-height: 760px;
  display: grid;
  gap: 22px;
  background:
    linear-gradient(180deg, rgba(13, 16, 26, 0.9), rgba(7, 9, 16, 0.88)),
    radial-gradient(circle at top left, rgba(78, 161, 255, 0.18), transparent 38%),
    radial-gradient(circle at bottom right, rgba(169, 112, 255, 0.16), transparent 34%),
    rgba(8, 10, 18, 0.84);
}

.auth-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(135deg, rgba(255,255,255,0.02), transparent 45%);
  pointer-events: none;
}

.auth-showcase-head,
.auth-password-box-redesign,
.auth-panel-head,
.auth-form-redesign,
.auth-form-footer,
.auth-scene-content {
  position: relative;
  z-index: 1;
}

.auth-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-badge-ghost {
  color: #d7def4;
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
}

.auth-showcase-copy-wrap {
  max-width: 720px;
}

.auth-kicker,
.auth-panel-kicker,
.auth-scene-label {
  display: inline-block;
  margin-bottom: 14px;
  color: #b7c7ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-showcase-title {
  max-width: 14ch;
  font-size: clamp(3rem, 5vw, 5.4rem);
  line-height: 0.92;
  margin: 0 0 16px;
  text-wrap: balance;
}

.auth-showcase-copy {
  max-width: 58ch;
  margin: 0;
  font-size: 1.04rem;
  color: #b8c0d0;
}

.auth-rule-grid-redesign {
  margin: 0;
}

.auth-rule-grid-redesign .auth-rule-card {
  padding: 18px 18px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border-color: rgba(255,255,255,0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.auth-scene-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(4, 6, 12, 0.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 24px 54px rgba(0,0,0,0.32);
}

.auth-scene-map,
.auth-scene-overlay {
  position: absolute;
  inset: 0;
}

.auth-scene-map {
  background: url('assets/maps/new_bark_town.png') center/cover no-repeat;
  image-rendering: pixelated;
  transform: scale(1.04);
  filter: saturate(1.2) contrast(1.06);
}

.auth-scene-overlay {
  background:
    linear-gradient(180deg, rgba(3,5,10,0.16), rgba(3,5,10,0.72)),
    radial-gradient(circle at top right, rgba(78, 161, 255, 0.22), transparent 36%);
}

.auth-scene-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.auth-scene-meta strong {
  display: block;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
}

.auth-scene-team {
  display: inline-flex;
  align-items: flex-end;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  align-self: flex-start;
  background: rgba(8, 10, 16, 0.74);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}

.auth-scene-sprite {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.45));
}

.auth-scene-sprite-main {
  width: 42px;
  height: 42px;
}

.auth-password-box-redesign {
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
}

.auth-password-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.auth-password-copy {
  margin: 8px 0 0;
  max-width: 48ch;
  color: var(--muted);
  line-height: 1.7;
}

.auth-status-stack {
  display: grid;
  gap: 10px;
}

.auth-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(49, 208, 109, 0.12);
  color: #8effb2;
  border: 1px solid rgba(49, 208, 109, 0.18);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.password-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.password-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #eff3ff;
  font-size: 13px;
  font-weight: 700;
}

.auth-panel-redesign {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background:
    linear-gradient(180deg, rgba(10, 12, 19, 0.92), rgba(7, 8, 14, 0.9)),
    rgba(8, 10, 16, 0.88);
}

.auth-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.auth-title {
  max-width: 14ch;
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 0.94;
}

.auth-subtitle {
  margin: 0;
  max-width: 40ch;
  font-size: 0.98rem;
}

.auth-mode-chip {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #f8fbff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-tabs-redesign {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 6px;
  margin-bottom: 22px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.auth-tabs-redesign .auth-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 14px;
  padding: 12px 14px;
  text-align: center;
}

.auth-form-redesign {
  gap: 16px;
  margin-top: 2px;
}

.input-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.input-inline-link,
.auth-form-footer a {
  color: #b7c7ff;
  text-decoration: none;
  font-weight: 700;
}

.input-inline-link:hover,
.auth-form-footer a:hover {
  color: #fff;
}

.auth-input {
  min-height: 58px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.3);
}

.auth-btn {
  min-height: 58px;
  border-radius: 16px;
  margin-top: 2px;
}

.auth-two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.auth-inline-note,
.auth-form-footer {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-inline-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.auth-form-footer {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.reset-code-box {
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
}

@media (max-width: 1200px) {
  .auth-shell-redesign {
    min-height: auto;
  }

  .auth-showcase {
    min-height: 620px;
  }
}

@media (max-width: 820px) {
  .auth-page-body {
    padding: 16px;
  }

  .auth-showcase,
  .auth-panel-redesign {
    padding: 22px;
    border-radius: 26px;
  }

  .auth-showcase-title,
  .auth-title {
    max-width: none;
  }

  .auth-panel-head,
  .auth-password-header,
  .input-row-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-tabs-redesign,
  .auth-two-col-grid {
    grid-template-columns: 1fr;
  }

  .auth-scene-card {
    min-height: 220px;
  }

  .auth-scene-team {
    gap: 10px;
  }
}
/* --- NEW AUTH PORTAL STYLES --- */
.auth-center-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 10;
}

.auth-box {
  width: 100%;
  max-width: 420px;
  padding: 40px 32px;
  text-align: center;
}

.auth-logo {
  font-size: 24px;
  font-weight: 900;
  font-family: var(--font-heavy);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.auth-desc {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.auth-pill-tabs {
  display: flex;
  background: rgba(0,0,0,0.4);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 32px;
  border: 1px solid var(--line);
}

.auth-pill {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  transition: 0.2s ease;
}

.auth-pill:hover {
  color: var(--text);
}

.auth-pill.active-login { background: var(--blue); color: #fff; box-shadow: 0 4px 12px var(--shadow-blue); }
.auth-pill.active-register { background: var(--green); color: #fff; box-shadow: 0 4px 12px var(--shadow-green); }
.auth-pill.active-reset { background: var(--purple); color: #fff; box-shadow: 0 4px 12px var(--shadow-purple); }

.auth-field {
  text-align: left;
  margin-bottom: 20px;
}

.auth-field label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 8px;
}

.auth-field .opt {
  color: rgba(255,255,255,0.3);
  font-weight: 400;
}

.auth-field input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  transition: 0.2s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--text);
  background: rgba(0,0,0,0.5);
}

.auth-field input.mono {
  font-family: monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 16px;
}

.auth-submit {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: 0.2s ease;
  margin-top: 10px;
}

.btn-login { background: var(--blue); box-shadow: 0 4px 15px var(--shadow-blue); }
.btn-register { background: var(--green); box-shadow: 0 4px 15px var(--shadow-green); }
.btn-reset { background: var(--purple); box-shadow: 0 4px 15px var(--shadow-purple); }

.auth-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.auth-notice {
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.notice-err { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; }
.notice-ok { background: rgba(49, 208, 109, 0.1); border: 1px solid rgba(49, 208, 109, 0.3); color: #86efac; }

.code-reveal {
  margin-top: 12px;
  padding: 12px;
  background: rgba(0,0,0,0.5);
  border-radius: 8px;
  border: 1px dashed var(--green);
  text-align: center;
}

.code-reveal span { display: block; font-size: 11px; text-transform: uppercase; margin-bottom: 4px; color: var(--green); }
.code-reveal strong { font-family: monospace; font-size: 18px; letter-spacing: 2px; color: #fff; }