:root {
  --bg: #0a0c10;
  --card: #1a1d24;
  --field: #0f1117;
  --primary: #3b82f6;
  --primary-hover: #2563ed;
  --accent: #10b981;
  --text: #f9fafb;
  --muted: #9ca3af;
  --border: #374151;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(700px 400px at 85% 8%, rgba(37, 99, 235, 0.24), transparent 70%),
    radial-gradient(600px 300px at 10% 20%, rgba(16, 185, 129, 0.1), transparent 70%);
  z-index: -3;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.16;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05) 0,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: scan 8s linear infinite;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-gap {
  padding: 64px 0;
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 12, 16, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.logo {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.03em;
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.phone {
  color: var(--muted);
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-ghost {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.hero {
  padding: 84px 0 48px;
}

.hero-card {
  background: linear-gradient(140deg, #151922 0%, #1a1d24 70%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(transparent 97%, rgba(16, 185, 129, 0.15) 98%, transparent 100%),
    linear-gradient(90deg, transparent 97%, rgba(59, 130, 246, 0.15) 98%, transparent 100%);
  background-size: 100% 42px, 42px 100%;
  opacity: 0.2;
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(59, 130, 246, 0.15) 50%, transparent 70%);
  transform: translateX(-80%);
  animation: shine 7s linear infinite;
}

.live-console {
  margin-top: 24px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.9), rgba(15, 17, 23, 0.95));
  position: relative;
  z-index: 1;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.live-console.is-active {
  border-color: rgba(16, 185, 129, 0.72);
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.2);
}

.live-console.is-idle {
  border-color: rgba(55, 65, 81, 0.75);
  opacity: 0.88;
}

.live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.live-head strong {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #86efac;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.live-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.55);
}

.live-badge.idle {
  background: rgba(75, 85, 99, 0.2);
  color: #cbd5e1;
  border-color: rgba(107, 114, 128, 0.6);
}

.live-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.live-metric {
  border: 1px solid rgba(55, 65, 81, 0.8);
  border-radius: 10px;
  background: rgba(10, 12, 16, 0.6);
  padding: 10px;
}

.live-metric span {
  font-size: 12px;
  color: #9ca3af;
  display: block;
}

.live-metric strong {
  color: #10b981;
  font-size: 22px;
}

.live-chat {
  border: 1px solid rgba(55, 65, 81, 0.7);
  border-radius: 10px;
  background: rgba(10, 12, 16, 0.72);
  padding: 10px;
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  max-height: 132px;
  overflow: hidden;
}

.chat-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  animation: chatIn 0.24s ease;
}

.chat-role {
  color: #bfdbfe;
  min-width: 56px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.chat-role.bot {
  color: #6ee7b7;
}

.chat-msg {
  color: #e5e7eb;
}

.eq-wrap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  height: 36px;
  align-items: end;
  margin-bottom: 10px;
}

.eq-bar {
  display: block;
  min-height: 4px;
  background: linear-gradient(180deg, #93c5fd, #10b981);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  height: 10px;
  transition: height 0.18s ease;
}

.live-console.is-idle .eq-bar {
  opacity: 0.45;
  box-shadow: none;
}

.events-feed {
  border: 1px solid rgba(55, 65, 81, 0.7);
  border-radius: 10px;
  background: rgba(10, 12, 16, 0.72);
  overflow: hidden;
}

.event-row {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr auto;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.5);
  font-size: 12px;
  color: #d1d5db;
}

.event-row:last-child {
  border-bottom: 0;
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-path {
  color: #6ee7b7;
  margin-left: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.terminal-line {
  margin: 0 0 12px;
  color: #93c5fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.12;
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 780px;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stats {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 17, 23, 0.65);
  padding: 16px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.stat:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.8);
}

.stat strong {
  color: var(--accent);
  font-size: 30px;
  display: block;
}

.section-title {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0.01em;
  text-wrap: balance;
  text-shadow: 0 0 22px rgba(59, 130, 246, 0.22);
}

.grid {
  display: grid;
  gap: 14px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -40% 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.8), transparent);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.5);
}

