:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-soft: #0a0a0d;
  --card: #171b26;
  --card-2: #1d2230;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f6fb;
  --muted: #95a0b8;
  --tg: #4da8ff;
  --wa: #62de79;
  --gold: #f2a844;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.44);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "JetBrains Mono", "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

body {
  display: flex;
  justify-content: center;
  padding: 10px;
}

.app-shell {
  width: min(100%, 420px);
  height: calc(100vh - 20px);
}

.app-frame {
  height: 100%;
  border-radius: 32px;
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    var(--bg-soft);
  box-shadow: 0 35px 95px rgba(0, 0, 0, 0.48);
}

.screen {
  display: none;
  height: 100%;
}

.screen.active {
  display: block;
}

.auth-screen {
  position: relative;
  padding: 16px 14px 20px;
  overflow-y: auto;
}

.brand-card,
.auth-card,
.paywall-card,
.hero-card,
.service-card,
.why-card,
.gift-link,
.proxy-link {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  box-shadow: var(--shadow);
}

.brand-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 0 4px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand-logo,
.brand-inline-logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  text-transform: lowercase;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #2a1806;
  background: linear-gradient(145deg, #cf8530, var(--gold));
}

.brand-card h1 {
  margin: 0 0 4px;
  font-size: 1.72rem;
}

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

.auth-card,
.paywall-card {
  margin-top: 12px;
  padding: 18px;
  border-color: rgba(255, 255, 255, 0.12);
}

.auth-card h2 {
  margin: 0;
  font-size: 1.18rem;
}

.auth-copy {
  margin: 8px 0 0;
  color: #c5cee2;
  line-height: 1.45;
}

.auth-card {
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(77, 168, 255, 0.09),
    0 0 26px rgba(77, 168, 255, 0.14);
}

.phone-input-wrap {
  margin-top: 14px;
  display: flex;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.phone-prefix {
  width: 58px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #0f1726;
  background: linear-gradient(145deg, #d8f5ff, #93d8ff);
}

#phone-input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 14px;
  color: var(--text);
  background: transparent;
  font-size: 1.03rem;
  text-align: left;
  font-family: "JetBrains Mono", "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--text);
}

#phone-input::placeholder {
  color: #808ba5;
}

.btn-primary,
.btn-whatsapp {
  margin-top: 12px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  min-height: 50px;
  font-size: 0.97rem;
  font-weight: 700;
}

.btn-primary {
  color: #081521;
  background: linear-gradient(145deg, #7bd0ff, #4da8ff);
  box-shadow:
    0 14px 34px rgba(77, 168, 255, 0.3),
    0 0 20px rgba(77, 168, 255, 0.24);
  cursor: pointer;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.btn-primary:hover {
  box-shadow:
    0 16px 36px rgba(77, 168, 255, 0.34),
    0 0 26px rgba(77, 168, 255, 0.28);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.995);
}

.btn-primary:disabled {
  opacity: 0.56;
}

.btn-whatsapp {
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #0f1f11;
  background: linear-gradient(145deg, #8ef1a5, var(--wa));
}

.auth-hint {
  margin-top: 10px;
  display: block;
  color: var(--muted);
}

.paywall-card h3 {
  margin: 0;
  font-size: 1.14rem;
}

.paywall-card p {
  margin: 8px 0 0;
  color: #c5cee2;
}

.paywall-card {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(4px);
  box-shadow: none;
  z-index: 12;
  display: grid;
  place-items: center;
}

.paywall-panel {
  width: 100%;
  max-height: calc(100vh - 84px);
  overflow-y: auto;
  border: 1px solid rgba(255, 115, 138, 0.45);
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 115, 138, 0.16), rgba(23, 27, 38, 0.97));
  box-shadow:
    var(--shadow),
    0 0 28px rgba(255, 115, 138, 0.25);
}

.paywall-close {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #f2f5ff;
  font-size: 1.2rem;
  cursor: pointer;
}

.paywall-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.paywall-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 115, 138, 0.9);
}

.plans-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.plans-list li {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
}

.benefits-list {
  margin: 10px 0 0;
  padding-left: 16px;
  color: #dbe4fb;
  display: grid;
  gap: 6px;
}

.hidden {
  display: none !important;
}

.app-screen {
  position: relative;
}

.scroll-area {
  height: 100%;
  overflow-y: auto;
  padding: 14px 14px 132px;
}

.tab-content {
  display: none;
  animation: fadein 220ms ease;
}

.tab-content.active {
  display: block;
}

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

.home-top {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.brand-inline-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 0.98rem;
}

.home-title-wrap {
  text-align: right;
}

.home-title {
  margin: 0;
  font-size: 1.85rem;
  line-height: 1.04;
  letter-spacing: 0.01em;
  text-transform: lowercase;
}

.home-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.home-top-spacer {
  width: 48px;
  height: 48px;
}

.home-block + .home-block {
  margin-top: 10px;
}

.hero-card {
  padding: 16px;
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(77, 168, 255, 0.1),
    0 0 28px rgba(77, 168, 255, 0.14);
  text-align: center;
}

.hero-card small {
  color: var(--muted);
}

.hero-card h2 {
  margin: 4px 0 12px;
  font-size: 1.26rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.metric-item {
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
}

.metric-item small {
  color: var(--muted);
}

.metric-item strong {
  display: block;
  margin-top: 6px;
  font-size: 1.24rem;
  font-weight: 700;
}

.section-label {
  margin: 18px 2px 10px;
  color: #8f9ab3;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.service-card {
  padding: 14px;
  cursor: pointer;
  text-align: center;
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.02);
}

