:root {
  --bg: #071018;
  --bg-2: #0b1621;
  --panel: rgba(255,255,255,.055);
  --panel-strong: rgba(255,255,255,.085);
  --border: rgba(255,255,255,.10);
  --text: #f5f7fa;
  --muted: #97a6b5;
  --accent: #54e6a7;
  --accent-2: #73a8ff;
  --danger: #ff7b7b;
  --shadow: 0 30px 80px rgba(0,0,0,.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(84,230,167,.08), transparent 35%),
    linear-gradient(180deg, var(--bg), #08131d 45%, #071018);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(7,16,24,.70);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #03110c;
  background: linear-gradient(135deg, var(--accent), #b6ffda);
  box-shadow: 0 10px 30px rgba(84,230,167,.22);
}

.nav-links {
  display: flex;
  gap: 26px;
  font-size: 14px;
  color: var(--muted);
}

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

.btn {
  border: 0;
  border-radius: 14px;
  min-height: 50px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-small {
  min-height: 42px;
  padding: 0 16px;
  font-size: 14px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8ef1bf);
  color: #07150f;
  box-shadow: 0 14px 40px rgba(84,230,167,.18);
}

.btn-secondary {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline {
  border: 1px solid rgba(84,230,167,.35);
  color: var(--accent);
  background: rgba(84,230,167,.07);
}

.hero {
  min-height: 740px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 90px 0 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  align-items: center;
  gap: 70px;
  position: relative;
  z-index: 2;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  opacity: .35;
}

.hero-glow-1 {
  width: 420px;
  height: 420px;
  right: 8%;
  top: 8%;
  background: rgba(84,230,167,.17);
}

.hero-glow-2 {
  width: 360px;
  height: 360px;
  left: -120px;
  bottom: -80px;
  background: rgba(115,168,255,.12);
}

.badge, .eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
}

.badge {
  width: fit-content;
  padding: 9px 12px;
  border: 1px solid rgba(84,230,167,.22);
  background: rgba(84,230,167,.07);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(84,230,167,.10);
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin: 24px 0 20px;
  font-size: clamp(48px, 7vw, 88px);
  line-height: .98;
  letter-spacing: -.065em;
}

h1 span {
  color: var(--accent);
}

.hero-text {
  max-width: 650px;
  font-size: 19px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.hero-meta {
  margin-top: 46px;
  display: flex;
  gap: 34px;
}

.hero-meta div {
  display: flex;
  flex-direction: column;
}

.hero-meta strong {
  font-size: 24px;
  letter-spacing: -.04em;
}

.hero-meta span {
  color: var(--muted);
  font-size: 13px;
}

.app-preview {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.app-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.server-title {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 800;
}

.online-pill {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent);
  background: rgba(84,230,167,.08);
  border: 1px solid rgba(84,230,167,.2);
}

.shield-wrap {
  text-align: center;
  padding: 56px 20px 46px;
}

.shield-ring {
  width: 150px;
  height: 150px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(84,230,167,.14), rgba(84,230,167,.03) 60%, transparent 61%);
  border: 1px solid rgba(84,230,167,.15);
  box-shadow: inset 0 0 50px rgba(84,230,167,.06), 0 0 70px rgba(84,230,167,.08);
}

.shield {
  width: 78px;
  height: 78px;
  border-radius: 25px;
  display: grid;
  place-items: center;
  font-size: 35px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #95f4c3);
  color: #07150f;
  transform: rotate(45deg);
}

.shield::first-letter {
  transform: rotate(-45deg);
}

.shield-wrap h3 {
  font-size: 28px;
  margin-bottom: 6px;
}

.shield-wrap p {
  max-width: 340px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
}

.connection-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.connection-card > div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.06);
}

.connection-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.green {
  color: var(--accent);
}

.trust-strip {
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.025);
}

.trust-items {
  min-height: 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: center;
  text-align: center;
  color: #c8d2dc;
  font-size: 14px;
}

.section {
  padding: 110px 0;
}

.section-soft {
  background: rgba(255,255,255,.022);
  border-top: 1px solid rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.section-head {
  max-width: 700px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head.left {
  text-align: left;
  margin: 0;
}

.section-head h2 {
  margin: 9px 0 12px;
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: -.05em;
}

.section-head p {
  color: var(--muted);
}

.feature-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card,
.price-card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 24px;
  padding: 26px;
}

.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(84,230,167,.08);
  font-size: 25px;
  margin-bottom: 22px;
}

.feature-card h3 {
  margin-bottom: 8px;
  font-size: 21px;
}

.feature-card p,
.price-card p {
  color: var(--muted);
  margin-bottom: 0;
}

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

