:root {
  color-scheme: dark;
  --bg: #070a13;
  --bg-soft: rgba(255, 255, 255, 0.04);
  --stroke: rgba(255, 255, 255, 0.12);
  --text: #f7f8fb;
  --muted: #a9b1c7;
  --primary: #7b8bff;
  --accent: #58e0c1;
  --danger: #ff6f89;
  --shadow: 0 18px 55px rgba(3, 8, 28, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--accent), var(--primary));
  box-shadow: 0 0 16px rgba(88, 224, 193, 0.7);
}

.top-links {
  display: inline-flex;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.top-links a {
  text-decoration: none;
  transition: color 0.2s;
}

.top-links a:hover {
  color: var(--text);
}

.hero {
  margin: 8px 0 18px;
  padding: 44px;
}

.badge {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 7px 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.04;
}

.hero-subtitle {
  margin: 14px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.hero-points {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-points span {
  background: var(--bg-soft);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}

.process-grid {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.process-card {
  padding: 18px;
  border-radius: 16px;
}

.process-card h3 {
  margin: 0;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.process-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card {
  margin-bottom: 14px;
  padding: 26px;
}

.card-head h2 {
  margin: 0;
  font-size: 22px;
}

.card-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

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

input,
select {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(11, 18, 35, 0.7);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(123, 139, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(123, 139, 255, 0.25);
}

.mode-switch {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mode-btn {
  border: 1px solid var(--stroke);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 11px;
  padding: 10px 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn.active,
.mode-btn:hover {
  border-color: rgba(123, 139, 255, 0.7);
  color: var(--text);
}

.info {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px dashed var(--stroke);
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}

.product-tabs {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 2px;
}

.tab-btn {
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--muted);
  padding: 10px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.tab-btn.active {
  background: rgba(123, 139, 255, 0.2);
  border-color: rgba(123, 139, 255, 0.7);
  color: var(--text);
}

.plans-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.plan-card {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.plan-card:hover {
  transform: translateY(-2px);
  border-color: rgba(88, 224, 193, 0.5);
}

.plan-card.active {
  border-color: rgba(88, 224, 193, 0.9);
  background: rgba(88, 224, 193, 0.08);
}

.plan-card h3 {
  margin: 0;
  font-size: 17px;
}

.plan-price {
  margin: 10px 0 4px;
  font-size: 26px;
  font-weight: 700;
}

.plan-price-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-discount {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(88, 224, 193, 0.6);
  background: rgba(88, 224, 193, 0.16);
  color: #d6fff4;
  font-size: 12px;
  font-weight: 700;
}

.plan-monthly {
  margin: 0 0 6px;
  color: #d7def0;
  font-size: 13px;
  font-weight: 500;
}

.plan-meta {
  color: var(--muted);
  font-size: 13px;
}

.checkout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.checkout h2 {
  margin: 0 0 7px;
}

#checkoutSummary {
  margin: 0;
  color: var(--muted);
}

.checkout-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.connections-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.connection-card {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.015);
}

.connection-card.ready {
  border-color: rgba(88, 224, 193, 0.45);
}

.connection-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.connection-head h3 {
  margin: 0;
  font-size: 16px;
}

.connection-status {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  color: var(--muted);
}

.connection-status.ok {
  border-color: rgba(88, 224, 193, 0.6);
  color: #d6fff4;
  background: rgba(88, 224, 193, 0.14);
}

.connection-status.wait {
  border-color: rgba(123, 139, 255, 0.6);
  color: #dfe4ff;
  background: rgba(123, 139, 255, 0.14);
}

.connection-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.connection-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.connection-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(120deg, #6f86ff, #8f7cff);
  color: #fff;
  box-shadow: 0 8px 24px rgba(111, 134, 255, 0.28);
}

.btn-accent {
  background: linear-gradient(120deg, #3bd3b1, #58e0c1);
  color: #032018;
  box-shadow: 0 10px 26px rgba(59, 211, 177, 0.3);
}

.status-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px 0;
}

.status-card {
  width: min(760px, 100%);
}

.status-steps {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.status-step {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 13px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  transition: all 0.25s ease;
}

.status-step-index {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.status-step.active {
  color: var(--text);
  border-color: rgba(123, 139, 255, 0.7);
  background: rgba(123, 139, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(123, 139, 255, 0.18), 0 8px 24px rgba(65, 84, 214, 0.2);
}

.status-step.done {
  color: #d6fff4;
  border-color: rgba(88, 224, 193, 0.7);
  background: rgba(88, 224, 193, 0.15);
}

.status-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.delivery-block {
  margin-top: 16px;
}

.flow-step {
  margin-top: 12px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.015);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.flow-step:hover {
  transform: translateY(-1px);
  border-color: rgba(123, 139, 255, 0.35);
}

.step-pop {
  animation: stepPop 0.35s ease;
}

@keyframes stepPop {
  0% {
    transform: translateY(4px);
    opacity: 0.72;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.platform-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-btn {
  border: 1px solid var(--stroke);
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.platform-btn.active {
  color: var(--text);
  border-color: rgba(123, 139, 255, 0.7);
  background: rgba(123, 139, 255, 0.16);
  box-shadow: 0 8px 20px rgba(123, 139, 255, 0.2);
}

.delivery-head {
  margin: 0 0 10px;
}

.delivery-head h3 {
  margin: 0;
}

.delivery-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.delivery-link {
  margin-top: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.happ-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 2px 0 0;
}

.platform-hint {
  width: 100%;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.happ-link {
  text-decoration: none;
  border: 1px solid rgba(88, 224, 193, 0.6);
  color: #d9fff6;
  background: rgba(88, 224, 193, 0.14);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.happ-link:hover {
  border-color: rgba(88, 224, 193, 0.9);
  background: rgba(88, 224, 193, 0.22);
  transform: translateY(-1px);
}

.install-panel {
  margin-top: 10px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 12px;
}

#configLink {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  position: relative;
  z-index: 1;
  align-items: center;
  gap: 8px;
}

#configLink::after {
  content: "↗";
  font-size: 15px;
  line-height: 1;
}

.loading-info {
  position: relative;
  overflow: hidden;
}

.loading-info::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  animation: shimmer 1.8s infinite;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

.install-panel ol {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.copy-btn {
  margin-top: 10px;
}

.footer {
  padding: 8px 0 38px;
  color: var(--muted);
  text-align: center;
}

.footer-links {
  display: inline-flex;
  gap: 16px;
  margin-bottom: 9px;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.link-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--text);
}

.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(5, 9, 19, 0.68);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(82vh, 860px);
  padding: 22px;
  overflow: auto;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.modal-head h2 {
  margin: 0;
  font-size: 22px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.legal-content {
  color: var(--muted);
  line-height: 1.6;
}

.legal-content h3 {
  margin: 16px 0 8px;
  color: var(--text);
  font-size: 16px;
}

.legal-content p {
  margin: 0;
}

.legal-content ul {
  margin: 0;
  padding-left: 18px;
}

.legal-content li {
  margin-bottom: 6px;
}

.legal-content a {
  color: #cfd5ff;
}

.glass {
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(18, 28, 53, 0.6), rgba(10, 15, 31, 0.72));
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.bg-orb {
  position: fixed;
  z-index: -3;
  border-radius: 50%;
  filter: blur(70px);
}

.orb-1 {
  width: 420px;
  height: 420px;
  background: rgba(88, 224, 193, 0.21);
  top: -120px;
  left: -60px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: rgba(123, 139, 255, 0.24);
  bottom: -180px;
  right: -80px;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -4;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 26px 26px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(6, 11, 24, 0.95);
  color: var(--text);
  z-index: 20;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .process-grid {
    grid-template-columns: 1fr;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

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

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

  .status-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .hero {
    padding: 28px 22px;
  }

  .card {
    padding: 20px;
  }

  .plans-grid {
    grid-template-columns: 1fr;
  }

  #configLink {
    position: sticky;
    bottom: 10px;
    z-index: 5;
  }
}
