/* =========================================================
   MUSICBOXFRANK LAB V3.1
   VISUAL SYSTEM / ATMOSPHERE CORE
   ========================================================= */

:root {
  --lab-gold: #d5bb7c;
  --lab-cyan: #89e8ff;
  --lab-violet: #9d86ff;
  --lab-red: #ff746a;
  --lab-green: #7fffc0;

  --lab-surface: rgba(8, 11, 16, .78);
  --lab-border: rgba(255, 255, 255, .07);
}

/* ---------- PAGE ---------- */

body {
  transition:
    background 700ms ease,
    filter 700ms ease;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;

  background:
    radial-gradient(
      circle at 50% 10%,
      rgba(137,232,255,.035),
      transparent 30%
    );
}

/* ---------- CUSTOM SCROLL ---------- */

* {
  scrollbar-width: thin;
  scrollbar-color:
    rgba(213,187,124,.35)
    rgba(255,255,255,.025);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255,255,255,.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(213,187,124,.28);
  border-radius: 999px;
}

/* =========================================================
   ATMOSPHERES
   ========================================================= */

body.lab-atmosphere-sanctuary {
  background:
    radial-gradient(
      circle at 18% -10%,
      rgba(213,187,124,.10),
      transparent 34%
    ),
    radial-gradient(
      circle at 90% 10%,
      rgba(137,232,255,.06),
      transparent 32%
    ),
    #040609;
}

body.lab-atmosphere-night {
  background:
    radial-gradient(
      circle at 80% 0%,
      rgba(157,134,255,.17),
      transparent 34%
    ),
    radial-gradient(
      circle at 12% 30%,
      rgba(40,70,150,.12),
      transparent 40%
    ),
    #02030a;
}

body.lab-atmosphere-rain {
  background:
    radial-gradient(
      circle at 40% 0%,
      rgba(80,120,160,.12),
      transparent 38%
    ),
    #05080c;
}

body.lab-atmosphere-bunker {
  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(255,120,70,.055),
      transparent 30%
    ),
    #050606;
}

body.lab-atmosphere-precision {
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(137,232,255,.11),
      transparent 34%
    ),
    radial-gradient(
      circle at 100% 50%,
      rgba(137,232,255,.04),
      transparent 30%
    ),
    #02070a;
}

/* =========================================================
   RAIN FX
   ========================================================= */

body.lab-atmosphere-rain::before {
  content: "";
  position: fixed;
  inset: -100px;
  z-index: -1;
  pointer-events: none;

  background-image:
    repeating-linear-gradient(
      112deg,
      transparent 0,
      transparent 22px,
      rgba(160,205,230,.07) 23px,
      transparent 24px
    );

  animation:
    frankRain 1.15s linear infinite;

  opacity: .6;
}

@keyframes frankRain {
  from {
    transform: translateY(-50px);
  }

  to {
    transform: translateY(50px);
  }
}

/* =========================================================
   SYSTEM HUD
   ========================================================= */

.frank-hud {
  position: fixed;

  left: 18px;
  bottom: 18px;

  z-index: 150;

  display: flex;
  align-items: center;
  gap: 10px;

  max-width:
    calc(100vw - 36px);

  padding: 9px 12px;

  border:
    1px solid
    rgba(137,232,255,.12);

  border-radius:
    999px;

  background:
    rgba(4,7,10,.82);

  backdrop-filter:
    blur(18px);

  box-shadow:
    0 15px 45px
    rgba(0,0,0,.35);
}

.frank-hud-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background:
    var(--lab-green);

  box-shadow:
    0 0 14px
    var(--lab-green);
}

.frank-hud-label {
  color:
    rgba(240,242,245,.55);

  font-size: 7px;
  letter-spacing: .16em;
}

.frank-hud-value {
  color:
    var(--lab-cyan);

  font-size: 8px;
  letter-spacing: .13em;
}

/* =========================================================
   ATMOSPHERE CONTROL
   ========================================================= */

.frank-atmosphere-panel {
  width:
    min(
      1240px,
      calc(100% - 34px)
    );

  margin:
    20px auto 70px;

  padding: 15px;

  display: flex;
  justify-content:
    space-between;
  align-items:
    center;
  gap: 18px;

  border:
    1px solid
    rgba(255,255,255,.06);

  border-radius:
    20px;

  background:
    rgba(7,10,14,.72);

  backdrop-filter:
    blur(18px);
}

.frank-atmosphere-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.frank-atmosphere-title strong {
  font-family:
    Georgia,
    serif;

  font-weight: 500;

  color:
    #e5e1d8;
}

.frank-atmosphere-title span {
  color:
    #69727d;

  font-size: 7px;
  letter-spacing: .17em;
}