.server-card {
  text-align: left;
  min-height: 96px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 20px;
  padding: 18px;
  color: var(--text);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.server-card:hover,
.server-card.active {
  border-color: rgba(84,230,167,.38);
  background: rgba(84,230,167,.065);
}

.flag-big {
  font-size: 32px;
}

.server-card strong,
.server-card span {
  display: block;
}

.server-card div span {
  color: var(--muted);
  font-size: 13px;
}

.server-status {
  color: var(--accent);
  font-size: 12px;
}

.selected-server {
  text-align: center;
  margin-top: 24px;
  color: var(--muted);
}

.selected-server strong {
  color: var(--text);
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.price-card.featured {
  border-color: rgba(84,230,167,.35);
  background:
    linear-gradient(180deg, rgba(84,230,167,.08), rgba(255,255,255,.04));
  transform: translateY(-10px);
}

.popular {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(84,230,167,.11);
  color: var(--accent);
  border: 1px solid rgba(84,230,167,.2);
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.plan-name {
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.price {
  margin: 12px 0 12px;
}

.price span {
  font-size: 45px;
  font-weight: 800;
  letter-spacing: -.055em;
}

.price-card ul {
  padding-left: 20px;
  margin: 24px 0 28px;
  color: #cfdae4;
}

.price-card li {
  margin: 8px 0;
}

.price-card .btn {
  width: 100%;
  margin-top: auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step {
  padding: 28px;
  border-top: 1px solid var(--border);
}

.step > span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.step h3 {
  margin: 14px 0 7px;
}

.step p {
  color: var(--muted);
}

.faq-wrap {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 80px;
}

.faq-list details {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-list summary {
  list-style: none;
  font-weight: 700;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list details p {
  margin: 12px 0 0;
  color: var(--muted);
}

.cta {
  padding: 20px 0 90px;
}

.cta-box {
  padding: 38px;
  border-radius: 28px;
  border: 1px solid rgba(84,230,167,.2);
  background:
    linear-gradient(135deg, rgba(84,230,167,.10), rgba(115,168,255,.05));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.cta-box h2 {
  margin: 8px 0 0;
  max-width: 720px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.04;
  letter-spacing: -.05em;
}

footer {
  padding: 55px 0 25px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: #050c12;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-grid p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 14px;
}

.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.copyright {
  border-top: 1px solid rgba(255,255,255,.06);
  margin-top: 35px;
  padding-top: 22px;
  color: #677785;
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 2;
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--border);
  background: #0c1822;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 24px;
}

.modal-card h3 {
  margin: 10px 0 2px;
  font-size: 28px;
}

.modal-price {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -.04em;
  margin-bottom: 16px;
}

.modal-card p,
.modal-card small {
  color: var(--muted);
}

.modal-card label {
  display: block;
  margin: 22px 0 14px;
  font-size: 13px;
  color: #c8d2dc;
}

.modal-card input {
  width: 100%;
  margin-top: 7px;
  height: 50px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.045);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.modal-card input:focus {
  border-color: rgba(84,230,167,.4);
}

.full {
  width: 100%;
}

/* =========================
   RESPONSIVE / MOBILE
   ========================= */

@media (max-width: 980px) {
  .nav {
    min-height: 64px;
    gap: 14px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 64px 0 54px;
  }

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

  .hero-grid {
    gap: 42px;
  }

  .hero-copy {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
  }

  .hero-copy .badge {
    margin-inline: auto;
  }

  .hero-text {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-meta {
    justify-content: center;
  }

  .app-preview {
    width: min(560px, 100%);
    margin: 0 auto;
  }

  .feature-grid,
  .pricing-grid,
  .server-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .server-grid {
    max-width: 720px;
    margin: 0 auto;
  }

  .pricing-grid {
    max-width: 720px;
    margin: 0 auto;
  }

  .price-card.featured {
    transform: none;
  }

  .trust-items {
    grid-template-columns: 1fr 1fr;
    padding: 18px 0;
  }

  .faq-wrap {
    gap: 26px;
  }

  .section-head.left {
    text-align: center;
    margin-inline: auto;
  }

  .cta-box {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --shadow: 0 20px 55px rgba(0,0,0,.24);
  }

  html {
    scroll-padding-top: 74px;
  }

  body {
    overflow-x: hidden;
  }

  .container {
    width: min(100% - 28px, 1160px);
  }

  .site-header {
    background: rgba(7,16,24,.88);
  }

  .nav {
    min-height: 60px;
  }

  .logo {
    font-size: 16px;
  }

  .logo-mark {
    width: 31px;
    height: 31px;
    border-radius: 10px;
  }

  .site-header .btn-small {
    display: inline-flex;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .hero {
    padding: 42px 0 38px;
  }

  .hero-glow-1 {
    width: 260px;
    height: 260px;
    right: -100px;
    top: 30px;
    opacity: .26;
  }

  .hero-glow-2 {
    width: 240px;
    height: 240px;
    left: -130px;
    bottom: 0;
    opacity: .22;
  }

  .hero-grid {
    gap: 30px;
  }

  .hero-copy {
    text-align: left;
  }

  .hero-copy .badge {
    margin-inline: 0;
    max-width: 100%;
    font-size: 10px;
    line-height: 1.35;
    letter-spacing: .08em;
    padding: 8px 10px;
  }

  h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 13vw, 58px);
    line-height: .98;
    letter-spacing: -.055em;
  }

  .hero-text {
    margin-inline: 0;
    font-size: 16px;
    line-height: 1.65;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 24px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 24px;
  }

  .hero-meta div {
    min-width: 0;
    padding: 12px 8px;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.03);
    border-radius: 14px;
  }

  .hero-meta strong {
    font-size: 19px;
  }

  .hero-meta span {
    font-size: 10px;
    line-height: 1.3;
  }

  .app-preview {
    padding: 16px;
    border-radius: 22px;
  }

  .app-top {
    gap: 10px;
  }

  .server-title {
    font-size: 18px;
  }

  .online-pill {
    padding: 6px 9px;
    font-size: 10px;
  }

  .shield-wrap {
    padding: 34px 8px 30px;
  }

  .shield-ring {
    width: 118px;
    height: 118px;
    margin-bottom: 22px;
  }

  .shield {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    font-size: 28px;
  }

  .shield-wrap h3 {
    font-size: 24px;
  }

  .shield-wrap p {
    font-size: 13px;
  }

  .connection-card {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .connection-card > div {
    padding: 13px;
    border-radius: 14px;
  }

  .trust-strip {
    overflow: hidden;
  }

  .trust-items {
    min-height: auto;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 0;
    text-align: left;
  }

  .trust-items span {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 10px 11px;
    border: 1px solid rgba(255,255,255,.05);
    background: rgba(255,255,255,.025);
    border-radius: 12px;
    font-size: 11px;
    line-height: 1.35;
  }

  .section {
    padding: 68px 0;
  }

  .section-head {
    margin-bottom: 30px;
    text-align: left;
  }

  .section-head.left {
    text-align: left;
  }

  .section-head h2 {
    margin-top: 7px;
    font-size: clamp(32px, 10vw, 44px);
    line-height: 1.02;
  }

  .section-head p {
    font-size: 14px;
    line-height: 1.65;
  }

  .feature-grid,
  .pricing-grid,
  .server-grid,
  .steps {
    gap: 12px;
  }

  .feature-card,
  .price-card {
    border-radius: 18px;
    padding: 20px;
  }

  .feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    margin-bottom: 16px;
  }

  .feature-card h3 {
    font-size: 19px;
  }

  .feature-card p,
  .price-card p {
    font-size: 14px;
  }

  .server-card {
    min-height: 82px;
    padding: 14px;
    border-radius: 16px;
    grid-template-columns: auto 1fr auto;
    gap: 11px;
  }

  .flag-big {
    font-size: 28px;
  }

  .server-card strong {
    font-size: 14px;
  }

  .server-card div span {
    font-size: 11px;
  }

  .server-status {
    font-size: 10px;
  }

  .selected-server {
    margin-top: 16px;
    font-size: 13px;
  }

  .price-card {
    min-height: auto;
  }

  .plan-name {
    font-size: 13px;
  }

  .price {
    margin: 9px 0 9px;
  }

  .price span {
    font-size: 40px;
  }

  .price-card ul {
    margin: 20px 0 22px;
    padding-left: 18px;
    font-size: 14px;
  }

  .popular {
    top: 14px;
    right: 14px;
    padding: 5px 8px;
    font-size: 9px;
  }

  .steps {
    counter-reset: none;
  }

  .step {
    padding: 20px 4px 20px 18px;
    border-top: 0;
    border-left: 1px solid var(--border);
  }

  .step h3 {
    margin: 9px 0 5px;
    font-size: 18px;
  }

  .step p {
    margin-bottom: 0;
    font-size: 14px;
  }

  .faq-wrap {
    gap: 10px;
  }

  .faq-list details {
    padding: 18px 0;
  }

  .faq-list summary {
    font-size: 15px;
    line-height: 1.45;
    padding-right: 28px;
    position: relative;
  }

  .faq-list summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: -2px;
    color: var(--accent);
    font-size: 22px;
    font-weight: 500;
  }

  .faq-list details[open] summary::after {
    content: "–";
  }

  .faq-list details p {
    font-size: 14px;
  }

  .cta {
    padding: 0 0 68px;
  }

  .cta-box {
    padding: 24px 20px;
    border-radius: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cta-box h2 {
    font-size: 31px;
  }

  .cta-box .btn {
    width: 100%;
  }

  footer {
    padding-top: 38px;
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .copyright {
    margin-top: 26px;
  }

  .modal {
    align-items: end;
    padding: 0;
  }

  .modal-card {
    width: 100%;
    max-width: none;
    border-radius: 24px 24px 0 0;
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
    animation: sheetUp .22s ease-out;
  }

  .modal-card h3 {
    font-size: 24px;
  }

  .modal-price {
    font-size: 32px;
  }

  .modal-close {
    top: 11px;
    right: 13px;
  }

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

@media (max-width: 390px) {
  .container {
    width: min(100% - 22px, 1160px);
  }

  .site-header .btn-small {
    padding: 0 10px;
    font-size: 11px;
  }

  h1 {
    font-size: 39px;
  }

  /* Keep 3+ / 5 / 24/7 in one horizontal row */
  .hero-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .hero-meta div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 7px;
    min-width: 0;
  }

  .hero-meta strong {
    font-size: 18px;
    line-height: 1.1;
  }

  .hero-meta span {
    font-size: 9px;
    line-height: 1.25;
    word-break: normal;
  }

  .connection-card {
    grid-template-columns: 1fr;
  }

  .trust-items {
    grid-template-columns: 1fr;
  }

  .price span {
    font-size: 36px;
  }
}

/* v4: authoritative hero statistics layout */
.hero-meta {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100%;
}

.hero-meta > div {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

@media (max-width: 640px) {
  .hero-meta {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  .hero-meta > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 11px 8px !important;
  }

  .hero-meta strong {
    font-size: 19px !important;
    line-height: 1.1 !important;
  }

  .hero-meta span {
    font-size: 9px !important;
    line-height: 1.25 !important;
  }
}

@media (max-width: 380px) {
  .hero-meta {
    gap: 5px !important;
  }

  .hero-meta > div {
    padding: 9px 6px !important;
  }

  .hero-meta strong {
    font-size: 17px !important;
  }

  .hero-meta span {
    font-size: 8px !important;
  }
}

/* =========================================================
   v5 MOBILE POLISH — centered, compact, cleaner
   ========================================================= */
@media (max-width: 640px) {

  /* Less empty vertical space */
  .section {
    padding: 52px 0 !important;
  }

  .section-soft {
    padding-top: 52px !important;
    padding-bottom: 52px !important;
  }

  /* Center all section headings on mobile */
  .section-head,
  .section-head.left {
    max-width: 370px !important;
    margin: 0 auto 28px !important;
    text-align: center !important;
  }

  .section-head .eyebrow {
    display: block;
    text-align: center !important;
  }

  .section-head h2 {
    margin: 8px auto 12px !important;
    max-width: 360px !important;
    font-size: 35px !important;
    line-height: 1.06 !important;
    letter-spacing: -.045em !important;
    text-align: center !important;
  }

  .section-head p {
    max-width: 350px !important;
    margin: 0 auto !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
    text-align: center !important;
  }

  /* Hero text is centered too */
  .hero-copy {
    text-align: center !important;
  }

  .hero-copy .badge {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero-text {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 360px !important;
    text-align: center !important;
  }

  h1 {
    max-width: 370px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    font-size: 42px !important;
    line-height: 1.0 !important;
  }

  /* Stats stay horizontal + centered */
  .hero-meta {
    max-width: 390px !important;
    margin: 24px auto 0 !important;
  }

  .hero-meta > div {
    align-items: center !important;
    text-align: center !important;
  }

  /* Trust strip — neat 2x2 grid, centered */
  .trust-items {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }

  .trust-items span {
    justify-content: center !important;
    text-align: center !important;
    min-height: 58px !important;
    padding: 11px 8px !important;
    font-size: 11px !important;
  }

  /* Feature cards centered */
  .feature-grid {
    max-width: 390px !important;
    margin: 0 auto !important;
  }

  .feature-card {
    text-align: center !important;
    padding: 22px 18px !important;
  }

  .feature-icon {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .feature-card h3,
  .feature-card p {
    text-align: center !important;
  }

  /* Server section */
  .server-grid {
    max-width: 390px !important;
    margin: 0 auto !important;
    gap: 11px !important;
  }

  .server-card {
    width: 100% !important;
    min-height: 80px !important;
    padding: 14px 16px !important;
    border-radius: 18px !important;
    grid-template-columns: 42px minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
  }

  .server-card > div {
    min-width: 0 !important;
  }

  .server-card strong {
    font-size: 16px !important;
    line-height: 1.2 !important;
  }

  .server-card div span {
    margin-top: 3px !important;
    font-size: 12px !important;
  }

  .flag-big {
    font-size: 30px !important;
  }

  .server-status {
    font-size: 11px !important;
  }

  .selected-server {
    max-width: 390px !important;
    margin: 18px auto 0 !important;
    text-align: center !important;
    font-size: 13px !important;
  }

  /* Pricing cards centered visually */
  .pricing-grid {
    max-width: 390px !important;
    margin: 0 auto !important;
  }

  .price-card {
    text-align: center !important;
    padding: 22px 18px !important;
  }

  .price-card p {
    text-align: center !important;
  }

  .price-card ul {
    width: fit-content !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: left !important;
  }

  /* Steps */
  .steps {
    max-width: 390px !important;
    margin: 0 auto !important;
  }

  .step {
    border-left: 0 !important;
    border-top: 1px solid var(--border) !important;
    padding: 20px 12px !important;
    text-align: center !important;
  }

  .step h3,
  .step p {
    text-align: center !important;
  }

  /* FAQ */
  .faq-wrap {
    max-width: 390px !important;
    margin: 0 auto !important;
  }

  .faq-list summary,
  .faq-list details p {
    text-align: left !important;
  }

  /* CTA */
  .cta-box {
    max-width: 390px !important;
    margin: 0 auto !important;
    text-align: center !important;
  }

  .cta-box .eyebrow,
  .cta-box h2 {
    text-align: center !important;
  }

  .cta-box h2 {
    font-size: 31px !important;
  }

  /* Main VPN preview slightly smaller and cleaner */
  .app-preview {
    max-width: 390px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 18px !important;
  }

  .shield-wrap {
    padding: 30px 8px 26px !important;
  }

  .shield-wrap h3,
  .shield-wrap p {
    text-align: center !important;
  }

  .connection-card {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }

  .connection-card > div {
    text-align: center !important;
  }
}

@media (max-width: 390px) {
  .section-head h2 {
    font-size: 32px !important;
  }

  h1 {
    font-size: 39px !important;
  }

  .trust-items {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .server-card {
    padding: 13px 14px !important;
  }

  .server-card strong {
    font-size: 15px !important;
  }

  .connection-card {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }
}

/* =========================================================
   v6 iPhone modal / keyboard fix
   ========================================================= */

body.modal-open {
  overflow: hidden !important;
  touch-action: none;
}

@media (max-width: 640px) {
  .modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    padding: 0 !important;
    align-items: end !important;
    overflow: hidden !important;
  }

  .modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
  }

  .modal-card {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;

    /* Critical iPhone fix */
    max-height: calc(100dvh - 8px) !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;

    margin: 0 !important;
    padding:
      22px
      18px
      calc(20px + env(safe-area-inset-bottom))
      18px !important;

    border-radius: 24px 24px 0 0 !important;
    box-sizing: border-box !important;
  }

  .modal-card .eyebrow {
    display: block;
    padding-right: 42px;
  }

  .modal-card h3 {
    margin: 8px 0 2px !important;
    font-size: 22px !important;
    line-height: 1.15 !important;
  }

  .modal-price {
    margin: 4px 0 12px !important;
    font-size: 31px !important;
    line-height: 1.1 !important;
  }

  .modal-card p {
    margin-bottom: 14px !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  .modal-card label {
    margin: 14px 0 12px !important;
    font-size: 14px !important;
  }

  .modal-card input {
    width: 100% !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 14px !important;

    /* 16px prevents iOS Safari zooming the page on focus */
    font-size: 16px !important;

    border-radius: 14px !important;
    box-sizing: border-box !important;
  }

  .modal-card .btn.full {
    width: 100% !important;
    min-height: 52px !important;
    margin-top: 4px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    font-size: 16px !important;
  }

  .modal-card small {
    display: block !important;
    margin-top: 12px !important;
    padding-bottom: 4px !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
  }

  .modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 12px !important;
    z-index: 4 !important;
  }
}

/* Extra-tight layout when the visible viewport becomes short,
   e.g. iPhone with software keyboard open */
@media (max-width: 640px) and (max-height: 650px) {
  .modal-card {
    max-height: 100dvh !important;
    padding-top: 16px !important;
    padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
  }

  .modal-card h3 {
    font-size: 20px !important;
  }

  .modal-price {
    font-size: 27px !important;
    margin-bottom: 8px !important;
  }

  .modal-card p {
    margin-bottom: 8px !important;
  }

  .modal-card label {
    margin-top: 10px !important;
  }

  .modal-card small {
    font-size: 11px !important;
    margin-top: 8px !important;
  }
}

/* =========================================================
   v7 CROSS-PLATFORM FLAGS
   No emoji font dependency: identical on Windows/iPhone/Android
   ========================================================= */

.country-flag {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 20px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 3px;
  vertical-align: -3px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.14),
    0 2px 5px rgba(0,0,0,.18);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* Germany: black / red / gold */
.flag-de {
  background:
    linear-gradient(
      to bottom,
      #171717 0 33.333%,
      #dd0000 33.333% 66.666%,
      #ffce00 66.666% 100%
    );
}

/* Netherlands: red / white / blue */
.flag-nl {
  background:
    linear-gradient(
      to bottom,
      #ae1c28 0 33.333%,
      #ffffff 33.333% 66.666%,
      #21468b 66.666% 100%
    );
}

/* Finland: white with blue Nordic cross */
.flag-fi {
  background:
    linear-gradient(
      to right,
      transparent 0 29%,
      #003580 29% 43%,
      transparent 43% 100%
    ),
    linear-gradient(
      to bottom,
      #ffffff 0 38%,
      #003580 38% 61%,
      #ffffff 61% 100%
    );
  background-color: #ffffff;
}

.country-flag.flag-big {
  width: 34px !important;
  height: 23px !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

.country-flag.flag-inline {
  width: 25px;
  height: 17px;
  margin-right: 5px;
  vertical-align: -3px;
}

/* Current server title */
.server-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.server-title .country-flag {
  width: 31px;
  height: 21px;
  vertical-align: 0;
}

/* Make selected labels line up cleanly */
#selectedServer,
#modalServer {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

@media (max-width: 640px) {
  .country-flag.flag-big {
    width: 31px !important;
    height: 21px !important;
  }

  .country-flag.flag-inline {
    width: 23px;
    height: 15px;
  }

  .server-title .country-flag {
    width: 28px;
    height: 19px;
  }
}

/* =========================================================
   v8 AUTH
   ========================================================= */

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

.btn-ghost {
  border: 1px solid rgba(255,255,255,.10);
  color: var(--text);
  background: rgba(255,255,255,.045);
}

.btn-ghost:hover {
  background: rgba(255,255,255,.075);
}

.auth-card {
  width: min(460px, calc(100% - 30px));
}

.auth-subtitle {
  color: var(--muted);
  margin-bottom: 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin: 16px 0 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.auth-tab.active {
  color: #07150f;
  background: linear-gradient(135deg, var(--accent), #8ef1bf);
}

.auth-card form label {
  display: block;
  margin: 13px 0;
  color: #c8d2dc;
  font-size: 13px;
}

.auth-card input {
  width: 100%;
  height: 52px;
  margin-top: 7px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: rgba(255,255,255,.045);
  box-sizing: border-box;
}

.auth-card input:focus {
  border-color: rgba(84,230,167,.48);
  box-shadow: 0 0 0 3px rgba(84,230,167,.07);
}

.auth-error {
  margin: 12px 0;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,123,123,.22);
  color: #ffaaaa;
  background: rgba(255,123,123,.07);
  font-size: 13px;
}

.account-box {
  margin: 12px 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}

.account-box span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.account-box strong {
  display: block;
  overflow-wrap: anywhere;
}

#accountPanel .btn {
  margin-top: 10px;
}

@media (max-width: 640px) {
  .header-actions {
    gap: 6px;
  }

  #authOpenBtn {
    min-width: 70px;
  }

  .auth-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  .auth-card input {
    font-size: 16px !important;
  }

  .auth-tabs {
    margin-bottom: 14px;
  }
}

@media (max-width: 390px) {
  .site-header .header-actions .btn {
    padding-left: 9px !important;
    padding-right: 9px !important;
    font-size: 10px !important;
  }

  .logo {
    gap: 7px;
  }

  .logo-mark {
    width: 29px;
    height: 29px;
  }
}

/* =========================================================
   v9 AUTH VISIBILITY + SUCCESS TOAST
   ========================================================= */

/* Universal visibility helper */
.hidden,
[hidden] {
  display: none !important;
}

/* Repeat password exists only in registration mode */
#authPasswordRepeatWrap[hidden] {
  display: none !important;
}

.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 300;
  width: min(420px, calc(100% - 28px));
  min-height: 72px;
  padding: 14px 16px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;

  color: var(--text);
  background: rgba(13, 29, 38, .96);
  border: 1px solid rgba(84,230,167,.32);
  border-radius: 18px;
  box-shadow: 0 22px 65px rgba(0,0,0,.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  animation: toastIn .25s ease-out;
}

.toast.hidden {
  display: none !important;
}

.toast-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #06140e;
  background: linear-gradient(135deg, var(--accent), #9bf3c6);
  font-size: 21px;
  font-weight: 900;
}

.toast > div:last-child {
  min-width: 0;
}

.toast strong,
.toast span {
  display: block;
}

.toast strong {
  margin-bottom: 2px;
  font-size: 14px;
}

.toast span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 640px) {
  .toast {
    top: calc(12px + env(safe-area-inset-top));
    min-height: 66px;
    padding: 12px 13px;
    border-radius: 16px;
  }

  .toast-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .toast strong {
    font-size: 13px;
  }

  .toast span {
    font-size: 12px;
  }
}

/* =========================================================
   v10 AUTH MODE FIX
   ========================================================= */

#authPasswordRepeatWrap {
  display: none;
}

#authForms.register-mode #authPasswordRepeatWrap {
  display: block !important;
}

#authForms.login-mode #authPasswordRepeatWrap {
  display: none !important;
}

/* =========================================================
   v11 FULL ACCOUNT DASHBOARD
   ========================================================= */

#authModal .auth-card.account-view {
  width: min(980px, calc(100% - 40px));
  max-height: 92vh;
  overflow-y: auto;
}

.dashboard-panel {
  min-width: 0;
}

.dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.dashboard-head h3 {
  margin: 6px 0 2px;
  font-size: 30px;
  letter-spacing: -.04em;
}

.dashboard-email {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.dashboard-status {
  min-height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-status.inactive {
  color: #c1cad3;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.045);
}

.dashboard-status.active {
  color: var(--accent);
  border: 1px solid rgba(84,230,167,.24);
  background: rgba(84,230,167,.08);
}

.dashboard-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.dashboard-loading {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 13px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  font-size: 13px;
}

.dashboard-dimmed {
  opacity: .45;
  pointer-events: none;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-stat {
  min-width: 0;
  padding: 16px;
  border-radius: 17px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.035);
}

.dashboard-stat > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-stat strong {
  display: flex;
  align-items: center;
  min-height: 22px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.025));
}

.dashboard-card-wide {
  grid-column: 1 / -1;
}

.dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.dashboard-card h4 {
  margin: 4px 0 0;
  font-size: 19px;
  letter-spacing: -.025em;
}

.dashboard-card > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.dashboard-actions {
  display: flex;
  gap: 9px;
}

.dashboard-actions .btn {
  min-height: 44px;
}

.mini-pill {
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
}

.mini-pill.active {
  color: var(--accent);
  border: 1px solid rgba(84,230,167,.22);
  background: rgba(84,230,167,.08);
}

.mini-pill.inactive {
  color: var(--muted);
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.035);
}

.server-setting {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.server-setting select {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 40px 0 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: #15232d;
  font: inherit;
}

.server-setting select:focus {
  border-color: rgba(84,230,167,.42);
}

.server-setting .btn {
  min-height: 46px;
}

.device-list,
.payment-list {
  display: grid;
  gap: 8px;
}

.dashboard-empty {
  min-height: 138px;
  padding: 20px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border: 1px dashed rgba(255,255,255,.10);
  border-radius: 16px;
  color: var(--muted);
}

.dashboard-empty.compact {
  min-height: 92px;
}

.dashboard-empty-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 9px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(84,230,167,.08);
  font-size: 22px;
}

.dashboard-empty strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 13px;
}

.dashboard-empty span {
  max-width: 430px;
  font-size: 12px;
  line-height: 1.45;
}

.device-row,
.payment-row {
  min-height: 64px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
}

.device-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(84,230,167,.07);
  font-size: 20px;
}

