

:root {
  color-scheme: dark;
  --bg: #05070c;
  --surface: rgba(9, 14, 22, 0.92);
  --surface-2: rgba(13, 22, 33, 0.9);
  --surface-3: rgba(18, 30, 43, 0.88);
  --line: rgba(114, 238, 255, 0.16);
  --line-strong: rgba(114, 238, 255, 0.34);
  --text: #edf9ff;
  --muted: #8aa7b6;
  --subtle: #5f7786;
  --teal: #32f5ff;
  --green: #74f2a1;
  --gold: #f6c85f;
  --coral: #ff6e66;
  --blue: #83a9ff;
  --violet: #ac7cff;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.42);
  --radius: 8px;
}

/* ================= INTRO PAGE CODES (DARK THEME) ================= */


/* ================= GLOBAL STYLES & RESET ================= */
* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(50, 245, 255, 0.08), transparent 34%),
    linear-gradient(120deg, rgba(172, 124, 255, 0.08), transparent 40%),
    linear-gradient(300deg, rgba(246, 200, 95, 0.06), transparent 30%),
    var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(114, 238, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114, 238, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 80%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 40px;
}

.system-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.system-bg span {
  display: none !important;
}



@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(50, 245, 255, 0); }
  50% { box-shadow: 0 0 34px rgba(50, 245, 255, 0.16); }
}

@keyframes borderSweep {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(110%); }
}

.shell {
  width: min(1280px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 9, 15, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 12px;
  z-index: 20;
}

.brand-block,
.top-actions,
.panel-head,
.section-head,
.hunter-card,
.level-line,
.storage-row,
.record-top,
.tab,
.exercise-top,
.routine-meta,
.quest-top,
.metric-row {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 12px;
  min-width: 220px;
}

/* ================= HEADER ALIGNMENT ================= */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ================= LOGO BOX ================= */

.brand-mark {
  width: 44px;
  height: 44px;

  border: 1px solid rgba(50, 245, 255, 0.56);
  border-radius: var(--radius);

  background:
    linear-gradient(135deg, rgba(50, 245, 255, 0.24), transparent 55%),
    linear-gradient(315deg, rgba(246, 200, 95, 0.2), transparent 55%),
    #08101a;

  position: relative;
  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  animation: pulseGlow 3.5s ease-in-out infinite;
}

/* ================= LOGO IMAGE (FIXED CENTER) ================= */

.brand-mark img {
  width: 70%;
  height: 70%;
  object-fit: contain;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  z-index: 2;

  filter: drop-shadow(0 0 6px rgba(50, 245, 255, 0.7));
}

/* ================= NEON FRAME (YOUR ORIGINAL DESIGN KEPT SAFE) ================= */

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 10px;

  border: 2px solid var(--teal);
  transform: rotate(45deg);

  z-index: 1;
}

.brand-mark::after {
  inset: 16px;
  border-color: var(--gold);
}

/* ================= OPTIONAL: TEXT STYLES (if needed) ================= */

.eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(0, 255, 255, 0.8);
  margin: 0;
}

h1 {
  margin: 0;
}

.eyebrow {
  font-family: "Orbitron", sans-serif;
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(25px, 3.4vw, 42px);
  line-height: 1.05;
}

.section-head h2 {
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-shadow: 
    0 0 8px rgba(181, 87, 255, 0.45), 
    0 0 18px rgba(181, 87, 255, 0.2);
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.panel-head h3 {
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 0 0 6px rgba(181, 87, 255, 0.35);
}

.muted {
  margin-bottom: 0;
  color: var(--muted);
}

.system-line {
  margin: 8px 0 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.top-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(246, 200, 95, 0.13);
}

.status-dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(116, 242, 161, 0.13);
}

.status-pill svg {
  width: 16px;
  height: 16px;
}

.icon-button,
.primary-action,
.danger-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid rgba(181, 87, 255, 0.3) !important;
  color: #df80ff !important;
  background: rgba(181, 87, 255, 0.05) !important;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.icon-button {
  padding: 8px 12px;
}

.icon-button.secondary,
.ghost-action {
  color: rgba(223, 128, 255, 0.8) !important;
  border: 1px solid rgba(181, 87, 255, 0.25) !important;
}

.icon-button:hover:not(:disabled),
.primary-action:hover:not(:disabled),
.danger-action:hover:not(:disabled),
.ghost-action:hover:not(:disabled) {
  border-color: #df80ff !important;
  background: rgba(181, 87, 255, 0.18) !important;
  color: #ffffff !important;
  box-shadow: 0 0 15px rgba(181, 87, 255, 0.4) !important;
  transform: translateY(-2px) scale(1.02) !important;
}

.icon-button svg,
.primary-action svg,
.danger-action svg,
.ghost-action svg,
.tab svg,
.panel-head svg,
.metric-icon svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(8, 13, 21, 0.82);
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease !important;
}

.tab.is-active {
  color: #ffffff !important;
  border-color: transparent;
  background: linear-gradient(135deg, #b557ff, #df80ff) !important;
  box-shadow: 0 0 12px rgba(181, 87, 255, 0.3) !important;
}

.view {
  display: none;
  content-visibility: hidden;
}

.view.is-active {
  display: block;
  content-visibility: visible;
}

.system-hero,
.panel,
.metric-card,
.week-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.system-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(290px, 0.86fr) minmax(230px, 0.62fr);
  gap: 14px;
  padding: 16px;
  overflow: hidden;
  position: relative;
}
/* Sweeping panel accent disabled */

.hunter-card {
  justify-content: space-between;
  gap: 18px;
  min-height: 142px;
}

.rank-emblem {
  display: grid;
  place-items: center;
  width: 96px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--gold);
  color: var(--gold);
  background:
    radial-gradient(circle at center, rgba(246, 200, 95, 0.22), transparent 62%),
    #071019;
  font-size: 48px;
  font-weight: 950;
  animation: pulseGlow 3s ease-in-out infinite;
}

.profile-aura {
  display: grid;
  place-items: center;
  width: 84px;
  aspect-ratio: 1;
  border: 1px solid rgba(50, 245, 255, 0.6);
  border-radius: 50%;
  color: var(--teal);
  background:
    radial-gradient(circle, rgba(50, 245, 255, 0.22), transparent 58%),
    linear-gradient(135deg, rgba(172, 124, 255, 0.22), transparent),
    #071019;
  box-shadow: inset 0 0 24px rgba(50, 245, 255, 0.12), 0 0 34px rgba(50, 245, 255, 0.16);
  font-size: 34px;
  font-weight: 950;
  flex: 0 0 auto;
}

.profile-system-message {
  padding: 20px !important;
}

.quote-line {
  margin: 12px 0 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  transition: opacity 0.5s ease-in-out;
}

.quote-line.fade-out {
  opacity: 0;
}

.level-card,
.today-gate {
  align-self: stretch;
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(131, 169, 255, 0.16), transparent 55%),
    rgba(255, 255, 255, 0.035);
}

.today-gate {
  background:
    linear-gradient(135deg, rgba(246, 200, 95, 0.16), transparent 60%),
    rgba(255, 255, 255, 0.035);
}

.level-line {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 800;
}

.meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b557ff, #df80ff) !important;
  box-shadow: 0 0 10px rgba(181, 87, 255, 0.6) !important;
  transition: width 300ms ease;
}

.xp-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.xp-breakdown span {
  display: block;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.metric-card {
  min-height: 116px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(181, 87, 255, 0.15), transparent 56%);
  opacity: 0.8;
}

.metric-row {
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  color: #df80ff !important;
  background: rgba(181, 87, 255, 0.2) !important;
  border: 1px solid rgba(181, 87, 255, 0.45) !important;
  box-shadow: 0 0 12px rgba(181, 87, 255, 0.3) !important;
}

