/* ==========================================================================
   AION 2 DEV - AUTHENTIC THEME & DESIGN SYSTEM (https://aion2.dev/)
   ========================================================================== */

:root {
  --bg: #06090f;
  --bg-2: #0a0e17;
  --glass: rgba(13, 18, 29, 0.74);
  --glass-2: rgba(19, 26, 41, 0.72);
  --panel: #0e131d;
  --panel-2: #141a27;
  --panel-3: #1b2333;

  --line: rgba(140, 170, 210, 0.13);
  --line-2: rgba(140, 170, 210, 0.24);
  --edge: rgba(255, 255, 255, 0.06);

  --ink: #e9eff9;
  --ink-2: #b7c3d8;
  --muted: #8391a8;
  --faint: #56637a;

  --cyan: #5ce1ff;
  --violet: #8f7bff;
  --accent: #5ce1ff;
  --accent-ink: #04121a;
  --accent-soft: rgba(92, 225, 255, 0.12);
  --accent-line: rgba(92, 225, 255, 0.5);

  --glow: 0 0 24px rgba(92, 225, 255, 0.35);
  --glow-strong: 0 0 36px rgba(92, 225, 255, 0.55);
  --holo: linear-gradient(90deg, #5ce1ff, #8f7bff 60%, #ff9ad5);

  --k-item: #f0a640;
  --k-skill: #a48cf0;
  --k-quest: #5ce1ff;
  --k-place: #6cd6a0;
  --k-craft: #f0a640;
  --k-npc: #ff9ad5;

  --g-common: #aeb7c4;
  --g-rare: #63d69f;
  --g-legend: #62a9ff;
  --g-unique: #f0a640;
  --g-epic: #c98bff;
  --g-special: #ff8f8f;

  --live: #4ef0a3;
  --shadow: 0 1px 0 var(--edge) inset, 0 14px 40px rgba(0, 0, 0, 0.45);

  --display: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  --ui: 'Familjen Grotesk', 'Segoe UI', system-ui, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --grid-opacity: 0.035;
  --mote: rgba(92, 225, 255, 0.9);

  /* Compatibility bindings for existing wiki elements */
  --bg-primary: var(--bg);
  --bg-secondary: var(--bg-2);
  --bg-card: var(--panel);
  --bg-card-hover: var(--panel-2);
  --bg-glass: var(--glass);
  --border-subtle: var(--line);
  --border-accent: var(--accent-line);
  --border-active: var(--cyan);
  --text-main: var(--ink);
  --text-muted: var(--ink-2);
  --text-dim: var(--muted);
  --gold-primary: var(--accent);
  --gold-glow: var(--glow);
  --blue-arcane: var(--cyan);
  --blue-glow: var(--glow);

  color-scheme: dark;
}

/* Base Body & Reset */
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient Background Glow & Tech Grid */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(1200px 620px at 12% -12%, rgba(92, 225, 255, 0.16), transparent 60%),
              radial-gradient(900px 520px at 96% 4%, rgba(143, 123, 255, 0.16), transparent 62%),
              radial-gradient(1400px 900px at 50% 118%, rgba(92, 225, 255, 0.09), transparent 60%);
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, var(--grid-opacity)) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, var(--grid-opacity)) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(90% 70% at 50% 0%, #000 20%, transparent 100%);
  mask-image: radial-gradient(90% 70% at 50% 0%, #000 20%, transparent 100%);
}

/* App Main Grid */
.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  min-height: 100vh;
}

/* Rail Navigation (Left Sidebar) */
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-right: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail .logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, rgba(92, 225, 255, 0.25), rgba(143, 123, 255, 0.15));
  border: 1px solid var(--accent-line);
  color: var(--accent);
  margin-bottom: 12px;
  box-shadow: var(--glow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.rail .logo:hover {
  transform: scale(1.05);
  box-shadow: var(--glow-strong);
}

.rail .logo svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.rail button,
.rail a.navlink {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 62px;
  padding: 9px 0 8px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.rail button:hover,
.rail a.navlink:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.rail button.active,
.rail button[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

.rail button.active::before,
.rail button[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: var(--glow);
}

.rail button .nav-ic,
.rail a.navlink .nav-ic {
  width: 26px;
  height: 26px;
  object-fit: contain;
  opacity: 0.8;
  color: var(--ink-2);
  transition: color 0.16s, transform 0.16s, opacity 0.16s;
}

.rail button:hover .nav-ic,
.rail a.navlink:hover .nav-ic {
  color: var(--ink);
  opacity: 1;
  transform: translateY(-1px);
}

.rail button.active .nav-ic,
.rail button[aria-current="page"] .nav-ic {
  color: var(--accent);
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(92, 225, 255, 0.6));
}

.rail .spacer {
  flex: 1;
}

.rail .bottom {
  margin-top: auto;
}

/* Main Area Container */
.work {
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

/* Top Command Bar */
header.cmd {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 900;
}

.cmd .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.cmd .brand b {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 15px;
  color: var(--ink);
}

.cmd .brand b em {
  font-style: normal;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(92, 225, 255, 0.4);
}

.cmd .brand span {
  color: var(--muted);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Palette Search Trigger */
.palette-trigger {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 600px;
  padding: 9px 12px 9px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.palette-trigger:hover,
.palette-trigger:focus-within {
  border-color: var(--accent-line);
  box-shadow: var(--glow);
}

.palette-trigger span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  font-size: 13px;
  color: var(--ink-2);
}

.palette-trigger input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--ui);
  font-size: 13.5px;
}

.palette-trigger kbd,
.bigsearch kbd {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-2);
  letter-spacing: 0.04em;
}

.cmd .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cmd select.lang {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(0, 0, 0, 0.3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238391a8' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 8px center;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 5px 24px 5px 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.cmd .pill,
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.3);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-2);
}