.device-info {
  min-width: 0;
  flex: 1;
}

.device-info strong,
.device-info span,
.payment-row strong,
.payment-row span {
  display: block;
}

.device-info strong {
  font-size: 13px;
}

.device-info span,
.payment-row div span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.payment-row {
  justify-content: space-between;
}

.payment-row strong {
  font-size: 13px;
}

.dashboard-footer {
  margin-top: 14px;
  padding-top: 14px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(255,255,255,.06);
}

.dashboard-footer .btn {
  min-height: 42px;
}

#addDeviceBtn:disabled {
  opacity: .42;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 760px) {
  #authModal .auth-card.account-view {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100dvh !important;
    border-radius: 24px 24px 0 0 !important;
  }

  .dashboard-head {
    padding-right: 40px;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .dashboard-card-wide {
    grid-column: auto;
  }
}

@media (min-width: 761px) and (max-height: 760px) {
  .profile-modal-card {
    padding: 20px 28px;
  }

  .profile-modal-card h3 {
    margin-top: 6px;
    font-size: 24px;
  }

  .profile-layout {
    gap: 20px;
    margin-top: 12px;
  }

  .profile-ready {
    margin-bottom: 10px;
  }

  .profile-warning,
  .desktop-install-card {
    margin: 10px 0;
    padding: 11px 13px;
  }

  .desktop-install-card p {
    margin: 5px 0 9px;
  }

  .desktop-installer-btn {
    min-height: 42px;
  }

  .profile-meta {
    margin: 10px 0;
  }

  .profile-meta > div {
    padding: 10px 12px;
  }

  .profile-saved {
    margin-top: 10px;
  }

  .qr-wrap {
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .dashboard-head {
    display: block;
  }

  .dashboard-status {
    margin-top: 12px;
  }

  .dashboard-head h3 {
    font-size: 27px;
  }

  .dashboard-stats {
    gap: 7px;
  }

  .dashboard-stat {
    padding: 13px 11px;
    border-radius: 14px;
  }

  .dashboard-stat strong {
    font-size: 12px;
  }

  .dashboard-card {
    padding: 17px 14px;
    border-radius: 17px;
  }

  .dashboard-card-head {
    align-items: center;
  }

  .dashboard-card h4 {
    font-size: 17px;
  }

  .dashboard-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-actions .btn {
    width: 100%;
  }

  .server-setting {
    grid-template-columns: 1fr;
  }

  .server-setting .btn {
    width: 100%;
  }

  .dashboard-footer .btn {
    width: 100%;
  }

  .device-row {
    gap: 9px;
  }
}

/* =========================================================
   v12 WIREGUARD DEVICES
   ========================================================= */

.device-modal-card,
.profile-modal-card {
  width: min(470px, calc(100% - 28px));
}

.device-modal-card > p {
  color: var(--muted);
  font-size: 13px;
}

.device-modal-card label {
  display: block;
  margin: 14px 0;
  color: #c8d2dc;
  font-size: 13px;
}

.device-modal-card input,
.device-modal-card select {
  width: 100%;
  height: 52px;
  margin-top: 7px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: #14222c;
  box-sizing: border-box;
  font: inherit;
}

.device-modal-card input:focus,
.device-modal-card select:focus {
  border-color: rgba(84,230,167,.45);
}

.device-row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.device-action-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255,255,255,.045);
  font-size: 11px;
  font-weight: 800;
}

