:root {
  --bg: #05030a;
  --bg-soft: #0d0817;
  --panel: rgba(16, 10, 30, 0.82);
  --panel-strong: rgba(23, 14, 42, 0.96);
  --line: rgba(177, 116, 255, 0.18);
  --line-strong: rgba(255, 176, 61, 0.42);
  --text: #fbf8ff;
  --muted: #cfc1e9;
  --purple: #8f35ff;
  --purple-2: #d04cff;
  --pink: #ff5ac8;
  --blue: #59b0ff;
  --green: #31d987;
  --orange: #ffab2f;
  --red: #ff6b7c;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  min-height: 100%;
  height: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: var(--app-height, 100dvh);
  font-family: "Manrope", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at 0% 0%, rgba(143, 53, 255, 0.28), transparent 26%),
    radial-gradient(circle at 100% 0%, rgba(89, 176, 255, 0.18), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(255, 90, 200, 0.16), transparent 28%),
    linear-gradient(180deg, #040208 0%, #10061c 48%, #05030a 100%);
  background-attachment: fixed;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
}

body::before {
  left: -80px;
  top: 160px;
  background: rgba(255, 171, 47, 0.12);
}

body::after {
  right: -100px;
  bottom: 120px;
  background: rgba(143, 53, 255, 0.16);
}

.welcome-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  min-height: var(--app-height, 100dvh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(4, 2, 8, 0.94);
  backdrop-filter: blur(18px);
  z-index: 50;
}

.welcome-overlay.hidden {
  display: none;
}

.welcome-card {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, rgba(13, 8, 24, 0.98), rgba(31, 11, 56, 0.96));
  border: 1px solid rgba(177, 116, 255, 0.3);
  border-radius: 34px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.welcome-image,
.lead-image,
.spotlight-image,
.section-hero img {
  width: 100%;
  display: block;
  border-radius: 28px;
}

.welcome-copy h1,
.lead-copy h1 {
  margin: 0 0 16px;
  line-height: 1;
}

.welcome-kicker,
.hero-kicker {
  margin: 0 0 10px;
  color: #e3bcff;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.welcome-copy p,
.lead-text,
.section-hero p,
.card p,
.case-card p {
  color: var(--muted);
  line-height: 1.65;
}

.app-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 16px calc(72px + env(safe-area-inset-bottom, 0px));
  min-height: var(--app-height, 100dvh);
}

.lead-banner,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.lead-banner {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  margin-bottom: 20px;
}

