/* Roblox-dark + OLED + glow theme (clean / valid CSS) */

:root {
  --bg: #000000;
  --bg-2: #07070b;

  --surface: rgba(14, 14, 18, 0.72);
  --surface-2: rgba(18, 18, 24, 0.80);
  --surface-3: rgba(28, 28, 38, 0.60);

  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --faint: rgba(255, 255, 255, 0.48);

  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-2: rgba(255, 255, 255, 0.12);

  /* Roblox-ish neon blue accent + red for warnings */
  --accent: #00a2ff;
  --accent-2: rgba(0, 162, 255, 0.28);
  --danger: #ff3b30;

  --radius: 22px;
  --radius-sm: 16px;
  --radius-xs: 12px;

  --shadow: 0 28px 90px rgba(0, 0, 0, 0.82);
  --shadow-soft: 0 14px 38px rgba(0, 0, 0, 0.56);

  --glow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 0 70px rgba(0, 162, 255, 0.10);
  --glow-strong: 0 0 0 1px rgba(0, 162, 255, 0.22), 0 0 90px rgba(0, 162, 255, 0.18);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 16% -12%, rgba(0, 162, 255, 0.16), transparent 62%),
    radial-gradient(900px 520px at 92% 0%, rgba(255, 59, 48, 0.10), transparent 62%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  font-family: "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  overflow-x: hidden;
}

/* Animated background (Vanta.js) */
#bgVanta {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.95;
}

body.has-vanta::before,
body.has-vanta::after {
  opacity: 0;
}

body.has-vanta .noise { opacity: 0.06; }

@media (prefers-reduced-motion: reduce) {
  #bgVanta { display: none; }
  body.has-vanta::before,
  body.has-vanta::after { opacity: 0.12; }
}

/* Background visuals (static): aurora glow + subtle Roblox-like grid */
body::before {
  content: "";
  position: fixed;
  inset: -18vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1200px 760px at 18% 8%, rgba(0, 162, 255, 0.30), transparent 60%),
    radial-gradient(900px 620px at 82% 12%, rgba(255, 59, 48, 0.16), transparent 62%),
    radial-gradient(1100px 820px at 52% 112%, rgba(0, 162, 255, 0.18), transparent 62%);
  opacity: 0.75;
  mix-blend-mode: screen;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.090) 0 1px, transparent 1px 13px),
    linear-gradient(rgba(255, 255, 255, 0.060) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.050) 1px, transparent 1px),
    radial-gradient(circle at 2px 2px, rgba(0, 162, 255, 0.14) 1px, transparent 1px);
  background-size: 100% 100%, 96px 96px, 96px 96px, 28px 28px;
  background-position: 0 0, 0 0, 0 0;
  opacity: 0.24;
  mix-blend-mode: overlay;
  -webkit-mask-image: radial-gradient(closest-side at 50% 50%, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.95) 100%);
  mask-image: radial-gradient(closest-side at 50% 50%, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.95) 100%);
}

:focus-visible {
  outline: 2px solid rgba(0, 162, 255, 0.8);
  outline-offset: 3px;
}

/* Ambient layers */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.10;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  mix-blend-mode: overlay;
}

.vignette {
  position: fixed;
  inset: -10vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(closest-side at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.82) 100%);
  opacity: 0.6;
}

/* Scrollbar (subtle) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.55);
}
*::-webkit-scrollbar-track { background: transparent; }

/* --- GLASS BREAK EFFECT (kept) --- */
#glass-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.5s ease;
  background-image: none;
  background-size: cover;
}

.glass-shattered {
  opacity: 0.7 !important;
  animation: flash 0.22s ease-out;
  background-image: url("https://www.transparenttextures.com/patterns/broken-glass.png");
}

@keyframes flash {
  0% { filter: brightness(2.4); }
  100% { filter: brightness(1); }
}