.device-action-btn:hover {
  border-color: rgba(84,230,167,.30);
  background: rgba(84,230,167,.07);
}

.device-action-btn.danger {
  color: #ffaaaa;
}

.profile-modal-card {
  width: min(900px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  box-sizing: border-box;
  text-align: left;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
  align-items: start;
  gap: 24px;
  margin-top: 18px;
}

.profile-details {
  min-width: 0;
}

.profile-ready {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
}

.profile-ready strong,
.profile-ready span {
  display: block;
}

.profile-ready strong {
  font-size: 18px;
}

.profile-ready span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.profile-success-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #06140e;
  background: linear-gradient(135deg, var(--accent), #9bf3c6);
  font-size: 24px;
  font-weight: 900;
}

.profile-warning {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(255,205,91,.18);
  border-radius: 14px;
  color: #ead7a5;
  background: rgba(255,205,91,.06);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}

.desktop-install-card {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid rgba(84,230,167,.20);
  border-radius: 16px;
  background: rgba(84,230,167,.055);
}

.desktop-install-card > strong,
.desktop-install-card > span {
  display: block;
}

.desktop-install-card > strong {
  margin-top: 5px;
  font-size: 17px;
}

.desktop-install-card p {
  margin: 7px 0 13px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.desktop-install-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.desktop-installer-btn {
  min-height: 46px;
}

.qr-wrap {
  position: sticky;
  top: 0;
  width: 100%;
  margin: 0;
  padding: 12px;
  border-radius: 18px;
  background: white;
  box-sizing: border-box;
}

.qr-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.qr-caption {
  display: block;
  padding: 2px 4px 10px;
  color: #30414d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-align: center;
  text-transform: uppercase;
}

.profile-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 14px 0;
}

.profile-meta > div {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  text-align: left;
}

.profile-meta span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
}

