/* VPN site — моноширинный стиль «как в терминале Linux» (Ubuntu Mono + bold) */
@import url("https://fonts.bunny.net/css?family=ubuntu-mono:400,700&display=swap");

:root {
  --bg: #0a0a0b;
  --bg-elevated: #121214;
  --surface: #18181b;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e8ec;
  --text-muted: #8b8b96;
  --accent: #7dd3c0;
  --accent-dim: rgba(125, 211, 192, 0.15);
  --danger: #f08080;
  --radius: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Noto Sans Mono",
    ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(
      ellipse 120% 80% at 50% -20%,
      rgba(125, 211, 192, 0.07),
      transparent 55%
    ),
    radial-gradient(
      ellipse 80% 50% at 100% 100%,
      rgba(125, 211, 192, 0.04),
      transparent 45%
    );
  -webkit-font-smoothing: antialiased;
}

b,
strong {
  font-weight: 700;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover {
  color: #9fe8d6;
}

.wrap {
  width: min(720px, calc(100% - 2.5rem));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 11, 0.78);
  border-bottom: 1px solid var(--border);
  animation: header-in 0.7s var(--ease) both;
}

@keyframes header-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  max-width: 900px;
  margin: 0 auto;
  width: min(900px, calc(100% - 2.5rem));
}

.logo {
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
}

.logo span {
  color: var(--accent);
  font-weight: 700;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}

nav a {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

nav a:hover {
  color: var(--text);
}

/* Hero & sections */
main {
  padding-bottom: 4rem;
}

.hero {
  padding: 3.5rem 0 2.5rem;
}

.hero h1 {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 1rem;
  line-height: 1.35;
  animation: fade-up 0.85s var(--ease) 0.05s both;
}

.hero .lead {
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 38em;
  animation: fade-up 0.85s var(--ease) 0.12s both;
}

.hero .lead code,
.lead code {
  font-family: var(--font);
  font-size: 0.92em;
  padding: 0.12em 0.35em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--accent);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: fade-up 0.85s var(--ease) 0.2s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease),
    transform 0.25s var(--ease), box-shadow 0.3s var(--ease);
}

.btn:hover {
  border-color: rgba(125, 211, 192, 0.35);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-dim);
  border-color: rgba(125, 211, 192, 0.35);
  color: var(--accent);
}

.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(125, 211, 192, 0.2);
}

.section {
  padding: 2.25rem 0;
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.section p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
}

.section p:last-child {
  margin-bottom: 0;
}

.list-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.list-steps li {
  position: relative;
  padding: 0.85rem 0 0.85rem 2.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.3s var(--ease);
}

.list-steps li:last-child {
  border-bottom: none;
}

.list-steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.85rem;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.list-steps strong {
  display: block;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* Cards (instructions apps) */
.cards {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 520px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  padding: 1rem 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.card:hover {
  border-color: rgba(125, 211, 192, 0.2);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.card p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* Code / URL block */
.code-block {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 11px;
  word-break: break-all;
  color: var(--accent);
  line-height: 1.45;
}

/* Profile */
.profile-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  animation: fade-up 0.6s var(--ease) both;
}

.profile-card h1 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  letter-spacing: 0.04em;
}

.status-pill {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.status-pill.ok {
  border-color: rgba(125, 211, 192, 0.4);
  color: var(--accent);
  background: var(--accent-dim);
}

.status-pill.no {
  border-color: rgba(240, 128, 128, 0.35);
  color: var(--danger);
  background: rgba(240, 128, 128, 0.08);
}

.meta-row {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 1rem;
  font-size: 12px;
}

.meta-row dt {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meta-row dd {
  margin: 0;
  color: var(--text);
}

#tg-login-container {
  min-height: 48px;
  margin-top: 0.5rem;
}

#tg-login-container iframe {
  border-radius: var(--radius) !important;
}

.hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.5;
}

footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* Оплата */
.pay-form-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  animation: fade-up 0.65s var(--ease) both;
}

.pay-form-card label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.pay-select {
  width: 100%;
  max-width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.1rem;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 4px),
    calc(100% - 13px) calc(50% + 4px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.pay-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.pay-actions-row .btn {
  min-height: 48px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.pay-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.55;
}

.profile-pay {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Мобильная вёрстка */
@supports (padding: max(0px)) {
  body {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .wrap {
    width: calc(100% - 1.5rem);
  }

  .site-header .inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    width: calc(100% - 1.5rem);
  }

  .site-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: flex-start;
  }

  nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero h1 {
    font-size: 1.2rem;
  }

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

  .actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .btn {
    min-height: 44px;
  }

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

  .profile-card {
    padding: 1.15rem;
  }

  .code-block {
    font-size: 10px;
    padding: 0.65rem 0.75rem;
  }
}

@media (hover: none) and (pointer: coarse) {
  a:active,
  .btn:active {
    opacity: 0.88;
  }
}
