/* ZAVOZ VPN Mini App — дашборд + приветствие */
:root {
  --round: 20px;
  --round-sm: 14px;
  --round-lg: 28px;
  --font: "Nunito", system-ui, -apple-system, sans-serif;
  --outline: 2px solid color-mix(in srgb, var(--fg) 16%, transparent);
  --shadow-cartoon: 4px 4px 0 rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.2);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--fg, #e8eef2);
  background: var(--bg, #161d26);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  padding:
    max(10px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  -webkit-font-smoothing: antialiased;
}

.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.22;
  filter: blur(48px);
  animation: floaty 8s ease-in-out infinite;
}
.blob:nth-child(1) {
  width: 180px;
  height: 180px;
  background: var(--accent, #3390ec);
  top: -40px;
  right: -30px;
}
.blob:nth-child(2) {
  width: 220px;
  height: 220px;
  background: #c26e1a;
  bottom: 10%;
  left: -80px;
  animation-delay: -2s;
}
.blob:nth-child(3) {
  width: 140px;
  height: 140px;
  background: #2d8a5a;
  bottom: -20px;
  right: 20%;
  animation-delay: -4s;
}
@keyframes floaty {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(10px, -8px) scale(1.04);
  }
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
}

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

.screen {
  animation: fadeIn 0.28s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Загрузчик */
.loader-card {
  text-align: center;
  padding: 3rem 1rem;
}
.loader-emoji {
  font-size: 3rem;
  display: inline-block;
  animation: wobble 2.5s ease-in-out infinite;
}
@keyframes wobble {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}
.loader-text {
  margin-top: 1rem;
  color: var(--hint-color, #8fa3b0);
  font-weight: 700;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.brand-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--secondary-bg, #222c38);
  border-radius: 999px;
  border: var(--outline);
  box-shadow: var(--shadow-cartoon);
}
.brand-emoji {
  font-size: 1.65rem;
  line-height: 1;
}
.brand-text strong {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-text span {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--hint-color, #8fa3b0);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mini-badge {
  font-size: 0.62rem;
  font-weight: 900;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-glow, rgba(51, 144, 236, 0.18));
  color: color-mix(in srgb, var(--accent, #3390ec) 92%, var(--fg));
  border: var(--outline);
}
.mini-badge.warn {
  background: rgba(200, 120, 50, 0.2);
  color: #e8b896;
}
.mini-badge.bad {
  background: rgba(180, 60, 60, 0.2);
  color: #f0a8a8;
}

.card {
  background: var(--secondary-bg, #222c38);
  border-radius: var(--round-lg);
  border: var(--outline);
  box-shadow: var(--shadow-cartoon), var(--shadow-soft);
  padding: 20px 18px;
  margin-bottom: 16px;
}

.hero-card-static {
  position: relative;
  overflow: hidden;
}

.eyebrow-sm {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--accent, #3390ec);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.h2 {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.greet {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--hint-color, #9aaab8);
  margin-bottom: 6px;
}
.greet strong {
  color: var(--fg, #e8eef2);
}

.hero-desc {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--hint-color, #9aaab8);
  line-height: 1.55;
  margin-bottom: 14px;
}
.hero-desc strong {
  color: var(--fg-soft, #dce4ea);
}

.muted {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--hint-color, #9aaab8);
  line-height: 1.55;
}
.muted strong {
  color: var(--fg, #e8eef2);
}

.feature-list {
  list-style: none;
  margin: 16px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--fg-soft, #dce4ea);
  line-height: 1.4;
}
.fi {
  flex-shrink: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.trial-note {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e8b896;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--round-sm);
  background: rgba(200, 130, 60, 0.12);
  border: 1px solid rgba(200, 130, 60, 0.25);
}

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.btn-row.tight {
  margin-top: 4px;
}

.tg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 18px;
  border-radius: var(--round);
  border: var(--outline);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.15s var(--bounce), box-shadow 0.15s ease;
}
.tg-btn:active {
  transform: scale(0.98);
}
.tg-btn.primary {
  background: var(--accent, #3390ec);
  color: var(--button-text-color, #e8f4ff);
  box-shadow: var(--shadow-cartoon);
  border-color: color-mix(in srgb, var(--accent) 50%, #000);
}
.tg-btn.secondary {
  background: var(--secondary-bg, #222c38);
  color: var(--fg, #e8eef2);
  box-shadow: var(--shadow-cartoon);
  filter: brightness(1.05);
}
.tg-btn.ghost {
  background: color-mix(in srgb, var(--secondary-bg, #222c38) 55%, transparent);
  border: 2px dashed color-mix(in srgb, var(--fg) 22%, transparent);
  box-shadow: none;
  color: var(--hint-color, #9aaab8);
}
.tg-btn.full {
  margin-top: 10px;
}
.tg-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Дашборд */
.dash-hero {
  margin-bottom: 14px;
}
.stat-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}
.stat-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hint-color, #8fa3b0);
  margin-bottom: 6px;
}
.stat-bar {
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 10%, transparent);
  overflow: hidden;
  border: var(--outline);
}
.stat-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--accent, #3390ec),
    color-mix(in srgb, var(--accent) 60%, #5fd49a)
  );
  transition: width 0.45s var(--ease, ease);
}
.stat-value {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--fg-soft, #dce4ea);
}
.stat-big {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--fg, #e8eef2);
}

.warn-banner {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--round-sm);
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(180, 100, 60, 0.15);
  color: #f0c0a0;
  border: 1px solid rgba(200, 120, 80, 0.35);
}

.section-h {
  font-size: 1rem;
  font-weight: 900;
  margin: 20px 0 6px;
  letter-spacing: -0.02em;
}
.section-p {
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.app-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 12px;
  border-radius: var(--round);
  background: var(--secondary-bg, #222c38);
  border: var(--outline);
  box-shadow: var(--shadow-cartoon);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: transform 0.15s var(--bounce);
  min-height: 88px;
}
.app-tile:active {
  transform: scale(0.97);
}
.app-tile-name {
  font-size: 0.88rem;
  font-weight: 900;
}
.app-tile-hint {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--hint-color, #8fa3b0);
  line-height: 1.25;
}
.app-tile-ico {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 2px;
}

.link-card .config-snippet {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: var(--round-sm);
  background: color-mix(in srgb, var(--fg) 6%, var(--bg, #161d26));
  border: var(--outline);
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-all;
  max-height: 100px;
  overflow: auto;
  color: var(--hint-color, #9aaab8);
}

.footer {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--hint-color, #6a7a88);
  margin-top: 20px;
  letter-spacing: 0.06em;
}