.service-icon {
  width: 100%;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.6rem;
}

.service-telegram .service-icon {
  background: linear-gradient(145deg, var(--tg), #6dc2ff);
}

.service-whatsapp .service-icon {
  background: linear-gradient(145deg, var(--wa), #81efa0);
}

.service-card h3 {
  margin: 11px 0 4px;
  font-size: 1.02rem;
}

.service-card small {
  color: var(--muted);
  font-size: 0.83rem;
}

.gift-link {
  margin-top: 12px;
  padding: 13px;
  display: grid;
  grid-template-columns: 54px 1fr 20px;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  box-shadow:
    var(--shadow),
    0 0 22px rgba(242, 168, 68, 0.15);
}

.gift-link-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: #2d1903;
  background: linear-gradient(145deg, #f9bf68, var(--gold));
}

.gift-link-text strong {
  display: block;
}

.gift-link-text small {
  color: var(--muted);
}

.gift-link-arrow {
  color: #aeb7cf;
  font-size: 1.4rem;
}

.why-card {
  padding: 8px 12px;
  box-shadow:
    var(--shadow),
    0 0 24px rgba(114, 86, 255, 0.1);
}

.why-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 2px;
}

.why-row + .why-row {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.why-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.why-fast {
  background: rgba(242, 168, 68, 0.2);
  color: #ffc064;
}

.why-private {
  background: rgba(98, 222, 121, 0.2);
  color: #8bf0a3;
}

.why-online {
  background: rgba(170, 114, 255, 0.2);
  color: #c59aff;
}

.why-row strong {
  display: block;
}

.why-row small {
  color: var(--muted);
}

.list-header {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 8px;
}

.list-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  border: 1px solid var(--line);
}

.list-header-center {
  text-align: right;
}

.list-header h2 {
  margin: 0;
}

.list-header small {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
}

.list-header-telegram .list-header-icon {
  color: var(--tg);
  background: rgba(77, 168, 255, 0.12);
  box-shadow: 0 0 18px rgba(77, 168, 255, 0.18);
}

.list-header-whatsapp .list-header-icon {
  color: var(--wa);
  background: rgba(98, 222, 121, 0.12);
  box-shadow: 0 0 18px rgba(98, 222, 121, 0.18);
}

.list-header-spacer {
  width: 44px;
  height: 44px;
}

.proxy-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.proxy-link {
  padding: 15px 14px;
  min-height: 92px;
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.proxy-link:hover {
  transform: translateY(-1px);
}

.tab-content[data-tab="telegram"] .proxy-link {
  border-color: rgba(77, 168, 255, 0.34);
  background: linear-gradient(
    180deg,
    rgba(77, 168, 255, 0.17),
    rgba(23, 27, 38, 0.96)
  );
  box-shadow:
    var(--shadow),
    0 0 18px rgba(77, 168, 255, 0.16);
}

.tab-content[data-tab="whatsapp"] .proxy-link {
  border-color: rgba(98, 222, 121, 0.34);
  background: linear-gradient(
    180deg,
    rgba(98, 222, 121, 0.16),
    rgba(23, 27, 38, 0.96)
  );
  box-shadow:
    var(--shadow),
    0 0 18px rgba(98, 222, 121, 0.16);
}

.proxy-main {
  display: grid;
  gap: 6px;
}

.proxy-text h3 {
  margin: 0;
  font-size: 1.08rem;
  text-align: left;
}

.proxy-text small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  text-align: left;
}

.proxy-ping {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #c7d1e9;
  font-size: 0.82rem;
}

.ping-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9db5db;
  animation: ping-pulse 1.7s infinite;
}

.tab-content[data-tab="telegram"] .ping-dot {
  background: var(--tg);
}

.tab-content[data-tab="whatsapp"] .ping-dot {
  background: var(--wa);
}

@keyframes ping-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.45);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.proxy-open {
  color: #e8edf9;
  font-size: 0.87rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tabbar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 226px;
  bottom: max(14px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 8px;
  z-index: 9;
}

.tabbar-item {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #2a2d36;
  color: #9397a3;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.tabbar-center {
  width: 68px;
  height: 68px;
  transform: translateY(-7px);
}

.tabbar-home.active {
  background: #f4f4f4;
  color: #111111;
}

.tabbar-side[data-network="telegram"].active {
  background: rgba(77, 168, 255, 0.16);
  border-color: rgba(77, 168, 255, 0.6);
  color: var(--tg);
}

.tabbar-side[data-network="whatsapp"].active {
  background: rgba(98, 222, 121, 0.16);
  border-color: rgba(98, 222, 121, 0.6);
  color: var(--wa);
}

.tabbar-item i {
  font-size: 1.4rem;
}

.tabbar-item.bump {
  animation: tab-bump 220ms ease;
}

@keyframes tab-bump {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 420px) {
  body {
    padding: 0;
  }

  .app-shell {
    width: 100%;
    height: 100vh;
  }

  .app-frame {
    border-radius: 0;
    border: 0;
  }

  .tabbar {
    width: 214px;
  }

  .tabbar-item {
    width: 56px;
    height: 56px;
  }

  .tabbar-center {
    width: 66px;
    height: 66px;
  }
}
