/* =========================================
   SITE COMPONENTS STYLES
   ========================================= */

/* Container / Panels */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Headings */
h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  line-height: 1.15;
  color: #e9f3ff;
}
h2 {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
}

/* Generic field shells (non-TTS) */
.field label {
  display: block;
  margin-bottom: 0.4rem;
  opacity: 0.9;
}
.field select,
.field input[type="text"],
.field textarea {
  width: 100%;
  background: rgba(10, 15, 22, 0.7);
  border: 1px solid rgba(120, 200, 255, 0.15);
  color: #e8f6ff;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
}

/* Buttons (shared) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

/* Primary glassy button; for global glow use .fx-btn + .fx-glow as well */
.btn-primary {
  background: linear-gradient(
    180deg,
    rgba(0, 140, 255, 0.2) 0%,
    rgba(0, 100, 255, 0.15) 100%
  );
  color: #ffffff;
  border: 1px solid rgba(0, 180, 255, 0.35);
  border-radius: 10px;
  padding: 0.75rem 1.8rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow:
    0 0 25px rgba(0, 170, 255, 0.25),
    inset 0 0 10px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-primary:hover {
  background: linear-gradient(
    180deg,
    rgba(0, 180, 255, 0.3) 0%,
    rgba(0, 120, 255, 0.25) 100%
  );
  box-shadow:
    0 0 35px rgba(0, 200, 255, 0.45),
    inset 0 0 12px rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.98);
  box-shadow:
    0 0 18px rgba(0, 200, 255, 0.3),
    inset 0 0 8px rgba(255, 255, 255, 0.06);
}

.btn-danger {
  background: linear-gradient(180deg, #d44, #a11);
  color: #fff;
  border: 1px solid rgba(255, 60, 60, 0.25);
  box-shadow: 0 0 10px rgba(255, 60, 60, 0.35);
}

.btn-ghost {
  background: linear-gradient(180deg, #0b2a3a, #081a24);
  border: 1px solid rgba(120, 200, 255, 0.2);
  color: #cfefff;
}

/* Utilities */
.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==============================
   Hero CTA — Play Experience
   ============================== */
.hero-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 5rem 0 5rem 0;
}

.btn-cta {
  height: 48px;
  min-width: 180px;
  padding: 0 1.1rem;
  border-radius: 14px;
  background: radial-gradient(
    120% 160% at 50% -40%,
    #21d4ff 0%,
    #0096ff 40%,
    #0062ff 100%
  );
  color: #eaf6ff;
  border: 1px solid rgba(100, 200, 255, 0.35);
  box-shadow:
    0 0 0 1px rgba(0, 255, 255, 0.18) inset,
    0 10px 25px rgba(0, 160, 255, 0.35),
    0 0 35px rgba(0, 180, 255, 0.25);
  letter-spacing: 0.2px;
}

.btn-cta:hover {
  box-shadow:
    0 0 0 1px rgba(0, 255, 255, 0.25) inset,
    0 12px 28px rgba(0, 160, 255, 0.45),
    0 0 40px rgba(0, 200, 255, 0.35);
  transform: translateY(-1px);
}

.btn-cta .tri {
  margin-right: 0.5rem;
  font-weight: 900;
  filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.6));
}

/* Play triangle icon */
.tri {
  font-size: 0.9rem;
  color: #fff;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

/* --- Neon upgrade for Play Experience button (play/stop states) --- */

/* Make Play Experience button taller / hero-sized */
#playExperience.btn-primary {
  padding: 1.2rem 2rem;
  font-size: 1.1rem;
  border-radius: 14px;
  min-height: 60px;
}