.lead-copy h1 span {
  color: #e47aff;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.switch-button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.switch-button:disabled,
.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.switch-button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.switch-button {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.switch-button.active {
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: 0 14px 30px rgba(143, 53, 255, 0.28);
}

.primary-button {
  background: linear-gradient(135deg, #ff9f1f, #ff4fc7);
  color: white;
  box-shadow: 0 16px 34px rgba(255, 105, 180, 0.22);
}

.secondary-button {
  background: linear-gradient(135deg, rgba(89, 176, 255, 0.16), rgba(49, 217, 135, 0.14));
  color: var(--text);
  border: 1px solid rgba(89, 176, 255, 0.16);
}

.large-button {
  padding: 16px 22px;
}

.hidden {
  display: none !important;
}

.page-panel {
  display: none;
}

.page-panel.active {
  display: block;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.compact-grid {
  gap: 10px;
}

.card {
  padding: 22px;
  margin-bottom: 18px;
}

.accent-card {
  background: linear-gradient(135deg, rgba(113, 44, 215, 0.96), rgba(255, 107, 124, 0.45));
}

.neon-card {
  background:
    radial-gradient(circle at top right, rgba(255, 171, 47, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(17, 11, 31, 0.96), rgba(33, 14, 60, 0.92));
}

.spotlight-card {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: 18px;
  align-items: center;
}

.spotlight-image {
  max-height: 420px;
  object-fit: cover;
}

.section-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.section-hero img {
  max-height: 240px;
  object-fit: cover;
}

.stats-grid,
.check-grid,
.admin-list,
.mini-meta {
  display: grid;
  gap: 12px;
}

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

.stat-pill,
.offer-pill,
.promo-pill,
.case-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.case-card {
  min-height: 150px;
  background:
    radial-gradient(circle at top right, rgba(255, 171, 47, 0.12), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.referral-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.form-row,
.form-grid,
.stack {
  display: grid;
  gap: 12px;
}

.form-row {
  grid-template-columns: 1fr auto;
}

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

input,
select,
textarea {
  width: 100%;
  background:
    linear-gradient(180deg, rgba(10, 7, 18, 0.98), rgba(18, 13, 31, 0.94));
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 15px 16px;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  caret-color: var(--orange);
  -webkit-text-fill-color: var(--text);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 14px 30px rgba(0, 0, 0, 0.14);
  appearance: none;
  color-scheme: dark;
}

input::placeholder,
textarea::placeholder {
  color: rgba(251, 248, 255, 0.52);
}

input:focus,
select:focus,
textarea:focus,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--line-strong);
  box-shadow:
    0 0 0 3px rgba(255, 171, 47, 0.16),
    0 18px 40px rgba(255, 90, 200, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

input::selection,
textarea::selection {
  background: rgba(255, 171, 47, 0.28);
  color: #fff;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.result-box,
.analysis-output,
.payment-box {
  min-height: 160px;
  border-radius: 22px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(6, 4, 12, 0.96), rgba(16, 8, 27, 0.9));
  color: #ddffd9;
  white-space: pre-wrap;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#storeSnapshot {
  white-space: normal;
  display: grid;
  gap: 12px;
}

.analysis-output {
  background:
    radial-gradient(circle at top right, rgba(89, 176, 255, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(11, 7, 20, 0.96), rgba(20, 8, 36, 0.94));
}

.analysis-block {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
}

.loading-block {
  display: grid;
  gap: 12px;
  align-items: center;
}

.loading-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--orange);
  animation: spin 0.9s linear infinite;
}

.wallet-balance {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1;
  color: #fff4c9;
  text-shadow: 0 0 24px rgba(255, 171, 47, 0.22);
}

.wallet-history-item {
  display: grid;
  gap: 4px;
}

.wallet-history-item strong {
  color: #fff4c9;
}

.analysis-block h3 {
  margin-top: 0;
  color: #f2cbff;
}

.analysis-block ul {
  margin: 0;
  padding-left: 18px;
}

.analysis-block p {
  margin-bottom: 0;
}

.verdict-block {
  background:
    radial-gradient(circle at top right, rgba(255, 171, 47, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(20, 10, 36, 0.98), rgba(18, 10, 32, 0.96));
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f4d3ff;
  font-size: 13px;
  font-weight: 800;
}

.compact-list ul {
  display: grid;
  gap: 10px;
}

.compact-list li {
  line-height: 1.55;
}

.focus-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.focus-card {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)),
    rgba(9, 5, 18, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.focus-card.critical {
  border-color: rgba(255, 107, 124, 0.35);
  background:
    radial-gradient(circle at top right, rgba(255, 107, 124, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(39, 11, 24, 0.96), rgba(24, 10, 22, 0.92));
}

.focus-card.important {
  border-color: rgba(255, 171, 47, 0.3);
  background:
    radial-gradient(circle at top right, rgba(255, 171, 47, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(36, 20, 10, 0.96), rgba(22, 12, 12, 0.92));
}

.focus-card.opportunity {
  border-color: rgba(49, 217, 135, 0.24);
  background:
    radial-gradient(circle at top right, rgba(49, 217, 135, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(11, 26, 22, 0.96), rgba(9, 18, 20, 0.92));
}

.focus-card-head {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.focus-card-head h4 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.focus-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.focus-copy {
  display: grid;
  gap: 14px;
}

.focus-copy div {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.focus-label {
  display: inline-block;
  margin-bottom: 8px;
  color: #f8beff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.warning-block {
  border-color: rgba(255, 107, 124, 0.38);
  background: rgba(255, 107, 124, 0.08);
}

.status-text {
  margin-top: 12px;
}

.muted {
  color: var(--muted);
}

.plan-card {
  min-height: 280px;
  position: relative;
}

.plan-card.premium {
  background:
    radial-gradient(circle at top right, rgba(255, 171, 47, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(111, 39, 227, 0.42), rgba(255, 77, 214, 0.14));
}

.plan-badge {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(143, 53, 255, 0.26), rgba(217, 70, 239, 0.24));
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.price-tag {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.payment-box a {
  color: #8ac7ff;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-row input {
  width: 20px;
  height: 20px;
  border-radius: 8px;
  padding: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  .welcome-overlay {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 12px 12px calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .welcome-card,
  .lead-banner,
  .spotlight-card,
  .section-hero,
  .grid.two,
  .grid.three,
  .check-grid,
  .stats-grid,
  .form-row,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .referral-box {
    align-items: stretch;
    flex-direction: column;
  }

  .price-tag {
    position: static;
    display: inline-flex;
    margin-bottom: 16px;
  }

  .app-shell {
    padding: 16px 12px calc(40px + env(safe-area-inset-bottom, 0px));
  }

  .welcome-card {
    gap: 16px;
    padding: 18px;
  }

  .welcome-image {
    max-height: 48vh;
    object-fit: cover;
  }

  .quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .switch-button {
    width: 100%;
    text-align: center;
  }
}