.metric-value {
  display: block;
  margin-top: 18px;
  font-family: "Orbitron", sans-serif;
  font-size: 27px;
  font-weight: 950;
  line-height: 1;
  position: relative;
}

.metric-label {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  position: relative;
}

.dashboard-grid,
.profile-grid,
.routine-layout,
.rewards-layout,
.progress-grid,
.settings-grid {
  display: grid;
  gap: 20px;
}

.dashboard-grid,
.profile-grid,
.routine-layout,
.rewards-layout,
.settings-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
}

.routine-layout.lower-routine {
  margin-top: 20px;
}

.profile-grid {
  margin-bottom: 14px;
}

.progress-grid {
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
}

.panel,
.glow-panel {
  overflow: clip;
  position: relative;
}

.panel-head {
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.panel-head svg {
  color: var(--teal);
}

.small-action {
  min-height: 38px;
  padding: 0 11px;
}

.routine-stack,
.quest-list {
  display: grid;
  gap: 12px;
  padding: 16px 20px;
}

.routine-section {
  display: grid;
  gap: 10px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--teal);
  box-shadow: 0 0 12px var(--teal);
}

.section-title.gold::before { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.section-title.blue::before { background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.section-title.coral::before { background: var(--coral); box-shadow: 0 0 12px var(--coral); }

.exercise-card,
.quest-card,
.day-summary,
.record-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 20, 31, 0.86);
}

.exercise-card {
  padding: 8px 10px !important;
  margin-bottom: 8px !important;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.exercise-card.is-complete {
  border-color: rgba(223, 128, 255, 0.8) !important;
  background: linear-gradient(135deg, rgba(28, 14, 58, 0.85) 0%, rgba(12, 6, 26, 0.96) 100%) !important;
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.6), 
    inset 0 0 25px rgba(181, 87, 255, 0.15),
    0 0 22px rgba(181, 87, 255, 0.25) !important;
}

.exercise-top {
  justify-content: space-between;
  gap: 10px;
}

.exercise-name {
  margin: 0;
  font-size: 14px !important;
  font-weight: 900;
}

.exercise-target {
  margin: 2px 0 0 !important;
  color: var(--muted);
  font-size: 12px !important;
}

.routine-meta {
  gap: 4px !important;
  flex-wrap: wrap;
  margin-top: 6px !important;
}

.xp-chip,
.target-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px !important;
  padding: 2px 6px !important;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 11px !important;
  font-weight: 850;
}

.xp-chip {
  color: var(--gold);
  border-color: rgba(246, 200, 95, 0.34);
}

.set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 6px !important;
  margin-top: 8px !important;
}

.set-btn {
  min-height: 38px;
  border: 1px solid rgba(181, 87, 255, 0.3) !important;
  border-radius: var(--radius);
  color: #df80ff !important;
  background: rgba(181, 87, 255, 0.05) !important;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.set-btn:hover:not(.is-complete) {
  background: rgba(181, 87, 255, 0.15) !important;
  border-color: rgba(181, 87, 255, 0.7) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(181, 87, 255, 0.25) !important;
}

.set-btn.is-complete {
  color: #ffffff !important;
  border-color: #df80ff !important;
  background: linear-gradient(135deg, #b557ff, #df80ff) !important;
  box-shadow: 0 0 14px rgba(181, 87, 255, 0.6), inset 0 0 8px rgba(255, 255, 255, 0.2) !important;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

.complete-exercise {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(181, 87, 255, 0.4) !important;
  border-radius: var(--radius);
  color: #df80ff !important;
  background: rgba(181, 87, 255, 0.08) !important;
  cursor: pointer;
  white-space: nowrap;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  transition: all 0.2s ease;
}

.complete-exercise:hover:not(.is-complete) {
  background: rgba(181, 87, 255, 0.18) !important;
  border-color: rgba(181, 87, 255, 0.7) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(181, 87, 255, 0.3) !important;
}

.complete-exercise.is-complete {
  color: #ffffff !important;
  border-color: #df80ff !important;
  background: linear-gradient(135deg, #b557ff, #df80ff) !important;
  box-shadow: 0 0 14px rgba(181, 87, 255, 0.6), inset 0 0 8px rgba(255, 255, 255, 0.2) !important;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

.quest-card {
  padding: 8px 10px !important;
}

.quest-card.is-complete {
  border-color: rgba(223, 128, 255, 0.8) !important;
  background: linear-gradient(135deg, rgba(28, 14, 58, 0.85) 0%, rgba(12, 6, 26, 0.96) 100%) !important;
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.6), 
    inset 0 0 25px rgba(181, 87, 255, 0.15),
    0 0 22px rgba(181, 87, 255, 0.25) !important;
}

.quest-top {
  justify-content: space-between;
  gap: 10px;
}

.quest-title {
  margin: 0;
  font-weight: 900;
  font-size: 14px !important;
}

.quest-detail {
  margin: 2px 0 0 !important;
  color: var(--muted);
  font-size: 12px !important;
}

.quest-reward {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.stats-grid,
.inventory-list,
.dungeon-grid,
.store-grid {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.stat-row,
.inventory-item,
.dungeon-card,
.store-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 20, 31, 0.86);
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: 14px 18px !important;
}

.stat-short {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 28px;
  margin-right: 8px;
  border: 1px solid rgba(50, 245, 255, 0.28);
  border-radius: 6px;
  color: var(--teal);
  background: rgba(50, 245, 255, 0.08);
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  font-weight: 950;
}

.stat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-family: "Orbitron", sans-serif;
  font-size: 22px;
  font-weight: 950;
}

.stat-plus {
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 34px;
  border: 1px solid rgba(50, 245, 255, 0.42);
  border-radius: 7px;
  color: #061114;
  background: var(--teal);
  cursor: pointer;
}

.stat-plus:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stat-plus svg {
  width: 16px;
  height: 16px;
}

.inventory-list {
  padding: 14px;
}

.inventory-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.inventory-item > svg {
  width: 26px;
  height: 26px;
  color: var(--gold);
}

.inventory-item strong,
.inventory-item span {
  display: block;
}

.inventory-item span {
  color: var(--muted);
  font-size: 13px;
}

.compact-empty {
  min-height: 92px;
}

.dungeon-grid,
.store-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  padding: 16px 8px;
}

.dungeon-card,
.store-card {
  padding: 18px 20px !important;
  overflow: hidden;
  position: relative;
}

.dungeon-card::before,
.store-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(50, 245, 255, 0.12), transparent 55%);
  opacity: 0.72;
  pointer-events: none;
}

.dungeon-card > *,
.store-card > * {
  position: relative;
}

.dungeon-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.dungeon-rank {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  color: var(--teal);
  font-size: 26px;
  font-weight: 950;
}

.dungeon-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.dungeon-card li + li {
  margin-top: 5px;
}

.rank-d .dungeon-rank { border-color: var(--green); color: var(--green); }
.rank-c .dungeon-rank { border-color: var(--teal); color: var(--teal); }
.rank-b .dungeon-rank { border-color: var(--blue); color: var(--blue); }
.rank-a .dungeon-rank { border-color: var(--violet); color: var(--violet); }
.rank-s .dungeon-rank { border-color: var(--gold); color: var(--gold); }

.is-locked {
  opacity: 0.58;
}

.store-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  border: 1px solid rgba(246, 200, 95, 0.34);
  border-radius: var(--radius);
  color: var(--gold);
  background: rgba(246, 200, 95, 0.08);
}

.store-icon svg {
  width: 26px;
  height: 26px;
}

