:root {
  --bg: #050607;
  --bg-soft: #0a0d0f;
  --surface: rgba(18, 20, 22, 0.84);
  --surface-strong: #111416;
  --surface-muted: #191d20;
  --ink: #f4f7f8;
  --ink-soft: #d7dddf;
  --muted: #8c969b;
  --line: rgba(225, 232, 235, 0.12);
  --line-strong: rgba(225, 232, 235, 0.22);
  --accent: #8bf0d2;
  --accent-strong: #42c9a8;
  --accent-dark: #12372f;
  --danger: #f05f57;
  --warning: #e3e7a4;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(139, 240, 210, 0.12), transparent 28%),
    radial-gradient(circle at 92% 16%, rgba(240, 95, 87, 0.08), transparent 26%),
    linear-gradient(180deg, #050607 0%, #0b0e10 42%, #050607 100%);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  opacity: 0.38;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 49.8%, rgba(255, 255, 255, 0.07) 50%, transparent 50.2%),
    linear-gradient(180deg, transparent 0 49.8%, rgba(255, 255, 255, 0.05) 50%, transparent 50.2%);
  background-size: 100% 100%, 100% 100%;
  opacity: 0.18;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 16px clamp(18px, 5vw, 68px);
  background: rgba(5, 6, 7, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.brand::before {
  content: "";
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 37%, var(--accent) 38% 48%, transparent 49%),
    radial-gradient(circle at 65% 35%, var(--accent), transparent 32%),
    #090c0e;
  box-shadow: 0 0 22px rgba(139, 240, 210, 0.28);
}

nav {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 8px 10px;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

nav a:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(48px, 7vw, 86px) clamp(18px, 5vw, 68px) clamp(42px, 6vw, 72px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 14% -10% auto auto;
  width: min(680px, 58vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px 15px),
    radial-gradient(circle, rgba(139, 240, 210, 0.12), transparent 62%);
  opacity: 0.26;
  transform: rotate(-12deg);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy::before {
  content: "BANK BONUS INTELLIGENCE";
  display: inline-flex;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--accent);
  background: rgba(139, 240, 210, 0.06);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero-copy h1 {
  max-width: 900px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(36px, 4.8vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 700px;
  margin: 24px 0 34px;
  color: var(--ink-soft);
  font-size: clamp(18px, 2vw, 22px);
}

.primary-action,
.quiz-options button,
.chat-form button,
.quiz-result button,
.chat-header button {
  border: 1px solid rgba(139, 240, 210, 0.34);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #04100d;
  cursor: pointer;
  font-weight: 800;
  padding: 14px 18px;
  box-shadow: 0 14px 34px rgba(66, 201, 168, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
}

.primary-action:hover,
.quiz-options button:hover,
.chat-form button:hover,
.quiz-result button:hover,
.chat-header button:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 247, 248, 0.62);
  box-shadow: 0 18px 46px rgba(66, 201, 168, 0.28);
}

.hero-panel {
  position: relative;
  z-index: 1;
  min-height: 390px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 22%),
    radial-gradient(circle at 70% 20%, rgba(139, 240, 210, 0.2), transparent 30%),
    linear-gradient(145deg, rgba(18, 20, 22, 0.94), rgba(5, 6, 7, 0.88));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle, #000, transparent 72%);
  opacity: 0.42;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -68px;
  bottom: -60px;
  width: 280px;
  aspect-ratio: 1;
  border: 1px solid rgba(139, 240, 210, 0.32);
  border-radius: 50%;
  box-shadow: inset 0 0 38px rgba(139, 240, 210, 0.1), 0 0 60px rgba(139, 240, 210, 0.08);
}

.bonus-card {
  position: relative;
  z-index: 1;
  width: min(84%, 390px);
  aspect-ratio: 1.58;
  display: grid;
  align-content: space-between;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(8, 10, 12, 0.72);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
}

.bonus-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.bonus-card strong {
  display: block;
  color: var(--accent);
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
}

.bonus-card small {
  color: var(--ink-soft);
}

.quiz-section,
.chat-section {
  padding: 76px clamp(18px, 5vw, 68px);
}

.quiz-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.quiz-card,
.chat-widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quiz-card {
  max-width: 860px;
  padding: clamp(22px, 4vw, 42px);
}

.quiz-progress {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.quiz-progress div {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.quiz-progress i {
  display: block;
  width: 33%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  box-shadow: 0 0 22px rgba(139, 240, 210, 0.45);
}

.quiz-card h3 {
  margin: 28px 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.14;
  letter-spacing: 0;
}

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

.quiz-options button {
  min-height: 58px;
  text-align: left;
}

.quiz-result {
  display: grid;
  gap: 18px;
  align-items: center;
  justify-items: start;
}

.quiz-result p {
  margin: 0;
  color: var(--ink-soft);
}

.loader {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.chat-section {
  padding-top: 56px;
}

.chat-widget {
  max-width: 860px;
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.chat-header strong {
  color: var(--ink);
}

.chat-header button {
  min-width: 118px;
}

.chat-messages {
  height: 0;
  padding: 0 20px;
  overflow: auto;
  scrollbar-color: var(--accent-dark) transparent;
  transition: height 0.2s ease;
}

.chat-widget[data-open="true"] .chat-messages {
  height: 380px;
  padding-block: 20px;
}

.message {
  max-width: min(88%, 660px);
  margin-bottom: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.075);
  color: var(--ink-soft);
}

.message span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.message p {
  margin: 0;
  overflow-wrap: anywhere;
}

.message-user {
  margin-left: auto;
  border-color: rgba(139, 240, 210, 0.3);
  background: rgba(139, 240, 210, 0.12);
  color: var(--ink);
}

.message-operator {
  border-color: rgba(227, 231, 164, 0.28);
  background: rgba(227, 231, 164, 0.11);
}

.chat-form {
  display: flex;
  gap: 10px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  background: rgba(5, 6, 7, 0.32);
}

.chat-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.chat-form input::placeholder {
  color: var(--muted);
}

.site-footer {
  padding: 34px clamp(18px, 5vw, 68px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.site-footer p {
  max-width: 1180px;
  margin: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 840px) {
  .site-header {
    align-items: flex-start;
  }

  nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: 320px;
  }
}

@media (max-width: 620px) {
  .site-header,
  .chat-form {
    flex-direction: column;
    align-items: stretch;
  }

  nav {
    justify-content: flex-start;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .quiz-progress {
    align-items: flex-start;
    flex-direction: column;
  }

  .quiz-progress div {
    width: 100%;
  }

  .chat-header {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-header button,
  .chat-form button {
    width: 100%;
  }

  .chat-widget[data-open="true"] .chat-messages {
    height: 420px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
