:root {
  --bg-dark: #03040b;
  --bg-panel: rgba(8, 9, 18, 0.85);
  --bg-panel-solid: #10111c;
  --accent: #8257e6;
  --accent-secondary: #ff6f91;
  --accent-soft: rgba(130, 87, 230, 0.14);
  --accent-gradient: linear-gradient(135deg, #8257e6 0%, #ff6f91 100%);
  --text-primary: #f5f5f7;
  --text-secondary: #c5c7d3;
  --text-muted: rgba(196, 198, 210, 0.65);
  --border-soft: rgba(255, 255, 255, 0.08);
  --shadow-soft: 0 35px 60px rgba(0, 0, 0, 0.45);
  --shadow-inner: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  --max-width: 1280px;
  --transition: 220ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-dark);
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  margin: 0;
}

.right-stack {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.panel--form {
  flex: 1;
}

.panel--media {
  flex: 1;
  min-height: 320px;
}

.media-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.media-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.media-panel__copy {
  margin-top: 0.5rem;
  color: var(--text-secondary);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.contact-card__lede {
  color: var(--text-secondary);
  margin-top: 0;
}

.contact-card form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.background-scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
      linear-gradient(120deg, rgba(3, 4, 11, 0.45), rgba(16, 15, 27, 0.35)),
      url('../assets/images/detective-study.jpg') center / cover no-repeat;
}

.background-scene__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 4, 11, 0.25), rgba(0, 0, 0, 0.5));
  pointer-events: none;
}





.background-scene__ring {
  position: absolute;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 50%;
  inset: 15%;
  filter: blur(0);
  pointer-events: none;
  box-shadow: 0 0 120px rgba(0, 0, 0, 0.35);
}

.background-scene__ring--one {
  animation: pulse 12s linear infinite;
}

.background-scene__ring--two {
  inset: 10%;
  animation: pulse 16s linear infinite reverse;
}

.background-scene__ring--three {
  inset: 20%;
  animation: pulse 20s linear infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.2;
  }
}

.app-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: 100vh;
  padding: 2rem 2vw 3rem;
}

.primary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  backdrop-filter: blur(16px);
  background: rgba(12, 11, 18, 0.7);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: 'Playfair Display', serif;
}

.brand__title {
  text-transform: uppercase;
  letter-spacing: 0.15rem;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.brand__subtitle {
  font-size: 0.9rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  color: var(--accent-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.guest-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: inline-block;
}

.guest-hint[hidden] {
  display: none;
}

.primary-button,
.ghost-button,
.generate-button {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition);
  color: var(--text-primary);
}

.primary-button {
  background: var(--accent-gradient);
  box-shadow: 0 18px 30px rgba(239, 68, 68, 0.35);
}

.primary-button:hover {
  transform: translateY(-1px) scale(1.01);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-soft);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.generate-button {
  width: 100%;
  margin-top: 1.25rem;
  background: var(--accent-gradient);
  padding-block: 0.9rem;
  font-size: 1.05rem;
}

.generate-button:hover {
  transform: translateY(-1px);
}

/* Detective Writer Container with Overlaid Button */
.detective-writer-container {
  position: relative;
  width: 100%;
  min-height: 320px;
  margin-top: 1.25rem;
  border-radius: 18px;
  overflow: hidden;
}

.detective-writer-image,
.detective-writer-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
  border-radius: 18px;
}

.detective-writer-image[hidden],
.detective-writer-video[hidden] {
  display: none;
}

.detective-writer-container .generate-button {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  transform: none;
  width: auto;
  max-width: none;
  padding: 0.65rem 1.35rem;
  margin: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 10;
  backdrop-filter: blur(4px);
}

.detective-writer-container .generate-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  width: 100%;
  margin: 0;
}

.panel {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(8, 10, 18, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 210px);
}

.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(239, 68, 68, 0.24), transparent 55%),
    radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.16), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}

.panel__inner {
  position: relative;
  padding: 2.5rem 2.25rem;
  overflow-y: auto;
  scroll-behavior: smooth;
  background: transparent;
}

.panel__inner::-webkit-scrollbar {
  width: 10px;
}

.panel__inner::-webkit-scrollbar-track {
  background: transparent;
}

.panel__inner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.panel__inner--form {
  background: transparent;
}

.panel h1 {
  margin-top: 0;
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  letter-spacing: 0.08rem;
}

.lede {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

.panel-card {
  background: linear-gradient(
    145deg,
    rgba(255, 111, 145, 0.18),
    rgba(130, 87, 230, 0.04)
  );
  border-radius: 22px;
  border: 1px solid rgba(255, 111, 145, 0.25);
  padding: 1.6rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-inner);
  position: relative;
  overflow: hidden;
}

.panel-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 111, 145, 0.15);
  pointer-events: none;
}