.storage-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toggle {
  width: 50px;
  height: 30px;
  padding: 3px;
  border: 1px solid rgba(181, 87, 255, 0.4) !important;
  border-radius: 999px;
  background: rgba(181, 87, 255, 0.05) !important;
  cursor: pointer;
  flex: 0 0 auto;
  transition: all 0.2s ease;
}

.toggle:hover {
  border-color: rgba(181, 87, 255, 0.7) !important;
  box-shadow: 0 0 8px rgba(181, 87, 255, 0.3) !important;
}

.toggle span {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(181, 87, 255, 0.4) !important;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.toggle.is-on {
  border-color: #df80ff !important;
  background: rgba(181, 87, 255, 0.18) !important;
  box-shadow: 0 0 10px rgba(181, 87, 255, 0.25) !important;
}

.toggle.is-on span {
  transform: translateX(20px);
  background: #ffffff !important;
  box-shadow: 0 0 8px #df80ff, 0 0 15px #b557ff !important;
}

.section-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 8px 2px 0;
}

.compact-head {
  margin-top: 18px;
}

.week-panel {
  margin-top: 14px;
  padding: 14px;
}

.week-routine {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.day-summary {
  padding: 14px;
}

.day-summary.is-today {
  border-color: rgba(50, 245, 255, 0.58);
  box-shadow: 0 0 28px rgba(50, 245, 255, 0.12);
}

.day-summary ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.day-summary li + li {
  margin-top: 4px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #060d14;
  outline: none;
}

input,
select {
  height: 42px;
  padding: 0 11px;
}

textarea {
  resize: vertical;
  padding: 10px 11px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(50, 245, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(50, 245, 255, 0.12);
}

.primary-action,
.danger-action,
.ghost-action {
  min-height: 44px;
  padding: 0 14px;
  font-weight: 850;
}

.primary-action {
  border-color: rgba(181, 87, 255, 0.8) !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, rgba(181, 87, 255, 0.45) 0%, rgba(223, 128, 255, 0.2) 100%) !important;
  box-shadow: 
    0 4px 15px rgba(181, 87, 255, 0.2), 
    inset 0 0 12px rgba(255, 255, 255, 0.1),
    0 0 10px rgba(181, 87, 255, 0.3) !important;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.danger-action {
  border-color: rgba(255, 110, 102, 0.6) !important;
  color: #ff6e66 !important;
  background: rgba(255, 110, 102, 0.08) !important;
}

.primary-action:disabled,
.danger-action:disabled,
.ghost-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.record-list {
  display: grid;
  gap: 10px;
}

.record-list.compact {
  padding: 16px 20px;
}

.record-card {
  padding: 14px;
}

.record-top {
  justify-content: space-between;
  gap: 12px;
}

.record-title {
  margin: 0;
  font-weight: 950;
}

.record-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.record-notes {
  margin: 10px 0 0;
  color: #c8d8de;
}

.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 850;
}

.delete-btn {
  display: grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  border: 1px solid rgba(255, 110, 102, 0.36);
  border-radius: var(--radius);
  color: var(--coral);
  background: rgba(255, 110, 102, 0.08);
  cursor: pointer;
}

.delete-btn svg {
  width: 16px;
  height: 16px;
}

.empty-state {
  min-height: 190px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
  padding: 20px;
}

.chart-panel {
  min-height: 360px;
}

/* Nutrition Chart Layout & Target Cards */
.nutrition-chart-panel {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 20px !important;
}

.nutrition-chart-panel .panel-head {
  grid-column: span 2;
  margin: -20px -20px 10px -20px;
}

.nutrition-targets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.nutrition-target-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid rgba(181, 87, 255, 0.22) !important;
  background: rgba(181, 87, 255, 0.05) !important;
  box-shadow: inset 0 0 10px rgba(181, 87, 255, 0.05) !important;
  transition: all 0.2s ease;
}

.nutrition-target-card:hover {
  border-color: rgba(181, 87, 255, 0.45) !important;
  background: rgba(181, 87, 255, 0.08) !important;
  box-shadow: 0 0 12px rgba(181, 87, 255, 0.12) !important;
}

.nutrition-target-card svg {
  width: 18px;
  height: 18px;
  color: #df80ff;
  filter: drop-shadow(0 0 4px rgba(223, 128, 255, 0.3));
}

.nutrition-target-card span {
  font-size: 12px;
  color: var(--muted);
  flex: 1;
}

.nutrition-target-card strong {
  font-size: 13px;
  color: #ffffff;
  font-family: "Oxanium", sans-serif;
  font-weight: 700;
}

@media (max-width: 768px) {
  .nutrition-chart-panel {
    grid-template-columns: 1fr;
    padding: 16px !important;
  }
  .nutrition-chart-panel .panel-head {
    grid-column: span 1;
    margin: -16px -16px 10px -16px;
  }
}

.chart {
  display: block;
  width: 100%;
  height: 286px;
  padding: 10px;
}

.chart text {
  fill: var(--muted);
  font-size: 12px;
}

.chart .grid {
  stroke: rgba(255, 255, 255, 0.08);
}

.chart .line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart .area {
  fill: rgba(50, 245, 255, 0.13);
}

.chart .bar {
  fill: var(--gold);
}

.tracker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 14px;
}

.table-wrap {
  overflow-x: auto;
  padding: 14px;
}

.tracker-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  table-layout: fixed;
}

