:root {
  color-scheme: dark;
  --bg: #08090d;
  --panel: #12161b;
  --panel-hot: #1b2328;
  --text: #f4fff9;
  --muted: #a9b8b0;
  --line: #2a3338;
  --acid: #78ff76;
  --signal: #39d5ff;
  --warning: #ffe45e;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(57, 213, 255, 0.16), transparent 34rem),
    linear-gradient(180deg, #08090d 0%, #0d1114 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.hero {
  display: grid;
  gap: 16px;
}

.hero-banner {
  width: 100%;
  max-width: 900px;
  height: auto;
  justify-self: center;
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(120, 255, 118, 0.18),
    0 18px 42px rgba(120, 255, 118, 0.16);
}

.signal-briefing {
  position: relative;
  max-width: 900px;
  padding: 12px 0 14px 18px;
  overflow: hidden;
  border-left: 1px solid rgba(120, 255, 118, 0.42);
  font-family: "Orbitron", "Rajdhani", system-ui, sans-serif;
  animation: fadeUp 520ms ease-out both;
}

.signal-briefing::before,
.signal-briefing::after {
  content: "";
  position: absolute;
  left: 0;
  width: min(420px, 82vw);
  height: 1px;
  background: linear-gradient(90deg, rgba(120, 255, 118, 0.64), transparent);
}

.signal-briefing::before {
  top: 0;
}

.signal-briefing::after {
  bottom: 0;
}

.signal-label {
  width: fit-content;
  margin: 0 0 7px;
  color: var(--acid);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(120, 255, 118, 0.55),
    0 0 26px rgba(120, 255, 118, 0.22);
  animation: signalFlicker 2.8s steps(2, end) infinite;
}

.signal-copy {
  position: relative;
  max-width: 720px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 6vw, 2.35rem);
  font-weight: 900;
  line-height: 1.08;
  text-shadow: 0 0 24px rgba(57, 213, 255, 0.12);
}

.signal-copy::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(120, 255, 118, 0.07) 0,
    rgba(120, 255, 118, 0.07) 1px,
    transparent 1px,
    transparent 5px
  );
  mix-blend-mode: screen;
}

.signal-note {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 3.6vw, 1.05rem);
  font-weight: 800;
  line-height: 1.3;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes signalFlicker {
  0%,
  8%,
  12%,
  100% {
    opacity: 1;
  }

  10% {
    opacity: 0.46;
    transform: translateX(1px);
  }

  48% {
    text-shadow:
      0 0 8px rgba(120, 255, 118, 0.5),
      2px 0 12px rgba(57, 213, 255, 0.2);
  }
}

model-viewer {
  width: 100%;
  height: min(68vh, 650px);
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(120, 255, 118, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 255, 118, 0.06) 1px, transparent 1px),
    radial-gradient(circle at center, #1d2b26 0%, var(--panel) 70%);
  background-size: 32px 32px, 32px 32px, auto;
}

.ar-button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  background: var(--acid);
  color: #061006;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(120, 255, 118, 0.28);
}

.ar-actions {
  display: grid;
  gap: 10px;
}

.selector-panel {
  margin-top: 16px;
}

.selector-toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.category-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.category-filters::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(18, 22, 27, 0.84);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.category-chip:hover,
.category-chip:focus-visible,
.category-chip.is-active {
  border-color: var(--acid);
  color: var(--text);
  outline: none;
  box-shadow: 0 0 18px rgba(120, 255, 118, 0.18);
}

.search-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: rgba(18, 22, 27, 0.9);
  color: var(--text);
  font: inherit;
}

.search-field input:focus {
  border-color: var(--signal);
  outline: none;
  box-shadow: 0 0 18px rgba(57, 213, 255, 0.16);
}

.picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.model-card {
  display: grid;
  gap: 6px;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(120, 255, 118, 0.05), transparent 52%),
    var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.model-card:hover,
.model-card:focus-visible,
.model-card.is-active {
  border-color: var(--acid);
  background: var(--panel-hot);
  outline: none;
}

.model-card.is-active {
  box-shadow:
    inset 0 0 0 1px var(--acid),
    0 0 18px rgba(120, 255, 118, 0.16);
}

.model-tag {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(57, 213, 255, 0.14);
  color: var(--signal);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.model-card strong {
  font-size: 0.98rem;
}

.model-card small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  color: var(--muted);
}

@media (min-width: 760px) {
  .app-shell {
    padding: 28px;
  }

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

  .selector-toolbar {
    grid-template-columns: 1fr minmax(220px, 300px);
    align-items: end;
  }

  .signal-briefing {
    padding: 14px 0 16px 22px;
  }
}
