/**
 * HoneypotVPN — визуальная тема
 * Угольный фон + медовый янтарь (без фиолетового / бирюзы оригинала).
 */

:root {
  --bg-0: #12110f;
  --bg-1: #1a1814;
  --bg-2: #24201a;
  --surface: #2a241c;
  --surface-2: #322b21;
  --line: rgba(245, 198, 112, 0.16);
  --line-strong: rgba(245, 198, 112, 0.32);

  --honey: #f0b429;
  --honey-deep: #d4920a;
  --honey-soft: rgba(240, 180, 41, 0.14);
  --ember: #e36a2c;
  --sage: #9bb57a;

  --text: #f6f0e6;
  --muted: #b5aa98;
  --dim: #8a7f6e;

  --danger: #e35d5d;
  --ok: #7cbc6a;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);

  --font: 'Outfit', system-ui, sans-serif;
  --font-display: 'Source Serif 4', Georgia, serif;

  --nav-h: 68px;
  --top-h: 56px;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--honey);
  text-decoration: none;
}

a:hover {
  color: #ffd56a;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(227, 106, 44, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(240, 180, 41, 0.16), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(155, 181, 122, 0.1), transparent 55%),
    linear-gradient(165deg, var(--bg-0), var(--bg-1) 45%, #15130f);
}

.page-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}

.main {
  width: min(480px, 100%);
  margin: 0 auto;
  padding: 24px 18px 40px;
}

.main--app {
  padding-top: calc(var(--top-h) + 16px);
  padding-bottom: calc(var(--nav-h) + 28px);
}

/* Top bar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  background: rgba(18, 17, 15, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.topbar__brand:hover {
  color: var(--honey);
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--honey), var(--ember));
  box-shadow: 0 0 0 3px var(--honey-soft);
  transform: rotate(12deg);
}

.brand-mark--lg {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.topbar__email {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Auth */
.auth {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
  animation: rise 0.55s ease both;
}

.auth__panel {
  width: 100%;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 22px 22px;
  box-shadow: var(--shadow);
}

.auth__brand {
  text-align: center;
  margin-bottom: 22px;
}