.tracker-table th,
.tracker-table td {
  height: 42px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.tracker-table th:first-child,
.tracker-table td:first-child {
  width: 84px;
  text-align: left;
  color: var(--text);
  font-weight: 850;
}

.tick-box {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(181, 87, 255, 0.4) !important;
  border-radius: 7px;
  color: #df80ff !important;
  background: rgba(181, 87, 255, 0.05) !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tick-box:hover:not(.is-checked) {
  border-color: rgba(181, 87, 255, 0.7) !important;
  box-shadow: 0 0 8px rgba(181, 87, 255, 0.3) !important;
}

.tick-box.is-checked {
  border-color: #df80ff !important;
  background: linear-gradient(135deg, #b557ff, #df80ff) !important;
  box-shadow: 0 0 10px rgba(181, 87, 255, 0.5) !important;
  color: #ffffff !important;
}

.tick-box svg {
  width: 17px;
  height: 17px;
}

.storage-stack {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.storage-row {
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.storage-row strong {
  color: var(--text);
  text-align: right;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: min(430px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(7, 12, 20, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.level-up-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 2, 10, 0.75);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.level-up-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.level-up-card {
  position: relative;
  width: min(460px, 100%);
  padding: 34px 28px;
  border-radius: 3px !important;
  border: 1px solid rgba(181, 87, 255, 0.4) !important;
  text-align: center;
  background: 
      /* Fine grid pattern */
      linear-gradient(rgba(181, 87, 255, 0.05) 1px, transparent 1px) 0 0 / 20px 20px,
      linear-gradient(90deg, rgba(181, 87, 255, 0.05) 1px, transparent 1px) 0 0 / 20px 20px,
      /* Base glassmorphism */
      linear-gradient(135deg, rgba(18, 9, 38, 0.9) 0%, rgba(6, 3, 13, 0.98) 100%) !important;
  box-shadow: 
      0 20px 60px rgba(0, 0, 0, 0.85), 
      inset 0 0 30px rgba(181, 87, 255, 0.12),
      0 0 25px rgba(181, 87, 255, 0.25) !important;
  animation: modalGlowPulse 4s infinite alternate ease-in-out;
  overflow: visible; /* Show floating cyber-rails */
}



.level-up-card .eyebrow {
  color: #df80ff !important;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 3px;
  font-size: 13px;
  text-shadow: 0 0 8px rgba(181, 87, 255, 0.5);
  margin-bottom: 12px;
}

.level-up-card h2 {
  color: #ffffff !important;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 2px;
  font-size: 24px;
  text-shadow: 0 0 12px rgba(181, 87, 255, 0.85);
  margin-bottom: 8px;
}

.level-up-card p {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 14px;
  margin-bottom: 20px;
}

.level-reward-list {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.level-reward-list span {
  display: block;
  padding: 11px 16px;
  border: 1px solid rgba(181, 87, 255, 0.3) !important;
  border-radius: 4px !important;
  color: #ffffff !important;
  background: rgba(181, 87, 255, 0.06) !important;
  font-weight: 700;
  font-size: 14px;
  text-shadow: 0 0 8px rgba(181, 87, 255, 0.4);
  margin-bottom: 6px;
}

#closeLevelUpBtn {
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 28px !important;
  font-size: 13px !important;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: "Orbitron", sans-serif;
  border-radius: 3px !important;
  background: rgba(181, 87, 255, 0.1) !important;
  border: 1px solid rgba(181, 87, 255, 0.5) !important;
  color: #df80ff !important;
  box-shadow: 0 4px 15px rgba(181, 87, 255, 0.15);
  margin-top: 15px;
  transition: all 0.3s ease;
}

#closeLevelUpBtn:hover {
  background: #b557ff !important;
  color: #ffffff !important;
  border-color: #df80ff !important;
  box-shadow: 0 0 15px rgba(181, 87, 255, 0.5) !important;
  transform: translateY(-2px);
}

.modal {
  width: min(430px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
}

.modal-box {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: var(--coral);
  background: rgba(255, 110, 102, 0.1);
}

.modal-icon svg {
  width: 22px;
  height: 22px;
}

.modal-box h3,
.modal-box p {
  margin: 0;
}

.modal-box p {
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1020px) {
  .system-hero,
  .dashboard-grid,
  .profile-grid,
  .routine-layout,
  .rewards-layout,
  .progress-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px !important;
    padding: 6px 8px 12px 8px !important;
    margin: 12px 0 !important;
  }
  .tabs::-webkit-scrollbar {
    display: none !important;
  }

  .tab {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
  }

  .hunter-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .xp-breakdown {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 18px, 1280px);
    padding-top: 10px;
  }

  .top-actions > * {
    flex: 1 1 auto;
  }

  .icon-button span {
    display: none;
  }

  .rank-emblem {
    width: 78px;
    font-size: 36px;
  }

  .metric-grid,
  .form-grid,
  .stats-grid,
  .storage-actions {
    grid-template-columns: 1fr;
  }

  .inventory-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .inventory-item .ghost-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .section-head,
  .panel-head,
  .exercise-top,
  .quest-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .complete-exercise,
  .small-action {
    width: 100%;
  }
}

/* ================= SOLO LEVELING RPG VIOLET THEME OVERRIDES ================= */
:root {
  --bg: #07050d; /* Deep space purple-black */
  --surface: rgba(14, 11, 26, 0.94); /* Translucent dark purple surface */
  --surface-2: rgba(24, 18, 43, 0.85); /* Lighter purple surface */
  --surface-3: rgba(36, 26, 61, 0.8);
  --line: rgba(181, 87, 255, 0.28); /* Glowing purple border */
  --line-strong: rgba(181, 87, 255, 0.5); /* Strong violet border */
  --text: #f5ebff; /* Lavender-white text */
  --muted: #bfa5d8; /* Muted lavender */
  --subtle: #8970a3;
  --teal: #00f0ff; /* Neon blue indicators */
  --violet: #d857ff; /* Vivid violet */
  --coral: #ff6e66;
  --gold: #f6c85f;
  --green: #74f2a1;
  --blue: #83a9ff;
  --glass: rgba(12, 8, 25, 0.72);
  --glass-strong: rgba(18, 12, 38, 0.82);
  --purple-glow: 0 0 20px rgba(181, 55, 255, 0.35);
}

body {
  background:
    linear-gradient(180deg, rgba(161, 44, 255, 0.1) 0%, transparent 40%),
    linear-gradient(120deg, rgba(0, 240, 255, 0.08) 0%, transparent 45%),
    var(--bg);
}

body::before {
  background-image:
    linear-gradient(rgba(181, 87, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181, 87, 255, 0.03) 1px, transparent 1px);
  background-size: 38px 38px;
}



.system-bg span {
  background: linear-gradient(to bottom, transparent, rgba(181, 87, 255, 0.35), transparent);
}

/* ================= SHELL & TAB LAYOUT UPGRADE ================= */
@media (min-width: 1021px) {
  .shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px; /* Narrowed navigation sidebar */
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "topbar topbar"
      "main tabs";
    gap: 20px;
  }
  .topbar {
    grid-area: topbar;
  }
  main {
    grid-area: main;
  }
  .tabs {
    grid-area: tabs;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    align-self: start;
    position: sticky;
    top: 90px;
  }
  .tab, .tab:hover, .tab:active, .tab.is-active {
    transform: none !important;
    animation: none !important;
  }
}

/* Topbar Typography styling */
.system-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.system-chip span {
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: var(--teal);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

#topbarHunter {
  font-family: "Orbitron", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

/* ================= PROFILE HUD GRID ================= */
.profile-hud {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr); /* Balanced left and right column boundaries */
  grid-template-areas: "leftcol midcol";
  gap: 20px;
  align-items: start;
}

.hud-left-col {
  grid-area: leftcol;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hud-mid-col {
  grid-area: midcol;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ================= HUNTER LICENSE / ID CARD ================= */
.player-window {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.profile-id-window {
  display: grid;
  border-radius: 12px;
  border: 2px solid var(--line-strong);
  box-shadow: 0 0 25px rgba(181, 87, 255, 0.22), inset 0 0 30px rgba(181, 87, 255, 0.12);
  background: 
    linear-gradient(135deg, rgba(41, 14, 82, 0.72) 0%, rgba(13, 8, 28, 0.94) 70%),
    repeating-linear-gradient(45deg, rgba(181, 87, 255, 0.03) 0px, rgba(181, 87, 255, 0.03) 2px, transparent 2px, transparent 10px);
  position: relative;
  overflow: hidden;
}
/* Profile ID sweeping light disabled */

.profile-portrait {
  border-radius: 8px;
  border: 2px solid var(--teal);
  background: rgba(181, 87, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.profile-portrait:hover {
  border-color: var(--violet);
  box-shadow: 0 0 20px rgba(181, 87, 255, 0.45);
}

.profile-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
  transition: transform 0.3s ease;
}

.profile-portrait:hover img {
  transform: scale(1.04);
}

.avatar-upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 6, 21, 0.78);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.25s ease;
  color: var(--teal);
}

.profile-portrait:hover .avatar-upload-overlay {
  opacity: 1;
}

.avatar-upload-overlay svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 8px var(--teal));
}

.avatar-upload-overlay span {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.profile-data-panel {
  border: none;
  background: transparent;
  clip-path: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.identity-grid {
  display: grid;
}

.identity-grid span {
  color: var(--muted);
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  border-right: 2px solid var(--line);
  padding-right: 8px;
}

.identity-grid strong {
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-size: 18px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(181, 87, 255, 0.3);
}

#profileRankText {
  color: var(--gold);
  font-family: "Orbitron", sans-serif;
  font-size: 20px;
  font-weight: 950;
  text-shadow: 0 0 12px rgba(246, 200, 95, 0.4);
}

.profile-data-panel .system-line {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 12px;
  color: var(--teal);
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* Desktop layout rules for profile card (Avatar on left, details on right) */
@media (min-width: 1021px) {
  .profile-id-window {
    display: grid !important;
    grid-template-columns: 160px 1fr !important;
    align-items: center !important;
    gap: 24px !important;
    padding: 24px !important;
    min-height: auto;
  }
  .profile-portrait {
    width: 160px !important;
    height: 210px !important;
    margin: 0 !important;
  }
  .profile-data-panel {
    align-items: flex-start !important;
    width: 100% !important;
    text-align: left !important;
  }
  .identity-grid {
    grid-template-columns: 80px 1fr !important;
    gap: 12px 16px !important;
    text-align: left !important;
    margin: 0 !important;
    justify-content: flex-start !important;
  }
  .profile-data-panel .system-line {
    text-align: left !important;
    width: 100% !important;
    max-width: none !important;
    margin: 14px 0 0 !important;
  }
}

/* ================= STATUS & ATTRIBUTES PANEL ================= */
.status-rpg-header {
  background: rgba(181, 87, 255, 0.06);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  margin-bottom: 14px;
}

.rpg-header-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 16px;
}

.rpg-header-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rpg-header-item .label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.1em;
  font-weight: 800;
}

.rpg-header-item .val {
  font-size: 15px;
  font-weight: 900;
  color: var(--teal);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}

/* Two-column stat styling in Attributes card */
.compact-stats {
  padding: 16px;
}

.compact-stats .stat-row {
  background: rgba(28, 20, 48, 0.5);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 60px;
  transition: all 0.2s ease;
}

.compact-stats .stat-row:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0 10px rgba(181, 87, 255, 0.2);
  background: rgba(38, 26, 64, 0.6);
}

.stat-short {
  border-color: rgba(0, 240, 255, 0.4);
  color: var(--teal);
  background: rgba(0, 240, 255, 0.1);
  margin-right: 6px;
}

/* Attributes Grid column sorting for STR, VIT, INT vs AGI, PER */
@media (min-width: 1021px) {
  .stats-grid.compact-stats {
    display: grid;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto auto;
    gap: 12px;
  }
  .stats-grid.compact-stats > div:nth-child(1) { grid-column: 1; grid-row: 1; } /* STR */
  .stats-grid.compact-stats > div:nth-child(4) { grid-column: 1; grid-row: 2; } /* VIT */
  .stats-grid.compact-stats > div:nth-child(3) { grid-column: 1; grid-row: 3; } /* INT */
  .stats-grid.compact-stats > div:nth-child(2) { grid-column: 2; grid-row: 1; } /* AGI */
  .stats-grid.compact-stats > div:nth-child(5) { grid-column: 2; grid-row: 2; } /* PER */
  .stats-grid.compact-stats > div:nth-child(6) { grid-column: 2; grid-row: 3; } /* Available Points Card (6th item!) */
}

/* Available Points 6th Position Card Styling */
.available-pts-card {
  background: linear-gradient(135deg, rgba(246, 200, 95, 0.15) 0%, rgba(161, 44, 255, 0.08) 100%) !important;
  border-color: rgba(246, 200, 95, 0.4) !important;
  box-shadow: 0 0 15px rgba(246, 200, 95, 0.1) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.available-pts-card:hover {
  border-color: rgba(246, 200, 95, 0.8) !important;
  box-shadow: 0 0 25px rgba(246, 200, 95, 0.3) !important;
  transform: translateY(-2px);
}

.pts-short {
  border-color: rgba(246, 200, 95, 0.5) !important;
  color: var(--gold) !important;
  background: rgba(246, 200, 95, 0.15) !important;
}

.pts-count {
  font-size: 26px;
  font-weight: 950;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(246, 200, 95, 0.6);
  background: rgba(246, 200, 95, 0.1);
  border: 1px solid rgba(246, 200, 95, 0.3);
  padding: 2px 10px;
  border-radius: 6px;
}

/* ================= WORKOUT STREAK BANNER (LEFT COLUMN) ================= */
.streak-banner-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 110, 102, 0.12), rgba(161, 44, 255, 0.08)) !important;
  border-color: rgba(255, 110, 102, 0.38) !important;
  box-shadow: 0 0 15px rgba(255, 110, 102, 0.08) !important;
}

.streak-banner-card:hover {
  border-color: rgba(255, 110, 102, 0.72) !important;
  box-shadow: 0 0 25px rgba(255, 110, 102, 0.25) !important;
  transform: translateY(-2px);
}

.streak-icon-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 110, 102, 0.15);
  border: 1.5px solid rgba(255, 110, 102, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 8px rgba(255, 110, 102, 0.25);
}

