﻿:root {
  --bg-0: #0b1220;
  --bg-1: #111c2f;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.14);
  --text-main: #f8fafc;
  --text-soft: rgba(248, 250, 252, 0.82);
  --text-hint: rgba(248, 250, 252, 0.62);
  --accent: #22d3ee;
  --accent-2: #3b82f6;
  --danger: #f87171;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --step-pad-x: var(--space-4);
  --shadow-1: 0 14px 36px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 8px 20px rgba(34, 211, 238, 0.18);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: var(--space-4) var(--space-3) calc(96px + env(safe-area-inset-bottom));
  background:
    radial-gradient(1000px 450px at -10% -25%, rgba(59, 130, 246, 0.2), transparent 60%),
    radial-gradient(1000px 450px at 115% -15%, rgba(34, 211, 238, 0.16), transparent 62%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
  color: var(--text-main);
  font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step,
.confirm-box,
.modal__dialog,
.price-and-cart,
.nav-buttons,
.progress {
  width: 100%;
  max-width: 760px;
}

p,
li,
label,
input,
button,
a {
  font-size: clamp(15px, 1.8vw, 16px);
  line-height: 1.45;
}

a {
  color: #7dd3fc;
}

.price-and-cart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.price-pill {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-4);
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.bt-help {
  width: 48px;
  height: 48px;
  margin-left: auto;
  border: 1px solid rgba(125, 211, 252, 0.26);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-2);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.bt-help:hover { filter: brightness(1.05); }
.bt-help:active { transform: translateY(1px) scale(0.98); }

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--step-pad-x);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-1);
  margin-bottom: var(--space-4);
}

.step p {
  margin: 0 0 var(--space-4);
}

.step p strong {
  font-size: clamp(18px, 2.8vw, 20px);
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.choice-card {
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
}

.choice-card:last-of-type {
  margin-bottom: 0;
}

.choice-card__title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.choice-card .buttons {
  margin-bottom: 0;
}

.accounts-label,
.buttons > span {
  width: 100%;
  color: var(--text-soft);
  font-weight: 700;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  min-height: 52px;
  padding: 12px 14px;
  font-weight: 700;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  flex: 1 1 100%;
}

.btn:hover {
  border-color: rgba(125, 211, 252, 0.5);
  background: rgba(255, 255, 255, 0.11);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible,
.email:focus-visible,
.modal__close:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn.selected {
  background: linear-gradient(130deg, rgba(34, 211, 238, 0.36), rgba(59, 130, 246, 0.44));
  border-color: rgba(125, 211, 252, 0.6);
  box-shadow: var(--shadow-2);
}

.btn.full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.confirm-box {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

#summary p { margin: 8px 0; }
#summary hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}

.email {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.email::placeholder {
  color: var(--text-hint);
}

.email:focus {
  border-color: rgba(125, 211, 252, 0.72);
  background: rgba(255, 255, 255, 0.1);
}

#email-error,
#os-error {
  color: var(--danger) !important;
  font-weight: 600;
}

.progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 0 var(--space-4);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.25s ease;
}

.nav-buttons {
  position: fixed;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: calc(100% - ((var(--space-3) + var(--step-pad-x)) * 2));
  max-width: calc(760px - (var(--step-pad-x) * 2));
  bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
  z-index: 40;
  margin: 0;
  padding: var(--space-2);
  border: none;
  border-radius: 16px;
  background: var(--bg-1);
  backdrop-filter: none;
  box-shadow: none;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: var(--space-2);
}

#back {
  width: 100%;
}

#next,
#ok-btn {
  width: 100%;
}

.nav-buttons #next.single-next {
  grid-column: 1 / -1;
  width: calc(100% - (var(--space-4) * 2));
  max-width: calc(100% - (var(--space-4) * 2));
  justify-self: center;
  margin: 0 auto;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  background: rgba(0, 0, 0, 0.72);
  z-index: 999;
}

.modal.active { display: flex; }

.modal__dialog {
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-4);
  background: #111827;
}

.modal__dialog--help {
  width: min(1120px, calc(100vw - 32px));
  height: min(90vh, 920px);
  max-height: 90vh;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.modal__title {
  margin: 0 0 12px;
  font-size: 20px;
}

.help-frame {
  width: 100%;
  flex: 1 1 auto;
  min-height: 360px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0f172a;
}

@media (min-width: 1024px) {
  .modal__dialog--help {
    width: min(1200px, calc(100vw - 56px));
    height: min(92vh, 980px);
  }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  cursor: pointer;
}

.acc-item {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.acc-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

.acc-item summary::-webkit-details-marker { display: none; }

.acc-body,
.acc-body li,
.acc-body p {
  color: var(--text-soft);
}

@media (min-width: 700px) {
  body {
    padding: var(--space-6) var(--space-4) var(--space-6);
  }

  .btn {
    flex: 1 1 calc(50% - 12px);
    min-width: 170px;
  }

  .choice-card {
    padding: var(--space-5);
  }

  .nav-buttons {
    position: static;
    transform: none;
    width: calc(100% - (var(--step-pad-x) * 2));
    max-width: calc(760px - (var(--step-pad-x) * 2));
    margin: 0 auto;
    display: flex;
    border: 0;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }

  #back {
    flex: 0 0 130px;
  }

  #next,
  #ok-btn {
    flex: 1;
  }

  .nav-buttons #next.single-next {
    flex: 0 0 calc(50% - 6px);
    width: calc(50% - 6px);
    max-width: calc(50% - 6px);
    margin: 0 auto;
  }
}

@media (min-width: 1024px) {
  :root {
    --step-pad-x: 30px;
  }

  .step {
    padding: 34px var(--step-pad-x);
  }

  .modal__dialog {
    padding: 32px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.btn.is-loading {
  position: relative;
  overflow: hidden;
  animation: confirmPulse 1.1s ease-in-out infinite;
}

.btn.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 25%, rgba(255, 255, 255, 0.28) 50%, transparent 75%);
  transform: translateX(-130%);
  animation: confirmShimmer 1.2s linear infinite;
}

@keyframes confirmPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.985); }
}

@keyframes confirmShimmer {
  to { transform: translateX(130%); }
}