.profile-meta strong {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.profile-actions .btn {
  width: 100%;
}

.profile-saved {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
}

.profile-saved input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

@media (max-width: 760px) {
  .profile-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .profile-ready {
    justify-content: center;
    text-align: center;
  }

  .qr-wrap {
    position: static;
    width: min(270px, 100%);
    margin: 0 auto;
  }
}

.admin-key-status {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 640px) {
  .device-modal-card,
  .profile-modal-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  .device-modal-card input,
  .device-modal-card select {
    font-size: 16px !important;
  }

  .device-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .device-info {
    min-width: calc(100% - 60px);
  }

  .device-row-actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: 4px;
  }
}

@media (max-width: 420px) {
  .profile-meta,
  .profile-actions {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   v13 LIVE RUSSIA SERVER
   ========================================================= */

.flag-ru {
  background:
    linear-gradient(
      to bottom,
      #ffffff 0 33.333%,
      #0039a6 33.333% 66.666%,
      #d52b1e 66.666% 100%
    );
}

@media (min-width: 981px) {
  .server-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.server-card[data-server-id="4"] .server-status {
  color: var(--accent);
}

.server-card:not([data-server-id="4"]) .server-status {
  color: var(--muted);
}

/* =========================================================
   v14 ADMIN PANEL
   ========================================================= */

.dashboard-footer {
  gap: 9px;
}

.admin-modal-card {
  width: min(1080px, calc(100% - 40px));
  max-height: 92vh;
  overflow-y: auto;
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.admin-head h3 {
  margin: 6px 0 3px;
  font-size: 30px;
  letter-spacing: -.04em;
}

.admin-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-search {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 9px;
  margin-bottom: 14px;
}

.admin-search input,
.admin-subscription-actions select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: #14222c;
  box-sizing: border-box;
  font: inherit;
}

.admin-search input:focus,
.admin-subscription-actions select:focus {
  border-color: rgba(84,230,167,.45);
}

.admin-users,
.admin-device-list {
  display: grid;
  gap: 10px;
}

.admin-user-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
}

.admin-user-head,
.admin-device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-user-head > div,
.admin-device-row > div:first-child {
  min-width: 0;
}

.admin-user-head strong,
.admin-user-head span,
.admin-device-row strong,
.admin-device-row span {
  display: block;
}

.admin-user-head > div > strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.admin-user-head > div > span,
.admin-device-row > div:first-child > span,
.admin-no-devices {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.admin-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 13px 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-user-meta strong {
  color: var(--text);
}

.admin-subscription-actions {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.admin-subscription-actions label {
  width: 130px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.admin-subscription-actions select {
  height: 38px;
  margin-top: 5px;
}

.admin-subscription-actions .btn {
  min-height: 38px;
}

.btn-danger {
  border: 1px solid rgba(255,120,120,.24);
  color: #ffb3b3;
  background: rgba(255,100,100,.07);
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}

.admin-device-list {
  margin-top: 12px;
}

.admin-device-row {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}

.admin-device-row strong {
  font-size: 12px;
}

.admin-device-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

@media (max-width: 760px) {
  .admin-modal-card {
    width: 100%;
    max-width: 100%;
    max-height: 100dvh;
    border-radius: 24px 24px 0 0;
  }

  .admin-head,
  .admin-user-head {
    display: block;
  }

  .admin-head .mini-pill,
  .admin-user-head > .mini-pill {
    margin-top: 10px;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-search {
    grid-template-columns: 1fr 1fr;
  }

  .admin-search input {
    grid-column: 1 / -1;
  }

  .admin-subscription-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .admin-subscription-actions label {
    width: auto;
    grid-column: 1 / -1;
  }

  .admin-device-row {
    align-items: flex-start;
  }
}