.streak-icon-ring svg {
  width: 20px;
  height: 20px;
  color: var(--coral);
  filter: drop-shadow(0 0 5px var(--coral));
}

.streak-data {
  display: flex;
  flex-direction: column;
}

.streak-data .value {
  font-size: 26px;
  font-weight: 950;
  color: #ffffff;
  line-height: 1.1;
  text-shadow: 0 0 10px rgba(255, 110, 102, 0.4);
}

.streak-data .label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.08em;
  font-weight: 800;
}

/* ================= HUD MID COLUMN BOTTOM (METRICS & STATUS) ================= */
@media (min-width: 1021px) {
  .hud-mid-col-bottom {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }
  
  .mini-metrics {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
    margin: 0 !important;
    width: 100% !important;
  }
}

.compact-icon-metric {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  min-height: 54px !important;
  text-align: center !important;
}

.compact-icon-metric .metric-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
}

.compact-icon-metric .metric-icon svg {
  width: 22px !important;
  height: 22px !important;
  color: #df80ff !important;
}

.compact-icon-metric .metric-value {
  font-size: 17px !important;
  font-weight: 800 !important;
  font-family: 'Orbitron', 'Oxanium', sans-serif !important;
  color: #ffffff !important;
  line-height: 1 !important;
  margin: 0 !important;
}

/* ================= NETMARBLE RPG GLASSMORPHIC EFFECTS ================= */
.topbar,
.panel,
.level-card,
.system-message,
.system-notification,
.metric-card,
.tab,
.streak-banner-card,
.profile-id-window,
.dungeon-card,
.store-card,
.stat-row,
.exercise-card,
.quest-card,
.day-summary,
.record-card {
  position: relative !important;
  border-radius: 4px !important;
  border: 1px solid rgba(181, 87, 255, 0.38) !important;
  background: 
      /* Subtle Grid Pattern */
      linear-gradient(rgba(181, 87, 255, 0.03) 1px, transparent 1px) 0 0 / 22px 22px,
      linear-gradient(90deg, rgba(181, 87, 255, 0.03) 1px, transparent 1px) 0 0 / 22px 22px,
      /* Translucent base glassmorphic gradient */
      linear-gradient(135deg, rgba(18, 9, 38, 0.42) 0%, rgba(6, 3, 13, 0.65) 100%) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.55), 
    inset 0 0 20px rgba(255, 255, 255, 0.05),
    0 0 18px rgba(181, 87, 255, 0.08) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow: visible !important;
}

/* Hover glowing effects for glassmorphic elements */
.panel:hover,
.level-card:hover,
.system-message:hover,
.system-notification:hover,
.metric-card:hover,
.streak-banner-card:hover,
.profile-id-window:hover,
.dungeon-card:hover,
.store-card:hover,
.stat-row:hover,
.exercise-card:hover,
.quest-card:hover,
.day-summary:hover,
.record-card:hover {
  border-color: rgba(181, 87, 255, 0.58) !important;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.65), 
    inset 0 0 20px rgba(255, 255, 255, 0.08),
    0 0 26px rgba(181, 87, 255, 0.25) !important;
  transform: translateY(-2px);
}



.tab.is-active {
  color: #ffffff !important;
  border-color: rgba(223, 128, 255, 0.8) !important;
  background: linear-gradient(135deg, rgba(181, 87, 255, 0.5), rgba(223, 128, 255, 0.35)) !important;
  box-shadow: 0 0 20px rgba(181, 87, 255, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.15) !important;
}