.frank-atmosphere-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.frank-atmo {
  padding:
    9px 12px;

  border:
    1px solid
    rgba(255,255,255,.07);

  border-radius:
    999px;

  background:
    #080b0f;

  color:
    #929aa4;

  font-size:
    7px;

  letter-spacing:
    .14em;

  transition:
    .18s ease;
}

.frank-atmo:hover {
  border-color:
    rgba(137,232,255,.25);

  color:
    var(--lab-cyan);
}

.frank-atmo.active {
  border-color:
    rgba(213,187,124,.55);

  background:
    rgba(213,187,124,.09);

  color:
    var(--lab-gold);
}

/* =========================================================
   REACTOR ENHANCEMENT
   ========================================================= */

.reactor-card {
  position: relative;
  overflow: hidden;
}

.reactor-card::before {
  content: "";

  position: absolute;

  width: 340px;
  height: 340px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(137,232,255,.08),
      transparent 67%
    );

  filter:
    blur(16px);

  animation:
    reactorGlow 4s
    ease-in-out infinite;
}

@keyframes reactorGlow {
  50% {
    transform:
      scale(1.18);

    opacity:
      .55;
  }
}

.core {
  position: relative;
  z-index: 4;

  transition:
    color .4s ease,
    border-color .4s ease,
    box-shadow .4s ease;
}

.core::after {
  content:
    "STATE ENGINE";

  position:
    absolute;

  bottom:
    -36px;

  white-space:
    nowrap;

  color:
    rgba(255,255,255,.28);

  font-family:
    Arial,
    sans-serif;

  font-size:
    6px;

  letter-spacing:
    .24em;
}

/* =========================================================
   STATE CARD V3.1
   ========================================================= */

.state {
  position: relative;
  overflow: hidden;
}

.state::after {
  content: "";

  position: absolute;

  right: -50px;
  bottom: -50px;

  width: 140px;
  height: 140px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      var(--glow),
      transparent 65%
    );

  opacity: .35;

  transition:
    .25s ease;
}

.state:hover::after {
  transform:
    scale(1.35);

  opacity:
    .8;
}

.state.active::before {
  content:
    "ACTIVE";

  position:
    absolute;

  right: 15px;
  top: 15px;

  padding:
    5px 7px;

  border:
    1px solid
    rgba(213,187,124,.22);

  border-radius:
    999px;

  color:
    var(--lab-gold);

  font-size:
    6px;

  letter-spacing:
    .16em;
}

/* =========================================================
   STATE STATUS
   ========================================================= */

.frank-state-status {
  width:
    min(
      1240px,
      calc(100% - 34px)
    );

  margin:
    -55px auto 50px;

  padding:
    18px 20px;

  display:
    grid;

  grid-template-columns:
    1fr auto;

  align-items:
    center;

  gap:
    18px;

  border:
    1px solid
    rgba(213,187,124,.11);

  border-radius:
    20px;

  background:
    rgba(8,11,15,.68);

  backdrop-filter:
    blur(16px);
}

.frank-state-status small {
  display:
    block;

  color:
    #69727d;

  font-size:
    7px;

  letter-spacing:
    .16em;
}

.frank-state-status strong {
  display:
    block;

  margin-top:
    5px;

  color:
    var(--lab-gold);

  font-family:
    Georgia,
    serif;

  font-size:
    19px;

  font-weight:
    500;
}

.frank-state-meters {
  display:
    flex;

  gap:
    20px;
}

.frank-meter {
  min-width:
    65px;

  text-align:
    right;
}

.frank-meter span {
  display:
    block;

  color:
    #65707b;

  font-size:
    6px;

  letter-spacing:
    .13em;
}

.frank-meter b {
  color:
    var(--lab-cyan);

  font-size:
    13px;
}

/* =========================================================
   PLAYER
   ========================================================= */

.player {
  box-shadow:
    0 -20px 75px
    rgba(0,0,0,.45);
}

.player-controls button {
  transition:
    .18s ease;
}

.player-controls button:hover {
  color:
    var(--lab-cyan);

  border-color:
    rgba(137,232,255,.34);

  transform:
    translateY(-2px);
}

/* =========================================================
   MOBILE
   ========================================================= */

@media(max-width:700px) {

  .frank-atmosphere-panel {
    align-items:
      flex-start;

    flex-direction:
      column;
  }

  .frank-state-status {
    grid-template-columns:
      1fr;
  }

  .frank-state-meters {
    justify-content:
      space-between;
  }

  .frank-meter {
    text-align:
      left;
  }

  .frank-hud {
    display:
      none;
  }
}