.cmd .pill b.num {
  color: var(--accent);
  font-weight: 700;
}

.cmd .pill.live {
  border-color: rgba(78, 240, 163, 0.4);
  background: rgba(78, 240, 163, 0.08);
  color: var(--live);
}

.pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px var(--live);
  animation: pulse-glow 1.8s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px var(--live); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Home Screen HUD & Hero Banner */
.screen.home .wrap {
  max-width: 1540px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}

.hero2.hud {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  min-height: 400px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  background: #070a12;
}

.hero-art {
  position: absolute;
  inset: 0;
  background-image: url('art/hero.jpg');
  background-size: cover;
  background-position: 68% 42%;
  opacity: 0.95;
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 9, 15, 0.95) 0%, rgba(6, 9, 15, 0.86) 34%, rgba(6, 9, 15, 0.35) 66%, rgba(6, 9, 15, 0.5) 100%),
              linear-gradient(180deg, rgba(6, 9, 15, 0.1) 55%, rgba(6, 9, 15, 0.85));
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 390px;
  gap: 26px;
  padding: 36px 38px 32px;
  align-items: center;
}

.hero-copy .lbl {
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero-copy h1 {
  font-family: var(--display);
  font-size: clamp(28px, 3.3vw, 42px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 10px 0 12px;
  color: #fff;
  max-width: 18ch;
}

.hero-copy .lede {
  color: var(--ink-2);
  max-width: 58ch;
  font-size: 15px;
  margin-bottom: 20px;
  font-family: var(--serif);
  line-height: 1.55;
}

.bigsearch.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(6, 9, 15, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.bigsearch.hero-search:focus-within {
  border-color: var(--accent-line);
  box-shadow: var(--glow);
}

.bigsearch.hero-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--ui);
  font-size: 14.5px;
}

.suggest {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
  align-items: center;
}

.suggest span {
  font-family: var(--display);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}

.suggest button {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(6, 9, 15, 0.55);
  color: var(--ink-2);
  font-family: var(--ui);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.suggest button:hover {
  border-color: var(--accent-line);
  color: var(--ink);
  box-shadow: var(--glow);
}

/* Countdown Card in Hero */
.countdown.compact {
  position: relative;
  overflow: hidden;
  padding: 20px 22px 18px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.countdown.compact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px 220px at 8% -30%, rgba(92, 225, 255, 0.18), transparent 60%),
              radial-gradient(400px 200px at 100% 110%, rgba(143, 123, 255, 0.16), transparent 60%);
  pointer-events: none;
}

.cd-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.cd-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.cd-tz {
  font-family: var(--display);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.cd-title {
  position: relative;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0;
}

.cd-title small {
  display: block;
  font-family: var(--ui);
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.cd-clock {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 8px;
}

.cell {
  position: relative;
  min-width: 66px;
  padding: 8px 6px 6px;
  border-radius: 9px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-bottom: 2px solid var(--accent);
  text-align: center;
}

.cell b {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 0 16px rgba(92, 225, 255, 0.45);
  font-variant-numeric: tabular-nums;
}

.cell span {
  display: block;
  margin-top: 4px;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.cd-clock i {
  align-self: center;
  font-style: normal;
  font-family: var(--display);
  font-size: 26px;
  color: var(--accent);
  opacity: 0.85;
  text-shadow: var(--glow);
}

.cd-target {
  margin-left: 8px;
  font-family: var(--display);
  font-size: 11px;
  color: var(--ink-2);
  line-height: 1.35;
}

.cd-target b {
  display: block;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 10px;
  margin-bottom: 2px;
}

.cd-track.rifts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  margin: 12px 0 8px;
}

.seg {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.seg i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--holo);
  box-shadow: var(--glow);
}

.seg.done i {
  background: var(--line-2);
  box-shadow: none;
}

.seg.live i {
  background: linear-gradient(90deg, var(--live), var(--cyan));
  box-shadow: 0 0 14px color-mix(in srgb, var(--live) 60%, transparent);
}

.cd-list {
  position: relative;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.cd-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  font-size: 11.5px;
}

.cd-list li.live {
  border-color: rgba(78, 240, 163, 0.45);
  background: rgba(78, 240, 163, 0.08);
}

.cd-list .i {
  color: var(--muted);
  display: grid;
  place-items: center;
}

.cd-list li.live .i {
  color: var(--live);
}

.cd-list .nm {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.cd-list .when {
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.cd-list b {
  font-family: var(--display);
  font-size: 11.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.cd-list li.live b {
  color: var(--live);
}

.cd-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.cd-note a {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Feature Modules 4-Grid */
.modules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.module {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 156px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  text-align: left;
  color: var(--ink);
  background: var(--panel);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.module .art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  transition: transform 0.5s, opacity 0.2s;
}

.module::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 9, 15, 0.05), rgba(6, 9, 15, 0.93) 78%);
}

.module:hover {
  transform: translateY(-3px);
  border-color: var(--accent-line);
  box-shadow: var(--glow);
}

.module:hover .art {
  transform: scale(1.06);
  opacity: 0.75;
}

.module > *:not(.art) {
  position: relative;
  z-index: 1;
}

.module .ic {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(92, 225, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(92, 225, 255, 0.35);
  margin-bottom: 8px;
}

.module b {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  color: #fff;
}

.module small {
  color: #c9d2e0;
  font-size: 12.5px;
}

/* Section Header */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 4px;
}

.section-head p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.section-head a {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}

.section-head a:hover {
  opacity: 0.8;
}

/* Regions Gallery (6 Cards) */
.regions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.region {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  text-align: left;
  color: #fff;
  background: var(--panel);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  padding: 0;
}

.region .art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s;
}

.region::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 9, 15, 0) 30%, rgba(6, 9, 15, 0.92));
}