/* --- ANIMATIONS: FIRE, SHAKE, & MELT (kept) --- */
@keyframes fireBackground {
  0% { background-color: #000; box-shadow: inset 0 0 50px #000; }
  50% { background-color: #120000; box-shadow: inset 0 0 160px rgba(255, 59, 48, 0.55); }
  100% { background-color: #000; box-shadow: inset 0 0 50px #000; }
}

@keyframes shakeEffect {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@keyframes meltEffect {
  0% { transform: skewY(0deg); filter: blur(0px); }
  50% {
    transform: skewY(1.4deg) translateY(4px);
    filter: blur(0.4px);
    text-shadow: 0 12px 16px rgba(255, 59, 48, 0.42);
  }
  100% { transform: skewY(0deg); filter: blur(0px); }
}

.god-tier-active {
  animation: fireBackground 2s infinite ease-in-out !important;
  background: #0b0000 !important;
}

.overheat-shake {
  animation: shakeEffect 0.2s infinite !important;
  border-color: rgba(255, 59, 48, 0.92) !important;
  box-shadow: 0 0 45px rgba(255, 59, 48, 0.42) !important;
}

.overheat-shake .readout,
.overheat-shake h2,
.overheat-shake .oracle {
  animation: meltEffect 3s infinite ease-in-out !important;
  color: rgba(255, 140, 140, 0.98) !important;
}

/* Layout */
.shell {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px;
}

.panel { display: block; }
.hidden { display: none; }

/* Header */
.mast {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: calc(var(--radius) + 2px);
  background:
    radial-gradient(900px 280px at 10% 0%, rgba(0, 162, 255, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.34));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.sigil {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(12px 12px at 65% 35%, rgba(0, 162, 255, 0.75), transparent 60%),
    radial-gradient(18px 18px at 40% 65%, rgba(255, 59, 48, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 22px 70px rgba(0, 162, 255, 0.14);
}

.title {
  font-family: "Orbitron", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  letter-spacing: 1.1px;
  font-weight: 800;
  font-size: 14px;
}

.subtitle {
  margin-top: 3px;
  color: var(--faint);
  font-size: 12px;
}

.tabs {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.tabbtn {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.80);
  cursor: pointer;
  font-family: "Orbitron", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.tabbtn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}

.tabbtn.active {
  background: linear-gradient(180deg, rgba(0, 162, 255, 0.30), rgba(255, 255, 255, 0.03));
  color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 1px rgba(0, 162, 255, 0.18), 0 0 40px rgba(0, 162, 255, 0.14);
}

/* Grid + cards */
.grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.slab {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(900px 320px at 15% 0%, rgba(0, 162, 255, 0.08), transparent 62%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft), var(--glow);
  padding: 18px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.slab:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 162, 255, 0.20);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 80px rgba(0, 162, 255, 0.16);
}

.slab--wide {
  max-width: 880px;
  margin: 18px auto 0;
}

.slab__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.slab__title {
  margin: 0;
  font-family: "Orbitron", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
}

.slab__hint {
  color: var(--faint);
  font-size: 12px;
}

.field { margin-top: 12px; }

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
select {
  width: 100%;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.40);
  color: rgba(255, 255, 255, 0.94);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input::placeholder { color: rgba(255, 255, 255, 0.35); }

input:focus,
select:focus {
  border-color: rgba(0, 162, 255, 0.62);
  box-shadow: 0 0 0 5px rgba(0, 162, 255, 0.14), 0 0 55px rgba(0, 162, 255, 0.12);
  background: rgba(0, 0, 0, 0.46);
}

.btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 162, 255, 0.26);
  background:
    radial-gradient(900px 260px at 50% 0%, rgba(255, 255, 255, 0.20), transparent 58%),
    linear-gradient(180deg, rgba(0, 162, 255, 0.98), rgba(0, 162, 255, 0.62));
  color: rgba(255, 255, 255, 0.98);
  cursor: pointer;
  font-family: "Orbitron", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  letter-spacing: 0.8px;
  transition: transform 0.16s ease, filter 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 18px 45px rgba(0, 162, 255, 0.16);
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 162, 255, 0.45);
  box-shadow: var(--glow-strong);
  filter: brightness(1.02);
}

.btn:active {
  transform: translateY(0);
}

.readout {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.30);
  font-weight: 800;
  text-align: center;
}

.subreadout {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
  margin: 14px 0;
}

.minor {
  font-family: "Orbitron", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.log {
  margin-top: 10px;
  height: 200px;
  overflow: auto;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.35);
  padding: 10px;
}

.log .log-entry {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 10px;
}

.log strong {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 6px;
}

.log ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.70);
  font-size: 13px;
}

.switchrow {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.switchrow__label {
  color: var(--muted);
  font-size: 12px;
  margin-right: 6px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  user-select: none;
}

.switch input { accent-color: rgba(0, 162, 255, 0.92); }

.oracle {
  display: none;
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.48);
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-weight: 700;
}

.oracle.oracle--warning {
  border-color: rgba(255, 59, 48, 0.38);
  box-shadow: 0 0 0 1px rgba(255, 59, 48, 0.12), 0 0 65px rgba(255, 59, 48, 0.12);
}

.oracle.oracle--cold {
  border-color: rgba(0, 162, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(0, 162, 255, 0.10), 0 0 65px rgba(0, 162, 255, 0.10);
}

.req { margin-top: 14px; }

.req-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.35);
  margin-top: 10px;
}

.req-val {
  font-weight: 900;
  color: rgba(255, 255, 255, 0.94);
}

.transfer-btn {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.90);
  cursor: pointer;
  font-family: "Orbitron", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.transfer-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(0, 162, 255, 0.22);
  box-shadow: 0 0 45px rgba(0, 162, 255, 0.10);
}

.credits {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.credit {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.35);
  padding: 14px;
}

.credit__role {
  font-family: "Orbitron", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

.credit__name {
  margin-top: 8px;
  font-weight: 900;
  font-size: 16px;
}

.credit--mark {
  border-color: rgba(0, 162, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 162, 255, 0.10);
}

.fineprint {
  margin-top: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

@media (max-width: 860px) {
  .mast {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "sigil title"
      "tabs tabs";
  }
  .tabs { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