.tab:hover:not(.is-active) {
  border-color: rgba(181, 87, 255, 0.7) !important;
  background: rgba(181, 87, 255, 0.1) !important;
}

/* ================= SYSTEM MESSAGES & NOTIFICATION PANELS ================= */
.notification-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.notification-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(28, 20, 48, 0.4);
  border-left: 3px solid var(--subtle);
  font-size: 13px;
  line-height: 1.45;
}

.notification-item p {
  margin: 0;
  color: var(--text);
}

.notification-item.type-warning {
  border-left-color: var(--gold);
  background: rgba(246, 200, 95, 0.05);
}

.notification-item.type-warning svg {
  color: var(--gold);
}

.notification-item.type-success {
  border-left-color: var(--green);
  background: rgba(116, 242, 161, 0.05);
}

.notification-item.type-success svg {
  color: var(--green);
}

.notification-item.type-info {
  border-left-color: var(--teal);
  background: rgba(0, 240, 255, 0.05);
}

.notification-item.type-info svg {
  color: var(--teal);
}

.notification-item.type-system {
  border-left-color: var(--violet);
  background: rgba(216, 87, 255, 0.05);
}

.notification-item.type-system svg {
  color: var(--violet);
}

.notification-item.type-muted {
  border-left-color: var(--subtle);
  background: rgba(255, 255, 255, 0.01);
}

.notification-item.type-muted svg {
  color: var(--muted);
}

.notification-item.type-danger {
  border-left-color: var(--coral);
  background: rgba(255, 110, 102, 0.05);
}

.notification-item.type-danger svg {
  color: var(--coral);
}

.notification-item svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

/* ================= RESPONSIVE LAYOUT RESPONSES ================= */
@media (max-width: 1020px) {
  .profile-hud {
    grid-template-columns: 1fr;
    grid-template-areas:
      "midcol"
      "leftcol";
  }
  
  .hud-mid-col-bottom {
    display: flex;
    flex-direction: column-reverse; /* Attributes card on top of mini metrics stack on mobile */
    gap: 16px;
  }
  
  .mini-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .mini-metrics > *:last-child:nth-child(odd) {
    grid-column: span 2;
  }
  
  /* Available Points display on mobile falls back to standard block layout */
  .stats-grid.compact-stats > div:nth-child(6) {
    grid-column: span 2;
  }
  
  .available-pts-card {
    padding: 10px 14px;
  }
  
  .pts-count {
    font-size: 18px;
  }
  
  /* Ensure profile card stays inline grid on mobile as original */
  .profile-id-window {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 22px;
    padding: 20px;
  }
  
  .profile-portrait {
    width: 130px;
    height: 170px;
  }
  
  .profile-data-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
  }
  
  .identity-grid {
    grid-template-columns: 80px 1fr;
  }
}

@media (max-width: 560px) {
  .profile-id-window {
    grid-template-columns: 100px 1fr;
    gap: 16px;
    padding: 12px;
  }
  .profile-portrait {
    width: 90px;
    height: 120px;
  }
  .identity-grid {
    grid-template-columns: 50px 1fr;
    gap: 8px 10px;
  }
  .identity-grid span {
    font-size: 10px;
  }
  .identity-grid strong {
    font-size: 14px;
  }
  #profileRankText {
    font-size: 15px;
  }
  .profile-data-panel .system-line {
    font-size: 11px;
    padding-top: 6px;
  }
  .stats-grid.compact-stats > div:nth-child(6) {
    grid-column: 1;
  }
}

/* ================= REWARDS PURPLE HOLOGRAPHIC STYLE ================= */
.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  padding: 16px 20px !important;
}

#view-rewards .reward-card {
  position: relative;
  border-radius: 4px !important;
  border: 1px solid rgba(181, 87, 255, 0.3) !important;
  background: linear-gradient(135deg, rgba(16, 9, 36, 0.75) 0%, rgba(6, 3, 14, 0.94) 100%) !important;
  box-shadow: 
      0 6px 20px rgba(0, 0, 0, 0.4), 
      inset 0 0 15px rgba(181, 87, 255, 0.05) !important;
  overflow: hidden;
  transition: all 0.3s ease;
}

#view-rewards .reward-card:hover {
  border-color: rgba(181, 87, 255, 0.5) !important;
  box-shadow: 
      0 8px 24px rgba(0, 0, 0, 0.5), 
      inset 0 0 20px rgba(181, 87, 255, 0.1),
      0 0 10px rgba(181, 87, 255, 0.2) !important;
  transform: translateY(-2px);
}

#view-rewards .reward-box-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  color: #ffffff !important;
  text-align: left;
  cursor: pointer;
  box-shadow: none !important;
  transform: none !important;
}

#view-rewards .reward-box-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#view-rewards .reward-box-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: rgba(181, 87, 255, 0.1);
  border: 1px solid rgba(181, 87, 255, 0.25);
  color: #df80ff;
  transition: all 0.3s ease;
}

#view-rewards .reward-card:hover .reward-box-icon {
  background: rgba(181, 87, 255, 0.2);
  color: #ffffff;
  border-color: #df80ff;
  box-shadow: 0 0 10px rgba(181, 87, 255, 0.4);
}

#view-rewards .inventory-item.reward-box {
  display: block !important;
  border-radius: 4px !important;
  border: 1px solid rgba(181, 87, 255, 0.3) !important;
  background: linear-gradient(135deg, rgba(16, 9, 36, 0.75) 0%, rgba(6, 3, 14, 0.94) 100%) !important;
  box-shadow: 
      0 6px 20px rgba(0, 0, 0, 0.4), 
      inset 0 0 15px rgba(181, 87, 255, 0.05) !important;
  margin-bottom: 12px;
  padding: 0 !important;
  transition: all 0.3s ease;
}

#view-rewards .inventory-item.reward-box[open] {
  border-color: rgba(181, 87, 255, 0.5) !important;
  box-shadow: 
      0 8px 24px rgba(0, 0, 0, 0.5), 
      inset 0 0 20px rgba(181, 87, 255, 0.1),
      0 0 15px rgba(181, 87, 255, 0.15) !important;
}

#view-rewards .inventory-item.reward-box summary {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 16px 20px !important;
  cursor: pointer;
  list-style: none;
  outline: none;
  background: transparent !important;
}

#view-rewards .inventory-item.reward-box summary::-webkit-details-marker {
  display: none;
}

#view-rewards .inventory-item.reward-box summary i {
  color: #df80ff;
}

#view-rewards .inventory-item.reward-box summary strong {
  color: #ffffff;
  font-weight: 700;
}

#view-rewards .inventory-item.reward-box summary small {
  color: rgba(181, 87, 255, 0.75);
}

#view-rewards .reward-detail {
  padding: 12px 20px 20px !important;
  border-top: 1px solid rgba(181, 87, 255, 0.15) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

#view-rewards .reward-detail span {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

#view-rewards .ghost-action {
  align-self: flex-start;
  width: auto;
  padding: 6px 16px !important;
  font-size: 12px;
  background: rgba(181, 87, 255, 0.08) !important;
  border: 1px solid rgba(181, 87, 255, 0.3) !important;
  color: #df80ff !important;
}

#view-rewards .ghost-action:hover {
  background: #b557ff !important;
  border-color: #df80ff !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(181, 87, 255, 0.4) !important;
}