.region:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.region:hover .art {
  transform: scale(1.07);
}

.region .txt {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 1;
}

.region .txt b {
  font-family: var(--display);
  font-size: 14px;
  display: block;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.region .txt small {
  color: #c9d2e0;
  font-size: 11px;
}

.region .fac {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  opacity: 0.95;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.region .fac img {
  height: 22px;
  display: block;
}

/* Global Content Card and Table Styling */
.card,
.dashboard-kpi-card,
.feature-card,
.builder-card,
.stats-panel,
.item-detail-modal,
.filter-panel {
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: var(--panel) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-shadow: var(--shadow) !important;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s !important;
}

.card:hover,
.dashboard-kpi-card:hover,
.feature-card:hover {
  border-color: var(--accent-line) !important;
}

/* Modernized Buttons */
.btn {
  font-family: var(--display) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  border-radius: 8px !important;
  border: 1px solid var(--line-2) !important;
  background: var(--panel-2) !important;
  color: var(--ink) !important;
  transition: all 0.15s ease !important;
}

.btn:hover {
  border-color: var(--accent-line) !important;
  color: #fff !important;
  box-shadow: var(--glow) !important;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(92, 225, 255, 0.25), rgba(143, 123, 255, 0.2)) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(92, 225, 255, 0.25) !important;
}

.btn-primary:hover {
  box-shadow: var(--glow-strong) !important;
  transform: translateY(-1px) !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .modules {
    grid-template-columns: repeat(2, 1fr);
  }
  .regions {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .rail {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    flex-direction: row;
    justify-content: flex-start;
    padding: 6px 4px;
    border-right: 0;
    border-top: 1px solid var(--line);
    overflow-x: auto;
  }
  .rail .logo, .rail .spacer, .rail .bottom {
    display: none;
  }
  .modules {
    grid-template-columns: 1fr;
  }
  .regions {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* Typography Enhancements for Complete aion2.dev Aesthetic */
h1, h2, h3, h4, h5, h6,
.section-title, .section-subtitle,
.dashboard-hero-title,
.kpi-val, .kpi-label,
.nav-link, .nav-btn, .tab-btn,
.stat-value, .stat-label,
.pill, .badge, .tag,
.mr-stat-val, .mr-stat-label,
.mr-tab-btn, .mr-class-name,
.daev-node-title, .daev-board-title,
.item-card-title, .skill-card-name {
  font-family: var(--display) !important;
  letter-spacing: 0.04em !important;
}

body, p, span, div, input, select, textarea, button {
  font-family: var(--ui);
}

/* Glassmorphism Panel Refinement */
.class-detail-container,
.overview-card,
.dashboard-kpi-card,
.metaroad-planner-root,
.daev-native-board,
.item-grid-card,
.pet-card,
.event-card,
.filter-box {
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.class-detail-container:hover,
.overview-card:hover,
.dashboard-kpi-card:hover {
  border-color: var(--accent-line) !important;
  box-shadow: 0 0 20px rgba(92, 225, 255, 0.18) !important;
}

/* Scrollbar Styling matching aion2.dev */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--panel-3);
  border-radius: 4px;
  border: 1px solid var(--line);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-line);
}
