:root {
  --bg: #0b1220;
  --panel: #121a2b;
  --panel-2: #1a243a;
  --text: #e6ecff;
  --muted: #9ab0d1;
  --primary: #3b82f6;
  --primary-2: #2563eb;
  --line: #2c3c5f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-top: 68px;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  backdrop-filter: blur(8px);
  background: rgba(11, 18, 32, 0.86);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 14px;
}

.brand {
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  display: none;
}

.nav {
  display: flex;
  gap: 20px;
  flex: 1;
  margin-left: 20px;
  min-width: 0;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

a,
a:visited {
  color: #8db4ff;
}

a:hover,
a:active {
  color: #b9d2ff;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  background: #1a2740;
  border: 1px solid var(--line);
  color: #c9d8f6;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-2);
}

.btn-secondary {
  background: #22304b;
  border: 1px solid var(--line);
}

.btn.small {
  padding: 7px 12px;
  font-size: 12px;
}

.btn.full {
  width: 100%;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  padding: 56px 0;
}

.tag {
  color: #8db4ff;
  margin: 0 0 8px;
}

.adv-banner {
  margin: 12px 0 14px;
  background: linear-gradient(90deg, #10315d 0%, #1d4f91 100%);
  border: 1px solid #2f6cbf;
  color: #d9e8ff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
}

.adv-banner b {
  color: #ffffff;
}

h1 {
  font-size: 48px;
  line-height: 1.12;
  margin: 0 0 16px;
}

.sub {
  color: var(--muted);
  max-width: 640px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.flow {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.flow-step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
}

.flow-step span {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  margin-right: 8px;
  background: #253a63;
  color: #b9d2ff;
  font-weight: 700;
}

.metrics {
  display: flex;
  gap: 18px;
  margin-top: 24px;
}

.metrics div {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 10px;
  min-width: 120px;
}

.metrics strong {
  display: block;
}

.metrics span {
  color: var(--muted);
  font-size: 12px;
}

.hero-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.mono,
pre,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

pre {
  background: #081021;
  border: 1px solid #25344f;
  border-radius: 10px;
  padding: 14px;
  color: #c4d8ff;
  overflow-x: auto;
}

.token {
  color: #8db4ff;
}

.section {
  width: min(1100px, 100%);
  margin: 30px auto 56px;
}

.section h2 {
  margin: 0;
  font-size: 30px;
  text-align: center;
}

.section-sub {
  color: var(--muted);
  text-align: center;
}

.pricing-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.price-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

.price-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px #3b82f680;
}

.badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--primary);
  color: white;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}

.price {
  font-size: 34px;
  margin: 8px 0;
  font-weight: 700;
}