/* Modal Popup Box for Rewards - Solo Leveling style */
#rewardClaimModal {
  border-radius: 3px !important;
  border: 1px solid rgba(181, 87, 255, 0.4) !important;
  background: 
      /* Fine grid pattern */
      linear-gradient(rgba(181, 87, 255, 0.05) 1px, transparent 1px) 0 0 / 20px 20px,
      linear-gradient(90deg, rgba(181, 87, 255, 0.05) 1px, transparent 1px) 0 0 / 20px 20px,
      /* Base glassmorphism */
      linear-gradient(135deg, rgba(18, 9, 38, 0.9) 0%, rgba(6, 3, 13, 0.98) 100%) !important;
  box-shadow: 
      0 20px 60px rgba(0, 0, 0, 0.85), 
      inset 0 0 30px rgba(181, 87, 255, 0.12),
      0 0 25px rgba(181, 87, 255, 0.25) !important;
  color: #ffffff;
  padding: 0;
  width: min(440px, calc(100vw - 32px));
  animation: modalGlowPulse 4s infinite alternate ease-in-out;
  overflow: visible; /* To allow pseudo-element rails to extend outside */
}

#rewardClaimModal::backdrop {
  background: rgba(4, 2, 10, 0.75);
  backdrop-filter: blur(8px);
}



@keyframes modalGlowPulse {
  from {
    border-color: rgba(181, 87, 255, 0.3) !important;
  }
  to {
    border-color: rgba(181, 87, 255, 0.5) !important;
  }
}

#rewardClaimModal .modal-icon {
  background: rgba(181, 87, 255, 0.1) !important;
  color: #df80ff !important;
  border: 1px solid rgba(181, 87, 255, 0.25) !important;
  border-radius: 4px;
}

#rewardClaimModal h3 {
  color: #ffffff;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 17px;
  text-shadow: 0 0 8px rgba(181, 87, 255, 0.6);
}

#rewardClaimModal p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

#rewardClaimModal .modal-actions {
  margin-top: 10px;
}

/* Modal Buttons mapping Yes/No design in popup */
#rewardClaimModal .icon-button.secondary,
#rewardClaimModal .primary-action {
  padding: 10px 24px !important;
  font-size: 13px !important;
  letter-spacing: 2px;
  font-weight: 800;
  text-transform: uppercase;
  font-family: "Orbitron", sans-serif;
  border-radius: 3px !important;
  cursor: pointer;
  transition: all 0.3s ease;
}

#rewardClaimModal .icon-button.secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

#rewardClaimModal .icon-button.secondary:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

#rewardClaimModal .primary-action {
  background: rgba(181, 87, 255, 0.1) !important;
  border: 1px solid rgba(181, 87, 255, 0.5) !important;
  color: #df80ff !important;
}

#rewardClaimModal .primary-action:hover {
  background: #b557ff !important;
  color: #ffffff !important;
  border-color: #df80ff !important;
  box-shadow: 0 0 15px rgba(181, 87, 255, 0.5) !important;
}

/* Dungeon & Store Button Margin Gap Fix */
.dungeon-card button, .store-card button {
  margin-top: 16px !important;
}

/* Custom Holographic RPG Cursor */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none !important; /* Hide default cursor */
  }
  
  /* Ensure interactive elements don't show default cursor */
  a, button, select, input, textarea, [role="button"], .tab, .toggle, .set-btn, .ghost-action, .tick-box {
    cursor: none !important;
  }
  
  .custom-cursor-dot {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 16px solid #ffffff;
    filter: drop-shadow(0 0 6px #df80ff) drop-shadow(0 0 12px #b557ff);
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-30%, -10%) rotate(-35deg); /* Point top-left crystal tip */
    transition: border-bottom-color 0.15s ease, transform 0.15s ease;
  }
  
  .custom-cursor-ring {
    width: 36px;
    height: 36px;
    border: 1.5px dashed rgba(181, 87, 255, 0.7);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(181, 87, 255, 0.3), inset 0 0 5px rgba(181, 87, 255, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    animation: cursorRingRotate 20s linear infinite;
    transition: width 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), height 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.2s ease, background-color 0.2s ease;
  }

  /* Hover state on clickable elements */
  body.cursor-hovering .custom-cursor-dot {
    border-bottom-color: #df80ff !important;
    transform: translate(-30%, -10%) rotate(-35deg) scale(0.9);
  }
  body.cursor-hovering .custom-cursor-ring {
    width: 46px;
    height: 46px;
    border: 1.5px solid #df80ff !important;
    background: rgba(181, 87, 255, 0.08) !important;
    box-shadow: 0 0 18px rgba(181, 87, 255, 0.6), inset 0 0 10px rgba(181, 87, 255, 0.3) !important;
    animation: cursorRingRotate 5s linear infinite; /* Spin faster on hover lock-on! */
  }
  
  /* Shockwave Ripple Click Effect */
  .cursor-ripple {
    position: fixed;
    border: 2px solid #ffffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99997;
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
    animation: cursorRippleAnim 0.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  }
}

@keyframes cursorRingRotate {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes cursorRippleAnim {
  0% {
    width: 10px;
    height: 10px;
    border-color: #ffffff;
    box-shadow: 0 0 10px #df80ff, inset 0 0 5px #df80ff;
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5);
  }
  50% {
    border-color: #df80ff;
    box-shadow: 0 0 15px #b557ff, inset 0 0 8px #b557ff;
    opacity: 0.8;
  }
  100% {
    width: 80px;
    height: 80px;
    border-color: rgba(181, 87, 255, 0);
    box-shadow: 0 0 20px rgba(181, 87, 255, 0), inset 0 0 10px rgba(181, 87, 255, 0);
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5);
  }
}

/* tactile Button Click active states */
button:active,
.icon-button:active,
.primary-action:active,
.danger-action:active,
.ghost-action:active,
.tab:active,
.set-btn:active,
.toggle:active {
  background: #df80ff !important;
  color: #05070c !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 25px #df80ff, 0 0 10px #ffffff !important;
  transform: translateY(1px) scale(0.96) !important;
  transition: none !important;
}

/* Dungeon Wording / Legend styles */
.gate-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: rgba(181, 87, 255, 0.05);
  border: 1px solid rgba(181, 87, 255, 0.2);
  border-radius: 8px;
  padding: 12px 18px;
  margin-top: -8px;
  margin-bottom: 20px;
  box-shadow: inset 0 0 10px rgba(181, 87, 255, 0.05);
}

.gate-token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.gate-token.blue {
  border-color: rgba(50, 245, 255, 0.4);
  color: #32f5ff;
  background: rgba(50, 245, 255, 0.06);
  text-shadow: 0 0 8px rgba(50, 245, 255, 0.4);
}

.gate-token.yellow {
  border-color: rgba(246, 200, 95, 0.4);
  color: #f6c85f;
  background: rgba(246, 200, 95, 0.06);
  text-shadow: 0 0 8px rgba(246, 200, 95, 0.4);
}

.gate-token.red {
  border-color: rgba(255, 110, 102, 0.4);
  color: #ff6e66;
  background: rgba(255, 110, 102, 0.06);
  text-shadow: 0 0 8px rgba(255, 110, 102, 0.4);
}

.gate-token.key {
  border-color: rgba(181, 87, 255, 0.5);
  color: #df80ff;
  background: rgba(181, 87, 255, 0.1);
  box-shadow: 0 0 10px rgba(181, 87, 255, 0.2);
  text-shadow: 0 0 8px rgba(181, 87, 255, 0.4);
}

.gate-token.key i {
  width: 14px;
  height: 14px;
  stroke-width: 2.5px;
}

/* Redesigned RPG Trackers layout */
.tracker-week {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: rgba(181, 87, 255, 0.02);
  border: 1px solid rgba(181, 87, 255, 0.08);
  border-radius: 6px;
  gap: 8px;
  transition: all 0.3s ease;
}