.panel-card h2 {
  margin-top: 0;
  margin-bottom: 0.9rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
}

.panel-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.panel-card__link {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffb4c7;
  text-decoration: none;
  border: 1px solid rgba(255, 180, 199, 0.4);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  transition: background var(--transition), color var(--transition),
    border var(--transition);
}

.panel-card__link:hover {
  background: rgba(255, 180, 199, 0.15);
  border-color: rgba(255, 180, 199, 0.65);
}

.steps {
  padding-left: 1.25rem;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.steps li {
  color: var(--text-secondary);
  line-height: 1.5;
}

.benefits,
.security {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.benefits li,
.security li {
  position: relative;
  list-style: none;
  padding-left: 1rem;
}

.benefits li::before,
.security li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--accent-secondary);
}

.levels {
  display: grid;
  gap: 1rem;
}

.levels article {
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.levels h3 {
  margin: 0 0 0.4rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
}

.levels p {
  margin: 0;
  color: var(--text-secondary);
}

.contact-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border var(--transition);
}

.contact-link:hover {
  color: var(--accent-secondary);
  border-bottom-color: currentColor;
}

.fieldset {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.25rem;
  background: rgba(18, 17, 26, 0.55);
  box-shadow: var(--shadow-inner);
}

.fieldset legend {
  padding: 0 0.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
}

.level-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
}

.level-toggle label {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  transition: background var(--transition), border var(--transition),
    box-shadow var(--transition);
  display: inline-flex;
  align-items: center;
  position: relative;
}

.level-toggle label.is-selected {
  background: var(--accent-soft);
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.25);
}

.level-toggle input {
  appearance: none;
  position: absolute;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.level-toggle label span {
  pointer-events: none;
  padding-inline: 0.15rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-group span {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(12, 11, 18, 0.65);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border var(--transition), box-shadow var(--transition);
}

select {
  background: rgba(63, 38, 104, 0.75);
  border-color: rgba(192, 132, 252, 0.4);
}

.inline-options input[type='number'] {
  background: rgba(63, 38, 104, 0.75);
  border-color: rgba(192, 132, 252, 0.4);
  appearance: auto;
  -moz-appearance: auto;
}

.inline-options input[type='number']::-webkit-inner-spin-button,
.inline-options input[type='number']::-webkit-outer-spin-button {
  opacity: 1;
  display: block;
}

textarea[name='specialRequests'] {
  background: rgba(63, 38, 104, 0.65);
  border-color: rgba(192, 132, 252, 0.35);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-group small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.verification-notice {
  display: block;
  margin-top: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: rgba(130, 87, 230, 0.12);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

.verification-notice[hidden] {
  display: none;
}

.inline-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.input-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
}

.inline-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.form-group.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.form-group.checkbox input {
  width: auto;
  accent-color: #ef4444;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-group--email {
  flex: 1 1 280px;
}

.form-group--email input[type='email'] {
  background: rgba(63, 38, 104, 0.75);
  border-color: rgba(192, 132, 252, 0.4);
}

.allowance-summary {
  flex: 0 0 240px;
  min-width: 220px;
  background: rgba(33, 17, 56, 0.82);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(192, 132, 252, 0.4);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.allowance-summary__item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.allowance-summary__label {
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.65);
}

.allowance-summary__value {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.result-area {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 18px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  box-shadow: var(--shadow-inner);
}

.result-area h2 {
  margin: 0 0 0.5rem;
  font-family: 'Playfair Display', serif;
}

.result-area p {
  margin: 0 0 1.25rem;
  color: var(--text-secondary);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-area {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(18, 17, 26, 0.8);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-inner);
}

.captcha {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

#captchaChallenge {
  padding: 0.5rem 0.9rem;
  background: rgba(239, 68, 68, 0.2);
  border-radius: 999px;
  font-weight: 600;
}

.primary-footer {
  max-width: var(--max-width);
  width: 100%;
  margin: auto auto 0;
  text-align: center;
  padding: 1rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: rgba(12, 11, 18, 0.7);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  backdrop-filter: blur(16px);
}

@media (max-width: 1200px) {
  .split-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .split-layout {
    grid-template-columns: 1fr;
  }

  .panel {
    max-height: unset;
  }

  .panel__inner {
    max-height: none;
  }

  .panel::before {
    background: radial-gradient(circle at top, rgba(239, 68, 68, 0.24), transparent 55%);
  }
}

@media (max-width: 600px) {
  .app-shell {
    padding: 1.5rem 1.25rem 2rem;
    gap: 1.5rem;
  }

  .primary-header {
    flex-direction: column;
    gap: 1rem;
    padding-inline: 1.1rem;
  }

  .split-layout {
    gap: 1.5rem;
  }

  .panel__inner {
    padding: 1.75rem 1.35rem;
  }

  .fieldset {
    padding: 1.35rem 1.1rem;
  }
}
