@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&family=Literata:opsz,wght@7..72,600&family=Cinzel:wght@700&display=swap");

:root {
  --bg-0: #07101f;
  --bg-1: #112844;
  --bg-2: #1f3f62;
  --bg-image: url("arcane.jpeg");
  --panel: rgba(8, 15, 26, 0.66);
  --line: rgba(167, 212, 255, 0.34);
  --text: #edf6ff;
  --text-soft: #b2cae3;
  --cyan: #74d9ff;
  --amber: #f1c28d;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    linear-gradient(130deg, rgba(5, 11, 20, 0.56), rgba(12, 24, 40, 0.48)),
    radial-gradient(42% 30% at 50% 58%, rgba(136, 208, 255, 0.16), transparent 70%),
    radial-gradient(78% 72% at 10% 8%, rgba(255, 196, 132, 0.14), transparent 58%),
    radial-gradient(68% 72% at 90% 88%, rgba(106, 198, 255, 0.24), transparent 60%),
    var(--bg-image),
    linear-gradient(130deg, var(--bg-0), var(--bg-1) 52%, var(--bg-2));
  background-position: center, center, center, center, center, center;
  background-size: auto, auto, auto, auto, cover, cover;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

.app {
  position: relative;
  width: 100%;
  height: 100%;
}

.brand-signature {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 6;
  font-family: "Cinzel", "Literata", serif;
  font-size: clamp(1.02rem, 2.4vw, 1.38rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: transparent;
  background: linear-gradient(175deg, #f4d8b0 12%, #e7f6ff 48%, #75d7ff 78%, #f1c28d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    0 0 8px rgba(119, 206, 255, 0.35),
    0 0 16px rgba(119, 206, 255, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.brand-signature::before {
  content: "";
  position: absolute;
  left: -0.24em;
  right: -0.24em;
  bottom: -0.24em;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(113, 209, 255, 0),
    rgba(113, 209, 255, 0.86) 20%,
    rgba(241, 194, 141, 0.74) 50%,
    rgba(113, 209, 255, 0.86) 80%,
    rgba(113, 209, 255, 0)
  );
  box-shadow: 0 0 10px rgba(113, 209, 255, 0.35);
}

.brand-signature::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.38em;
  width: 0.34em;
  height: 0.34em;
  border: 1px solid rgba(166, 223, 255, 0.72);
  box-shadow: 0 0 8px rgba(166, 223, 255, 0.34);
  transform: translateX(-50%) rotate(45deg);
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 48%, rgba(4, 8, 16, 0.54) 100%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.013) 0,
      rgba(255, 255, 255, 0.013) 1px,
      transparent 1px,
      transparent 96px
    );
}

.viewer-wrap {
  position: absolute;
  inset: 0;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
}

.viewer-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 12, 22, 0.56);
  color: #eaf6ff;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  backdrop-filter: blur(2px);
}

.viewer-loader[hidden] {
  display: none !important;
}

.hud {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  width: min(370px, 94vw);
  padding: 0.95rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(13, 22, 36, 0.5), var(--panel));
  backdrop-filter: blur(10px);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.kicker {
  margin: 0 0 0.28rem;
  font-size: 0.67rem;
  letter-spacing: 0.16em;
  color: var(--text-soft);
  text-transform: uppercase;
}

.hud h1 {
  margin: 0 0 0.42rem;
  font-family: "Literata", Georgia, serif;
  font-size: clamp(1.14rem, 2.4vw, 1.5rem);
  line-height: 1.1;
}

.controls {
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.model-select-wrap {
  display: block;
  margin-bottom: 0.66rem;
}

.model-select-wrap span {
  display: block;
  margin-bottom: 0.28rem;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: #bdd8f3;
  text-transform: uppercase;
}

.model-select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(165, 210, 255, 0.45);
  background: rgba(12, 25, 42, 0.84);
  color: #ebf7ff;
  padding: 0.5rem 0.58rem;
  font: inherit;
  font-size: 0.85rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.68rem;
}

.chips span {
  padding: 0.24rem 0.52rem;
  border-radius: 999px;
  border: 1px solid rgba(195, 230, 255, 0.26);
  background: rgba(11, 28, 46, 0.62);
  font-size: 0.72rem;
  color: #ddf0ff;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem;
}

.btn {
  appearance: none;
  border: 1px solid rgba(166, 216, 255, 0.56);
  border-radius: 10px;
  background: linear-gradient(112deg, rgba(39, 70, 112, 0.9), rgba(19, 45, 78, 0.9));
  color: #e7f7ff;
  padding: 0.46rem 0.7rem;
  font: inherit;
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(218, 240, 255, 0.92);
  box-shadow: 0 7px 18px rgba(86, 168, 247, 0.3);
}

.btn-ghost {
  background: linear-gradient(112deg, rgba(78, 52, 30, 0.74), rgba(43, 27, 16, 0.74));
  border-color: rgba(244, 199, 153, 0.58);
  color: #ffe8cd;
}

.btn-flat {
  background: linear-gradient(112deg, rgba(24, 40, 64, 0.85), rgba(19, 32, 52, 0.85));
  border-color: rgba(155, 199, 242, 0.44);
}

.status {
  margin: 0.65rem 0 0;
  font-size: 0.81rem;
  color: #cfe8ff;
}

.weapon-card {
  margin-top: 0.76rem;
  padding-top: 0.68rem;
  border-top: 1px solid rgba(171, 211, 255, 0.23);
}

.weapon-card__kicker {
  margin: 0;
  font-size: 0.63rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #aecde9;
}

.weapon-card h2 {
  margin: 0.28rem 0 0.42rem;
  font-family: "Literata", Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.2;
  color: #ffe2c1;
}

.weapon-card p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.46;
  color: #d5e7f8;
}

.weapon-card p + p {
  margin-top: 0.4rem;
}

.tip {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 5;
  border-radius: 10px;
  border: 1px solid rgba(176, 214, 255, 0.26);
  background: rgba(8, 16, 29, 0.55);
  color: #bfd8ef;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  padding: 0.5rem 0.72rem;
}

.spectator-mode .controls,
.spectator-mode .chips,
.spectator-mode .status,
.spectator-mode .tip {
  display: none;
}

.spectator-mode .hud {
  top: auto;
  right: 1rem;
  bottom: 1rem;
  width: min(440px, 94vw);
}

@media (max-width: 760px) {
  .brand-signature {
    top: 0.7rem;
    left: 0.7rem;
    font-size: 1rem;
  }

  .hud {
    top: 0.7rem;
    right: 0.7rem;
    width: min(360px, calc(100vw - 1.4rem));
    padding: 0.84rem;
  }

  .tip {
    left: 0.7rem;
    bottom: 0.7rem;
    font-size: 0.69rem;
  }

  .weapon-card h2 {
    font-size: 0.96rem;
  }

  .weapon-card p {
    font-size: 0.79rem;
  }

  .spectator-mode .hud {
    right: 0.7rem;
    bottom: 0.7rem;
  }
}