.auth__logo {
  margin: 12px 0 6px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(110deg, #fff6e4, var(--honey) 45%, #ffc857 70%, #fff0d0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth__tag {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: 18px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 999px;
}

.auth__tab {
  text-align: center;
  padding: 10px 8px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.auth__tab.is-active {
  background: linear-gradient(135deg, var(--honey), var(--ember));
  color: #1a1208;
}

.auth__hint,
.auth__foot {
  margin-top: 16px;
  text-align: center;
  color: var(--dim);
  font-size: 0.86rem;
}

.auth__foot {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.field__input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field__input:focus {
  border-color: var(--honey);
  box-shadow: 0 0 0 3px var(--honey-soft);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  padding: 10px 14px;
  font-size: 0.9rem;
}

.btn--primary {
  background: linear-gradient(135deg, var(--honey), var(--ember));
  color: #1a1208;
  box-shadow: 0 8px 24px rgba(227, 106, 44, 0.28);
}

.btn--primary:hover {
  filter: brightness(1.05);
}

.btn--secondary {
  background: var(--honey-soft);
  color: var(--honey);
  border: 1px solid var(--line-strong);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
}

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

/* App page */
.app-page {
  display: grid;
  gap: 16px;
  animation: rise 0.45s ease both;
}

.page-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}

.page-head__sub {
  margin: 4px 0 0;
  color: var(--muted);
}

.card {
  background: linear-gradient(160deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

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

.sub-card__days {
  margin: 10px 0 4px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.sub-card__days.is-warn {
  color: var(--danger);
}

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

.action-tile {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.action-tile:hover {
  border-color: var(--line-strong);
  color: var(--honey);
}

.action-tile__ico {
  font-size: 1.1rem;
  color: var(--honey);
}

.chip,
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chip {
  background: rgba(0, 0, 0, 0.3);
  color: var(--muted);
  border: 1px solid var(--line);
}

.badge--trial {
  margin-top: 8px;
  background: var(--honey-soft);
  color: var(--honey);
  border: 1px solid var(--line-strong);
}

.badge--premium {
  margin-top: 8px;
  background: rgba(155, 181, 122, 0.18);
  color: var(--sage);
  border: 1px solid rgba(155, 181, 122, 0.35);
}

.banner {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
}

.banner--amber {
  background: linear-gradient(120deg, rgba(240, 180, 41, 0.18), rgba(227, 106, 44, 0.12));
}

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

.center {
  text-align: center;
}

.code-box {
  margin: 12px 0;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  word-break: break-all;
  color: #ffd98a;
}

.connect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.ghost-link {
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
}

.ghost-link:hover {
  border-color: var(--honey);
  color: var(--honey);
}

/* Plans */
.plan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--surface-2), var(--bg-2));
}

.plan-card__info {
  display: grid;
  gap: 2px;
}

.plan-card__term,
.plan-card__devices,
.plan-card__hint {
  color: var(--muted);
  font-size: 0.82rem;
}

.plan-card__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0;
}

.plan-card__now {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--honey);
}

.plan-card__old {
  color: var(--dim);
  text-decoration: line-through;
  font-size: 0.9rem;
}

/* Family */
.term-grid {
  display: grid;
  gap: 8px;
}

.term-option {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'months price'
    'devices devices';
  gap: 2px 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.term-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.term-option.is-selected {
  border-color: var(--honey);
  box-shadow: 0 0 0 2px var(--honey-soft);
  background: linear-gradient(120deg, rgba(240, 180, 41, 0.12), rgba(0, 0, 0, 0.2));
}

.term-option__months {
  grid-area: months;
  font-weight: 700;
}

.term-option__price {
  grid-area: price;
  color: var(--honey);
  font-weight: 600;
}

.term-option__devices {
  grid-area: devices;
  color: var(--muted);
  font-size: 0.82rem;
}

.family-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
}

.family-summary__sum {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--honey);
  white-space: nowrap;
}

.family-form {
  display: grid;
  gap: 8px;
}

/* Instructions / legal */
.device-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.device-tabs__item {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.device-tabs__item.is-on {
  background: var(--honey-soft);
  border-color: var(--line-strong);
  color: var(--honey);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.steps__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.steps__item p {
  margin: 0;
}

.steps__num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--honey), var(--ember));
  color: #1a1208;
  font-weight: 700;
  font-size: 0.85rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  animation: rise 0.45s ease both;
}

.legal h1 {
  margin-top: 0;
  font-family: var(--font-display);
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 24px));
  height: var(--nav-h);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(26, 24, 20, 0.92);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  z-index: 50;
}

.bottom-nav__btn {
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 12px;
  padding: 8px 4px;
}

.bottom-nav__btn:hover,
.bottom-nav__btn.is-on {
  color: var(--honey);
  background: var(--honey-soft);
}

.bottom-nav__ico {
  font-size: 1.1rem;
  line-height: 1;
}

/* Alerts */
.alert,
.form-error,
.form-ok,
.form-note {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 12px;
  font-size: 0.92rem;
}

.alert--ok,
.form-ok {
  background: rgba(124, 188, 106, 0.15);
  border: 1px solid rgba(124, 188, 106, 0.35);
  color: var(--ok);
}

.alert--error,
.form-error {
  background: rgba(227, 93, 93, 0.14);
  border: 1px solid rgba(227, 93, 93, 0.35);
  color: #ff9b9b;
}

.form-note {
  background: rgba(240, 180, 41, 0.1);
  border: 1px solid var(--line);
  color: var(--honey);
}

.is-hidden {
  display: none !important;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 720px) {
  .main {
    width: min(520px, 100%);
  }

  .auth__panel {
    padding: 34px 30px 26px;
  }
}
