:root {
  --bg-top: #0b1b2b;
  --bg-mid: #14324a;
  --bg-bottom: #f4f7fb;
  --ink: #1a2433;
  --muted: #5b6b7c;
  --line: #d7e0ea;
  --card: #ffffff;
  --accent: #1e88e5;
  --accent-dark: #1565c0;
  --ok: #2e7d32;
  --danger: #c62828;
  --shadow: 0 18px 40px rgba(11, 27, 43, 0.18);
  --radius: 16px;
  --font: "DM Sans", system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, #1d4e74 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 28%, #dce7f2 52%, var(--bg-bottom) 100%);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
}

.hide,
[hidden] {
  display: none !important;
}

.root {
  min-height: 100dvh;
}

.container {
  width: min(460px, 100%);
  margin: 0 auto;
  padding: 18px 16px 40px;
  position: relative;
}

/* Creative hero */
.creativeArea {
  text-align: center;
  padding: 28px 8px 8px;
  color: #fff;
}

.mainTitle {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: clamp(1.35rem, 4.6vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.creative-image {
  width: 78px;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.25));
  animation: floatIn 0.7s ease both;
}

.mainTitle span {
  animation: riseIn 0.55s ease 0.08s both;
}

@keyframes floatIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Lang */
.switchLang {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: 600 0.85rem/1 var(--font);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

html[dir="rtl"] .switchLang {
  right: auto;
  left: 16px;
}

/* Subscription card */
.subscriptionAreaWrapper {
  margin-top: 10px;
}

.subscriptionArea {
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 18px 16px 20px;
  animation: cardIn 0.45s ease both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.25;
}

.step .num {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8eef5;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.step.active {
  color: var(--ink);
}

.step.active .num {
  background: var(--accent);
  color: #fff;
}

.step.done .num {
  background: var(--ok);
  color: #fff;
}

.msisdnLabel {
  margin: 0 0 14px;
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.pinHint {
  margin: -6px 0 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.phoneInputWrap {
  margin-bottom: 12px;
}

.phone-input {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 4px 10px 4px 12px;
  background: #fbfcfe;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.phone-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.15);
  background: #fff;
}

.phone .cc {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
  white-space: nowrap;
}

.text-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: 600 1.05rem/1.2 var(--font);
  color: var(--ink);
  padding: 12px 4px;
  min-width: 0;
  letter-spacing: 0.04em;
}

.pin-input .text-input {
  text-align: center;
  letter-spacing: 0.35em;
  font-size: 1.35rem;
}

.checkmark-container::after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.15s ease;
}

.phone-input.valid .checkmark-container::after {
  background:
    radial-gradient(circle at 50% 50%, #fff 0 28%, transparent 29%),
    var(--ok);
  box-shadow: inset 0 0 0 2px #fff;
}

.errorBox {
  min-height: 1.2em;
  margin: 0 0 10px;
  color: var(--danger);
  font-size: 0.86rem;
  text-align: center;
  font-weight: 500;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #2b95f0 0%, var(--accent-dark) 100%);
  color: #fff;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 10px 22px rgba(21, 101, 192, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

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

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  animation: none;
}

/* Mobile number entry — blink / pulse (no popup) */
.pulse-field {
  animation: fieldPulse 1.45s ease-out infinite;
}

.pulse-field.pulse-pause,
.pulse-field.valid {
  animation: none;
}

.pulse-field.blink-once {
  animation: fieldBlink 0.55s ease-in-out 2;
}

@keyframes fieldPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(30, 136, 229, 0.35);
    border-color: #90caf9;
  }
  55% {
    box-shadow: 0 0 0 10px rgba(30, 136, 229, 0);
    border-color: var(--accent);
  }
}

@keyframes fieldBlink {
  0%, 100% {
    border-color: var(--line);
    box-shadow: none;
  }
  50% {
    border-color: var(--accent);
    box-shadow: 0 0 0 5px rgba(30, 136, 229, 0.22);
  }
}

.btn-blink:not(:disabled) {
  animation: btnBlink 1.35s ease-in-out infinite;
}

.btn-blink:disabled {
  animation: none;
}

@keyframes btnBlink {
  0%, 100% {
    filter: brightness(1);
    box-shadow: 0 10px 22px rgba(21, 101, 192, 0.35);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.08);
    box-shadow: 0 12px 28px rgba(21, 101, 192, 0.55);
    transform: scale(1.015);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-field,
  .btn-blink:not(:disabled),
  .pulse-field.blink-once {
    animation: none;
  }
}

.btn.loading {
  pointer-events: none;
  opacity: 0.75;
}

.btn__primary {
  font-size: 1.05rem;
  font-weight: 700;
}

.btn__secondary {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 500;
}

/* Operators */
.operator-list {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.op-btn {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #fbfcfe;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.op-btn:hover {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.12);
}

.op-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.op-name {
  font-weight: 700;
  font-size: 1rem;
}

.op-price {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.submitload {
  display: none;
  width: 28px;
  height: 28px;
  margin: 12px auto 0;
  border: 3px solid #d7e6f5;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.submitload.show {
  display: block;
}

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

/* Legal + checkboxes */
.legalArea {
  margin-top: 18px;
  color: #243447;
  text-align: center;
}

.price-point {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.disclaimer {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.agree-checkboxes {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.checkbox-container {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 12px;
}

.checkbox-container input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.checkbox-label {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #334556;
}

.checkbox-label a {
  color: var(--accent-dark);
  font-weight: 600;
}

html[dir="rtl"] .checkbox-container,
html[dir="rtl"] .step,
html[dir="rtl"] .op-btn,
html[dir="rtl"] .phone-input {
  direction: rtl;
}

@media (min-width: 480px) {
  .container {
    padding-top: 28px;
  }
}