.price-card ul {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--muted);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.panel {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

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

.panel h3 {
  margin: 8px 0 0;
  font-size: 28px;
}

.ok {
  color: #4ade80;
}

.card {
  width: 100%;
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.admin-feedback-inline {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.admin-section-card {
  margin-top: 14px;
}

.admin-section-content {
  padding: 14px 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  font-size: 13px;
  padding: 10px 10px;
  text-align: center;
}

.compare-table-large th,
.compare-table-large td {
  font-size: 14px;
  padding: 12px 12px;
  text-align: center;
}

.compare-table .best td {
  color: #8fe7b0;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-table-features th,
.compare-table-features td {
  text-align: left;
  vertical-align: top;
  min-width: 11rem;
}

.compare-focus {
  max-width: 1100px;
  margin: 12px auto 56px;
}

.compare-focus h2,
.compare-focus .section-sub {
  text-align: center;
}

body[data-page="index"] .compare-focus {
  margin-left: 0;
  margin-right: 0;
}

body[data-page="index"] .compare-focus h2,
body[data-page="index"] .compare-focus .section-sub,
body[data-page="index"] .compare-table th,
body[data-page="index"] .compare-table td {
  text-align: left;
}

.compare-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px 0;
}

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

th {
  color: #9db4db;
  font-weight: 600;
}

tbody tr:hover {
  background: rgba(35, 52, 81, 0.4);
}

.chip {
  display: inline-block;
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 10px;
}

.chip.on {
  color: #90f3b3;
  background: #124528;
}

.chip.off {
  color: #b7c7e6;
  background: #2f3b52;
}

.chip.warn {
  color: #ffe18d;
  background: #4c3c13;
}

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

.user-meta {
  display: flex;
  gap: 8px;
}

.auth-wrap {
  display: grid;
  place-items: center;
  min-height: 70vh;
}

.auth-card {
  width: min(460px, 92vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}

.input {
  width: 100%;
  margin: 6px 0 12px;
  padding: 10px 12px;
  color: var(--text);
  background: #0b1220;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.auth-tip {
  color: var(--muted);
  font-size: 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 18, 0.72);
  display: grid;
  place-items: center;
  z-index: 999;
}

.modal {
  width: min(520px, 92vw);
  background: #121a2b;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}

.telegram-modal {
  text-align: center;
}

.telegram-qr-image {
  width: min(360px, 78vw);
  height: auto;
  display: block;
  margin: 16px auto 0;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
}

.inapp-tip {
  border: 1px solid #496a9f;
  background: #152a4a;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  color: #dbe8ff;
  font-size: 14px;
}

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

.pay-fallback {
  border-color: #7a5b2b;
}

.trial-card {
  border-color: #2f6cbf;
}

.trial-feedback {
  min-height: 18px;
  margin: 10px 0 0;
  color: #8fe7b0;
  font-size: 13px;
}

button.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.key-once-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #305f9f;
  border-radius: 10px;
  background: #0e1f39;
}

.key-once-title {
  margin: 0;
  font-weight: 700;
}

.key-once-tip {
  margin: 8px 0 10px;
  color: #b9d2ff;
}

.key-once-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.key-once-row code {
  background: #081021;
  border: 1px solid #25344f;
  border-radius: 8px;
  padding: 8px 10px;
  color: #d2e3ff;
}

.key-once-feedback {
  min-height: 18px;
  margin: 8px 0 0;
  color: #8fe7b0;
  font-size: 13px;
}

.site-url-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f1b31;
}

.site-url-label {
  color: #b9d2ff;
  font-size: 13px;
}

.site-url-row code {
  background: #081021;
  border: 1px solid #25344f;
  border-radius: 8px;
  padding: 7px 10px;
  color: #d2e3ff;
}

.site-url-feedback {
  min-height: 18px;
  margin: 8px 16px 0;
  color: #8fe7b0;
  font-size: 13px;
}

.docs-third-party-title {
  font-size: 1.35rem;
  margin: 28px 0 8px;
}

.docs-third-party-lead {
  margin-bottom: 18px;
}

.docs-third-party-card {
  margin-bottom: 14px;
}

.docs-third-party-card:last-of-type {
  margin-bottom: 0;
}

.docs-card-body {
  padding: 16px;
}

.docs-steps {
  margin: 0 0 14px;
  padding-left: 22px;
}

.docs-steps li {
  margin-bottom: 10px;
}

.docs-steps li:last-child {
  margin-bottom: 0;
}

.docs-bullet-list {
  margin: 10px 0 14px;
  padding-left: 22px;
}

.docs-bullet-list li {
  margin-bottom: 8px;
}

.docs-note {
  margin-bottom: 0;
  font-size: 13px;
}

.docs-separator {
  border: none;
  border-top: 1px solid var(--line);
  margin: 36px 0 22px;
}

.docs-dev-intro {
  margin-bottom: 18px;
}

.forum-page {
  max-width: 980px;
}

.forum-list-card {
  padding: 0;
}

.forum-list-item {
  display: block;
  padding: 18px 20px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.forum-list-item:last-child {
  border-bottom: 0;
}

.forum-list-item:hover {
  background: rgba(35, 52, 81, 0.4);
  color: var(--text);
}

.forum-list-kicker {
  display: block;
  margin-bottom: 6px;
  color: #8db4ff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.forum-list-title {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.forum-list-meta {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.forum-back {
  display: inline-block;
  margin-bottom: 16px;
  text-decoration: none;
}

.forum-article {
  overflow: visible;
}

.article-body {
  padding: 20px;
}

.article-body h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.article-body h3 {
  margin: 22px 0 8px;
  font-size: 18px;
}

.article-body p {
  color: #d8e2f7;
  line-height: 1.75;
}

.article-body .article-meta {
  margin: 0 0 8px;
  color: var(--muted);
}

.article-body pre {
  overflow-x: auto;
  margin: 16px 0 22px;
  padding: 16px;
  background: #081021;
  border: 1px solid #25344f;
  border-radius: 10px;
  color: #d2e3ff;
  line-height: 1.5;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .container {
    width: min(1200px, 94vw);
  }

  .topbar-inner {
    height: auto;
    min-height: 68px;
    padding: 10px 0;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .brand {
    font-size: 30px;
    line-height: 1;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    padding-top: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .topbar-right {
    margin-left: auto;
    gap: 8px;
  }

  .user-pill {
    font-size: 12px;
    padding: 6px 10px;
  }

  h1 {
    font-size: 40px;
    line-height: 1.2;
  }

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

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

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

  .card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 760px;
  }
}