/* Default play state (blue/cyan) */
#playExperience.btn-play {
  background: radial-gradient(
    circle at 50% -40%,
    rgba(0, 255, 255, 0.35) 0%,
    rgba(0, 160, 255, 0.25) 45%,
    rgba(0, 100, 255, 0.2) 100%
  );
  border: 1px solid rgba(0, 240, 255, 0.6);
  color: #fff;
  box-shadow:
    0 0 10px rgba(0, 240, 255, 0.75),
    0 0 25px rgba(0, 180, 255, 0.65),
    0 0 55px rgba(0, 180, 255, 0.4),
    inset 0 0 10px rgba(0, 255, 255, 0.2);
  text-shadow: 0 0 6px rgba(0, 255, 255, 0.8);
  transition: all 0.25s ease;
  animation: fx-pulse 2.5s infinite ease-in-out;
}

#playExperience.btn-play:hover {
  background: radial-gradient(
    circle at 50% -40%,
    rgba(0, 255, 255, 0.55) 0%,
    rgba(0, 180, 255, 0.45) 40%,
    rgba(0, 120, 255, 0.35) 100%
  );
  box-shadow:
    0 0 15px rgba(0, 255, 255, 0.85),
    0 0 35px rgba(0, 200, 255, 0.75),
    0 0 65px rgba(0, 180, 255, 0.55),
    inset 0 0 12px rgba(255, 255, 255, 0.15);
  transform: translateY(-2px) scale(1.03);
}

/* Stop state (red neon) */
#playExperience.btn-stop {
  background: radial-gradient(
    circle at 50% -40%,
    rgba(255, 90, 90, 0.3) 0%,
    rgba(255, 40, 40, 0.25) 40%,
    rgba(180, 0, 0, 0.2) 100%
  );
  border: 1px solid rgba(255, 100, 100, 0.6);
  color: #fff;
  box-shadow:
    0 0 10px rgba(255, 50, 50, 0.7),
    0 0 30px rgba(255, 30, 30, 0.5),
    inset 0 0 8px rgba(255, 100, 100, 0.3);
  text-shadow: 0 0 6px rgba(255, 60, 60, 0.8);
  animation: stopPulse 2.6s ease-in-out infinite;
  transition: all 0.25s ease;
}

/* Stronger glow on hover */
#playExperience.btn-stop:hover {
  background: radial-gradient(
    circle at 50% -40%,
    rgba(255, 120, 120, 0.45) 0%,
    rgba(255, 60, 60, 0.35) 40%,
    rgba(180, 0, 0, 0.25) 100%
  );
  box-shadow:
    0 0 20px rgba(255, 80, 80, 0.9),
    0 0 45px rgba(255, 40, 40, 0.7);
}

/* Red pulsing neon animation */
@keyframes stopPulse {
  0%,
  100% {
    box-shadow:
      0 0 12px rgba(255, 60, 60, 0.6),
      0 0 32px rgba(255, 0, 0, 0.35),
      inset 0 0 8px rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow:
      0 0 18px rgba(255, 90, 90, 0.9),
      0 0 54px rgba(255, 20, 20, 0.55),
      inset 0 0 10px rgba(255, 255, 255, 0.2);
  }
}

/* Center the modal with flex, but keep the overlay on the BACKDROP element */
.model-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  justify-content: center;
  align-items: center;
  /* no background here — the backdrop element owns it */
}

/* Backdrop gets the dim + blur and remains the clickable element */
.model-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 0;
}

.model-modal__title {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.8rem 1rem;
  font-weight: 700;
  color: #dff9ff;
  background: #0b121a;
  border-bottom: 1px solid rgba(120, 200, 255, 0.18);
  flex: 0 0 auto;
}

/* Dialog stays above backdrop and is click-through safe */
.model-modal__dialog {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  width: min(1100px, 96vw);
  max-height: min(90dvh, 90vh);
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  background: #0b121a;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 18px rgba(0, 240, 255, 0.35),
    0 0 44px rgba(0, 180, 255, 0.28),
    0 0 84px rgba(0, 120, 255, 0.22);
  animation: fx-pulse 3s ease-in-out infinite;
}

/* The viewer area expands to fill the dialog */
#modal-three-container.three-container {
  flex: 1 1 auto;
  height: auto;
}

#three-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
}

/* Close button stays clickable and above everything */
.model-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  pointer-events: auto;
}