.section-gap:nth-of-type(even) .card {
  background: linear-gradient(160deg, rgba(26, 29, 36, 0.92), rgba(15, 17, 23, 0.92));
}

.card:hover::after {
  transform: translateX(140%);
}

.card h3 {
  margin-top: 0;
}

.tag {
  display: inline-block;
  color: var(--accent);
  font-size: 12px;
  margin-bottom: 8px;
}

.steps {
  counter-reset: step;
}

.step-card {
  position: relative;
  padding-top: 34px;
}

.step-card::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 16px;
  left: 18px;
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}

.audio-player {
  display: grid;
  gap: 10px;
  border-color: rgba(16, 185, 129, 0.35);
}

.audio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--field);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.25);
}

.progress {
  width: 100%;
  accent-color: var(--primary);
}

.integrations {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.integration-chip {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--field);
  padding: 8px 13px;
  font-size: 13px;
  color: var(--muted);
  transition: 0.2s ease;
}

.integration-chip:hover {
  color: #bfdbfe;
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.25);
}

.form-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.2);
  backdrop-filter: blur(2px);
}

.lead-form {
  display: grid;
  gap: 12px;
}

.lead-form input,
.lead-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lead-form input:focus,
.lead-form textarea:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.85);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.lead-form textarea {
  min-height: 96px;
  resize: vertical;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  position: relative;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.6);
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.footer {
  border-top: 1px solid rgba(55, 65, 81, 0.5);
  color: var(--muted);
  background: linear-gradient(180deg, rgba(10, 12, 16, 0), rgba(10, 12, 16, 0.9));
}

.footer-inner {
  padding: 28px 0 42px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  flex-wrap: wrap;
}

@keyframes blink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

@keyframes scan {
  0% { transform: translateY(-20%); }
  100% { transform: translateY(20%); }
}

@keyframes shine {
  0% { transform: translateX(-80%); }
  100% { transform: translateX(140%); }
}

@keyframes chatIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Thank You Modal */
.thanks-content {
  text-align: center;
  padding: 1rem 0;
}

.thanks-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.bonus-text {
  color: var(--accent);
  font-weight: 600;
  margin: 1rem 0;
}

/* Diagnosis Modal */
.diagnosis-content {
  max-width: 500px;
}

.diagnosis-body {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.offer-item {
  background: var(--bg-field);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.offer-item strong {
  display: block;
  color: var(--success);
  margin-bottom: 0.5rem;
}

.diagnosis-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

/* Checkbox label */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.checkbox-label a {
  color: var(--accent);
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .diagnosis-actions {
    flex-direction: column;
  }
}

/* --- Gift Wheel --- */
.gift-wheel-content {
  max-width: 500px;
  text-align: center;
}

.wheel-wrapper {
  position: relative;
  margin: 20px auto;
  width: 300px;
  height: 300px;
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    #3B82F6 0deg, #3B82F6 180deg,
    #15171C 180deg, #15171C 225deg,
    #1A1D24 225deg, #1A1D24 270deg,
    #15171C 270deg, #15171C 315deg,
    #1A1D24 315deg, #1A1D24 360deg
  );
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  transition: transform 4s cubic-bezier(0.2, 0.8, 0.3, 1);
  transform: rotate(0deg);
}

.wheel-segment {
  position: absolute;
  width: 50%;
  height: 50%;
  transform-origin: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.wheel-segment.tz-highlight {
  background: rgba(59, 130, 246, 0.15);
}

.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  color: #EF4444;
  z-index: 10;
  text-shadow: 0 0 3px #000;
}

#spinWheelBtn {
  margin-top: 15px;
}

/* Prize list */
.prizes-list {
  margin-top: 20px;
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prize-item {
  padding: 8px 12px;
  border-radius: 6px;
  background: #1A1D24;
  border: 1px solid #2D3748;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.prize-item.highlight {
  border-color: #3B82F6;
  background: rgba(59, 130, 246, 0.1);
  font-weight: bold;
  color: #3B82F6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

/* Wheel result */
.wheel-result {
  margin-top: 20px;
  padding: 20px;
  background: #1A1D24;
  border-radius: 8px;
  border: 2px solid #10B981;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