.tracker-week:hover {
  background: rgba(181, 87, 255, 0.05);
  border-color: rgba(181, 87, 255, 0.18);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tracker-week span {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: #df80ff;
  text-shadow: 0 0 8px rgba(223, 128, 255, 0.4);
  width: 34px;
  flex-shrink: 0;
}

.tracker-card {
  padding: 16px !important;
  background: linear-gradient(135deg, rgba(16, 9, 36, 0.75) 0%, rgba(6, 3, 14, 0.94) 100%) !important;
  border: 1px solid rgba(181, 87, 255, 0.25) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(181, 87, 255, 0.05) !important;
}

/* Neon Chart Styles */
.chart .line {
  stroke: #df80ff;
  stroke-width: 3;
  filter: url(#purpleGlow);
}

.chart .area {
  fill: url(#purpleAreaGrad);
}

.chart .circle-dot {
  fill: #ffffff;
  stroke: #df80ff;
  stroke-width: 2.5;
  filter: url(#purpleGlow);
  transition: r 0.2s ease, stroke-width 0.2s ease;
  cursor: pointer;
}

.chart .circle-dot:hover {
  r: 6;
  stroke-width: 3.5;
}

.chart .bar {
  fill: url(#xpBarGrad);
  filter: url(#xpBarGlow);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.chart .bar:hover {
  opacity: 0.95;
  filter: drop-shadow(0 0 8px #df80ff);
}

.chart .calories-bar {
  fill: url(#caloriesGrad);
  filter: url(#barGlow);
}

.chart .water-bar {
  fill: url(#waterGrad);
  filter: url(#barGlow);
}

/* ================= INTERACTIVE DUNGEON COMBAT ACTIVE MODAL ================= */
.dungeon-active-box {
  background: 
    linear-gradient(rgba(181, 87, 255, 0.04) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(181, 87, 255, 0.04) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(135deg, rgba(20, 10, 42, 0.95) 0%, rgba(8, 4, 18, 0.98) 100%) !important;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.75), 
    inset 0 0 30px rgba(181, 87, 255, 0.15),
    0 0 30px rgba(181, 87, 255, 0.3) !important;
  backdrop-filter: blur(25px) !important;
}

#dungeonTimerBar {
  box-shadow: 0 0 10px rgba(223, 128, 255, 0.6), 0 0 20px rgba(255, 110, 102, 0.4);
}

#activeDungeonTasks li {
  list-style: none;
  position: relative;
  padding-left: 24px;
}

#activeDungeonTasks li::before {
  content: "⚔️";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 12px;
}

/* Enforce max height constraints on active dungeon modal container */
.dungeon-active-box {
  max-height: 92vh !important;
  overflow-y: auto !important;
}

/* Override popover user-agent styles for top-layer custom cursor compatibility */
[popover].custom-cursor-dot, [popover].custom-cursor-ring {
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  left: auto;
  top: auto;
  right: auto !important;
  bottom: auto !important;
  overflow: visible !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

[popover].custom-cursor-dot {
  border: none !important;
  border-left: 6px solid transparent !important;
  border-right: 6px solid transparent !important;
  border-bottom: 16px solid #ffffff !important;
}

[popover].custom-cursor-ring {
  border: 1.5px dashed rgba(181, 87, 255, 0.7) !important;
}

/* Dashboard Font Enhancements - Immersive RPG Styling */
.identity-grid strong, 
#profileName, 
#profileRankText, 
#profileLevelText, 
#profileClass, 
#specialtyText, 
.stat-row strong, 
.stat-actions, 
.pts-count, 
.exercise-name, 
.quest-title, 
.metric-value, 
.status-pill, 
.tab, 
button, 
.primary-action, 
.danger-action, 
.ghost-action, 
.section-title, 
.record-title, 
.quote-line, 
#systemQuote, 
.level-line, 
.xp-breakdown span, 
.tracker-week span, 
.gate-token {
  font-family: "Oxanium", "Orbitron", sans-serif !important;
}

/* Gamified Custom Checkbox */
.gamified-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px !important;
  height: 18px !important;
  border: 1.5px solid rgba(181, 87, 255, 0.45);
  background: rgba(16, 9, 36, 0.75);
  border-radius: 4px;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  margin: 0;
  vertical-align: middle;
}

.gamified-checkbox::before {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: 120ms transform cubic-bezier(0.25, 0.8, 0.25, 1);
  background-color: #df80ff;
  clip-path: polygon(14% 44%, 0 58%, 38% 96%, 100% 17%, 85% 3%, 38% 70%);
  filter: drop-shadow(0 0 4px rgba(223, 128, 255, 0.95));
}

.gamified-checkbox:checked {
  border-color: #df80ff;
  background: rgba(181, 87, 255, 0.22);
  box-shadow: 0 0 10px rgba(181, 87, 255, 0.5);
}

.gamified-checkbox:checked::before {
  transform: scale(1);
}

.gamified-checkbox:hover {
  border-color: rgba(223, 128, 255, 0.95);
  background: rgba(181, 87, 255, 0.12);
  box-shadow: 0 0 6px rgba(181, 87, 255, 0.35);
}

/* ================= STATIC BUTTONS (ZERO CLICK TRANSFORMS) ================= */
button, .btn, .tab, .secondary-btn, .google-signin-btn, .ghost-action, .primary-action, .danger-action, .option-box, .checkbox-box {
  transform: none !important;
  animation: none !important;
}

button:hover, .btn:hover, .tab:hover, .secondary-btn:hover, .ghost-action:hover, .primary-action:hover, .danger-action:hover {
  transform: none !important;
  animation: none !important;
}

button:active, .btn:active, .tab:active, .secondary-btn:active, .google-signin-btn:active, .ghost-action:active, .primary-action:active, .danger-action:active {
  transform: none !important;
  animation: none !important;
}

/* ================= MOBILE VIEW CUSTOMIZATION & PROFILE CARD REORDERING ================= */
@media (max-width: 768px) {
  /* Icon-Only Top Navigation Bar */
  .tabs {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 6px 8px !important;
    width: 100% !important;
    overflow-x: auto !important;
    background: rgba(16, 9, 36, 0.95) !important;
    border-bottom: 1px solid rgba(181, 87, 255, 0.25) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
  }

  .tab {
    flex: 1 !important;
    min-width: 36px !important;
    padding: 8px 4px !important;
    justify-content: center !important;
    border-radius: 6px !important;
    min-height: 36px !important;
  }

  /* Hide tab button text labels on mobile so only clean SVG icons are shown */
  .tab span {
    display: none !important;
  }

  .tab i, .tab svg {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
  }

  /* Profile HUD Ordering on Mobile View:
     1st: Profile Card (Hunter License)
     2nd: Levelup Bar (Level & XP Progress)
     3rd: System Message (Motivational Quote)
     4th: Status Window Attributes (STR, AGI, VIT, etc.)
     5th: System Notification (Active Notices)
  */
  .profile-hud {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  .hud-left-col, .hud-mid-col, .hud-mid-col-bottom {
    display: contents !important;
  }

  /* 1st: Profile Card */
  .player-window {
    order: 1 !important;
    width: 100% !important;
  }

  /* 2nd: Levelup Bar */
  .level-card {
    order: 2 !important;
    width: 100% !important;
  }

  /* 3rd: System Message */
  .system-message {
    order: 3 !important;
    width: 100% !important;
  }

  /* 4th: 4 Metric Boxes (Icon & Main Value in 2x2 Grid) */
  .mini-metrics {
    order: 4 !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .mini-metrics .metric-card {
    min-height: 52px !important;
    padding: 10px 12px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  /* 5th: Status Window Attributes */
  .status-panel {
    order: 5 !important;
    width: 100% !important;
  }

  /* 6th: System Notification Notices */
  .system-notification {
    order: 6 !important;
    width: 100% !important;
  }

  #streakDisplay {
    display: none !important;
  }
}


