:root {
  --brand: #006891;
  --brand-rgb: 0, 104, 145;
  --ink: #006891;
  --muted: #006891;
  --line: #e4edf2;
  --paper: #fff;
  --motion: .62s;
  --motion-slow: .76s;
  --ease-smooth: cubic-bezier(.16, 1, .3, 1);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eef4f7;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; background: #eef4f7; }
button, input { font: inherit; }
button {
  color: inherit;
  transform-origin: center;
  transition:
    transform var(--motion) var(--ease-smooth),
    color var(--motion) ease,
    background-color var(--motion) ease,
    border-color var(--motion) ease,
    opacity var(--motion) ease;
}

.app-shell {
  --elastic-x: 0px;
  --elastic-y: 0px;
  position: relative;
  width: min(100%, 430px);
  min-height: min(900px, 100vh);
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(17, 51, 72, .12);
  transform: translate3d(var(--elastic-x), var(--elastic-y), 0);
  transition: transform .95s var(--ease-smooth);
  will-change: transform;
}
.app-shell.is-elastic { transition: transform .08s linear; cursor: grabbing; }
.app-shell img { -webkit-user-drag: none; user-select: none; }
.background-marble {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.background-marble .marble-haze path { stroke-width: 20; }
.background-marble .vein-main { stroke-width: 2.8; }
.background-marble .vein-secondary { stroke-width: 1.7; }
.background-marble .vein-fine { stroke-width: 1.15; }
.background-marble .vein-hairline { stroke-width: .7; }
.background-lightning {
  opacity: .86;
  animation: lightning-imprint 3.1s cubic-bezier(.12,.72,.18,1) 1 both;
  transform-origin: center;
  will-change: opacity, filter;
}
.background-lightning .lightning-glow path { stroke-width: 13; }
.background-lightning .lightning-veins { opacity: .78; }

@keyframes lightning-imprint {
  0% {
    opacity: .03;
    filter: brightness(1.25) saturate(1.15);
  }
  18% {
    opacity: .22;
    filter: brightness(1.1) saturate(1.08);
  }
  100% {
    opacity: .86;
    filter: brightness(1) saturate(1) drop-shadow(0 0 0 rgba(73, 154, 208, 0));
  }
}

.lightning-strike-overlay {
  position: absolute;
  z-index: 6;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  animation: lightning-strike-life 1.45s ease-out 1 both;
  will-change: opacity, filter;
}
.lightning-strike-overlay path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.lightning-strike-overlay .strike-halo {
  stroke: rgba(104, 137, 153, .34);
  stroke-width: 5.5;
  filter: blur(2.8px);
  animation: lightning-travel .9s cubic-bezier(.45,0,.55,1) 1 forwards;
}
.lightning-strike-overlay .strike-core {
  stroke: rgba(241, 250, 253, .98);
  stroke-width: 1.45;
  filter: drop-shadow(0 0 .8px rgba(35, 72, 89, .92)) drop-shadow(0 0 3px rgba(171, 207, 221, .62));
  animation: lightning-travel .82s cubic-bezier(.45,0,.55,1) 1 forwards;
}
.lightning-strike-overlay .strike-branch {
  stroke: rgba(203, 226, 235, .94);
  stroke-width: .85;
  filter: drop-shadow(0 0 .55px rgba(45, 79, 94, .82));
  animation: lightning-travel .58s cubic-bezier(.4,0,.55,1) .22s 1 forwards;
}

@keyframes lightning-travel {
  0% {
    stroke-dashoffset: 1;
    opacity: .15;
  }
  8% { opacity: 1; }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes lightning-strike-life {
  0% {
    opacity: .72;
    filter: brightness(1.05) saturate(.72) drop-shadow(0 0 1px rgba(54, 85, 99, .16));
  }
  48% {
    opacity: .9;
    filter: brightness(1.3) saturate(.68) drop-shadow(0 0 4px rgba(82, 116, 131, .38));
  }
  64% {
    opacity: 1;
    filter: brightness(2.15) saturate(.6) drop-shadow(0 0 7px rgba(91, 128, 144, .52));
  }
  77% {
    opacity: .76;
    filter: brightness(1.32) saturate(.66) drop-shadow(0 0 3px rgba(80, 111, 125, .3));
  }
  100% {
    opacity: 0;
    filter: brightness(1) drop-shadow(0 0 0 transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .background-lightning { animation: none; }
  .lightning-strike-overlay { animation: none; }
}
.screen, .copyright { position: relative; z-index: 1; }
.screen { min-height: inherit; padding: 54px 30px 30px; transition: opacity var(--motion) ease, transform var(--motion-slow) var(--ease-smooth); }
.screen.is-hidden { display: none; }
.brand { width: 100%; text-align: center; line-height: 1; }
.brand h1 {
  width: min(100%, 330px);
  margin: 0 auto;
  line-height: 0;
}
.brand-wordmark { display: block; width: 100%; height: auto; object-fit: contain; filter: brightness(.78) saturate(.9); }
.brand p { margin: 8px 0 0; color: var(--brand); font-size: 13px; letter-spacing: .38em; text-indent: .38em; }
.brand--activation h1 { width: min(100%, 330px); }
.brand--activation { margin-top: 20px; }

.activation-screen { display: flex; flex-direction: column; align-items: center; }
.logo-stage { position: relative; width: min(76vw, 316px); aspect-ratio: 1; margin: 12px auto -2px; display: grid; place-items: center; overflow: visible; transition: filter var(--motion-slow) ease, transform var(--motion-slow) var(--ease-smooth); }
.logo-stage img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-stage--activation { width: min(70vw, 284px); margin-top: 36px; }
.activation-form { width: 100%; margin-top: auto; text-align: center; }
.activation-form label { display: block; margin-bottom: 14px; font-size: 19px; font-weight: 650; }
.activation-form input { width: 100%; height: 54px; padding: 0 18px; border: 1px solid var(--line); border-radius: 14px; outline: none; text-align: center; letter-spacing: .13em; color: var(--ink); background: #f8fbfc; transition: border-color var(--motion) ease, box-shadow var(--motion) ease; }
.activation-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .1); }
.primary-button, .secondary-button { width: 100%; height: 52px; margin-top: 12px; border: 0; border-radius: 14px; cursor: pointer; font-weight: 750; letter-spacing: .06em; transition: transform var(--motion) var(--ease-smooth), opacity var(--motion) ease; }
.primary-button { color: white; background: var(--brand); }
.secondary-button { color: var(--brand); background: rgba(var(--brand-rgb), .1); }
button:active { transform: scale(.992); }
.form-note { min-height: 18px; margin: 12px 0 0; color: var(--muted); font-size: 12px; }

.main-screen { display: flex; flex-direction: column; align-items: center; }
.topbar {
  width: 100%;
  margin-top: -32px;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  grid-template-areas:
    "wordmark wordmark wordmark"
    "menu vpn settings";
  align-items: center;
  row-gap: 12px;
}
.topbar .brand { display: contents; }
.topbar .brand h1 {
  grid-area: wordmark;
  position: relative;
  left: calc(100% - min(45vw, 195px));
  width: min(90vw, 390px);
  max-width: none;
  margin: 0;
  justify-self: start;
  transform: translateX(calc(-50% - 10px));
}
.topbar .brand p { grid-area: vpn; margin: 0; align-self: center; }
.icon-button { position: static; z-index: 2; width: 42px; height: 42px; padding: 10px; border: 0; background: transparent; cursor: pointer; }
.menu-button { grid-area: menu; justify-self: start; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.settings-button { grid-area: settings; justify-self: end; margin-right: 16px; display: grid; place-items: center; }
.menu-button span { display: block; width: 21px; height: 1.5px; margin: 0 auto; border-radius: 2px; background: var(--brand); transition: transform var(--motion-slow) var(--ease-smooth), opacity var(--motion) ease; }
.menu-button.is-active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-button.is-active span:nth-child(2) { opacity: 0; }
.menu-button.is-active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.settings-button svg { display: block; width: 27px; height: 27px; fill: none; stroke: var(--brand); stroke-width: 1.35; transform: translateY(-2.5px); transition: transform var(--motion-slow) var(--ease-smooth); }
.settings-button.is-active svg { transform: translateY(-2.5px) rotate(135deg); }
.main-screen .logo-stage {
  width: min(90vw, 380px);
  margin-top: 48px;
  flex-shrink: 0;
  opacity: .72;
  filter: none;
  transform: scale(.975);
  transition:
    opacity 3.2s cubic-bezier(.12, .75, .18, 1),
    transform 3.2s cubic-bezier(.12, .75, .18, 1);
}
.main-screen.is-awake .logo-stage {
  opacity: 1;
  filter: none;
  transform: scale(1.02);
}
.light-sweep {
  --beam-angle: 0deg;
  position: absolute;
  inset: 0;
  opacity: 0;
  border-radius: 50%;
  clip-path: circle(49% at 50% 50%);
  background: conic-gradient(
    from var(--beam-angle) at 38% 36%,
    transparent 0 78%,
    rgba(255,255,255,0) 80%,
    rgba(147,219,255,.8) 86%,
    transparent 92%
  );
  mix-blend-mode: screen;
}
.main-screen.is-awake .light-sweep { animation: beacon 6.5s ease-in-out infinite; }
@property --beam-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes beacon {
  0%, 58% { opacity: 0; --beam-angle: 0deg; }
  64% { opacity: .8; }
  88% { opacity: 0; --beam-angle: 360deg; }
  100% { opacity: 0; --beam-angle: 360deg; }
}

.connection-control { text-align: center; margin-top: auto; }
.power-button { min-width: 112px; height: 44px; padding: 0 24px; border: 1px solid rgba(var(--brand-rgb), .28); border-radius: 999px; background: white; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 750; letter-spacing: .12em; transition: color var(--motion-slow) ease, background var(--motion-slow) ease, border-color var(--motion-slow) ease, transform var(--motion) var(--ease-smooth); }
.power-button .power-dot { display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: #aebdc5; transition: background var(--motion-slow) ease, box-shadow var(--motion-slow) ease; }
.power-button[aria-pressed="true"] { color: white; border-color: var(--brand); background: var(--brand); }
.power-button[aria-pressed="true"] .power-dot { background: white; box-shadow: 0 0 0 5px rgba(255,255,255,.18); }
.connection-control p { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.quick-controls { position: relative; width: 100%; margin-top: 16px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border-radius: 13px; background: #f1f6f8; }
.segmented button { height: 38px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; font-size: 13px; transition: color var(--motion) ease, background var(--motion) ease, transform var(--motion) var(--ease-smooth); }
.segmented button.is-selected { color: var(--brand); background: white; }
.country-control { width: 100%; min-height: 64px; margin-top: 8px; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 13px; background: white; text-align: left; cursor: pointer; }
.country-control small, .country-control strong { display: block; }
.country-control small { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.country-control strong { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.country-control strong span:first-child { font-size: 17px; line-height: 1; }
.country-control em { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-style: normal; }
.chevron { color: var(--brand); font-size: 20px; transition: transform var(--motion) var(--ease-smooth); }
.country-control[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.country-list { position: absolute; z-index: 5; right: 0; bottom: 70px; left: 0; max-height: 0; overflow: hidden; opacity: 0; border: 1px solid transparent; border-radius: 13px; background: rgba(255,255,255,.96); box-shadow: 0 14px 32px rgba(8,24,34,.09); transition: max-height var(--motion-slow) var(--ease-smooth), opacity var(--motion) ease, border-color var(--motion) ease; }
.country-list.is-open { max-height: 210px; opacity: 1; border-color: var(--line); }
.country-list button { width: 100%; min-height: 48px; padding: 8px 15px; display: flex; align-items: center; justify-content: space-between; border: 0; border-bottom: 1px solid var(--line); background: white; cursor: pointer; text-align: left; font-size: 13px; }
.country-list button > span { display: flex; align-items: center; gap: 7px; }
.country-list button b { font-size: 18px; font-weight: 400; line-height: 1; }
.country-list button small { display: block; color: var(--muted); font-size: 9px; }
.country-list button em { color: var(--muted); font-size: 10px; font-style: normal; }

.scrim { position: absolute; z-index: 9; inset: 0; pointer-events: none; opacity: 0; background: transparent; transition: opacity var(--motion) ease; }
.scrim.is-visible { pointer-events: auto; opacity: 1; }
.panel {
  position: absolute;
  z-index: 10;
  top: 0;
  bottom: 0;
  width: min(88%, 360px);
  padding: 62px 24px 25px;
  background: linear-gradient(145deg, rgba(8, 24, 34, .28), rgba(var(--brand-rgb), .14));
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: 0 16px 44px rgba(8, 24, 34, .08), inset 0 1px 0 rgba(255, 255, 255, .32);
  backdrop-filter: blur(10px) saturate(125%) contrast(105%);
  -webkit-backdrop-filter: blur(10px) saturate(125%) contrast(105%);
  overflow-y: auto;
  scrollbar-width: none;
  transition: transform var(--motion-slow) var(--ease-smooth);
}
.panel::-webkit-scrollbar { display: none; }
.panel--menu { left: 0; transform: translateX(-105%); }
.panel--settings { right: 0; transform: translateX(105%); }
.panel.is-open { transform: translateX(0); }
.panel-head { display: flex; align-items: start; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.panel-head small { color: var(--brand); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.panel-head h2 { margin: 5px 0 0; font-size: 28px; letter-spacing: -.04em; }
.close-button { width: 38px; height: 38px; border: 0; background: transparent; color: var(--brand); cursor: pointer; font-size: 29px; font-weight: 200; }
.menu-list { margin-top: 12px; }
.menu-list button, .settings-list button, .settings-list label { width: 100%; min-height: 57px; padding: 8px 4px; display: flex; align-items: center; justify-content: space-between; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.menu-list button span, .settings-list span { font-size: 14px; font-weight: 610; }
.menu-list small, .settings-list small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 400; }
.menu-list button.is-selected { color: var(--brand); background: rgba(255,255,255,.12); }
.panel-head, .menu-list button, .settings-list button, .settings-list label { border-color: rgba(var(--brand-rgb), .11); }
.panel-detail { min-height: 64px; margin-top: 14px; padding: 14px; border: 1px solid rgba(var(--brand-rgb), .1); border-radius: 12px; color: var(--brand); background: rgba(255,255,255,.05); font-size: 12px; line-height: 1.45; }
.panel-detail h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.panel-detail .detail-note { margin: 6px 0 10px; color: rgba(var(--brand-rgb), .78); font-size: 10px; line-height: 1.45; }
.panel-detail .detail-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid rgba(var(--brand-rgb), .1); }
.panel-detail .detail-row span { min-width: 0; font-size: 11px; font-weight: 620; }
.panel-detail .detail-row small { max-width: 135px; color: rgba(var(--brand-rgb), .74); text-align: right; font-size: 9px; line-height: 1.3; }
.danger-link { margin-top: 18px; padding: 8px 0; border: 0; background: transparent; color: var(--brand); cursor: pointer; font-size: 12px; }
.settings-list { margin-top: 12px; }
.settings-list input { position: absolute; opacity: 0; }
.settings-list i { position: relative; width: 38px; height: 22px; border-radius: 20px; background: #d7e0e5; transition: background var(--motion) ease; }
.settings-list i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform var(--motion) var(--ease-smooth); }
.settings-list input:checked + i { background: var(--brand); }
.settings-list input:checked + i::after { transform: translateX(16px); }
.settings-list b { color: var(--brand); font-size: 22px; font-weight: 300; }
.device-card { margin-top: 18px; padding: 15px; border: 1px solid rgba(var(--brand-rgb), .1); border-radius: 13px; background: transparent; }
.device-card small, .device-card strong, .device-card span { display: block; }
.device-card small { color: var(--muted); font-size: 10px; }
.device-card strong { margin-top: 5px; font-size: 14px; }
.device-card span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.toast { position: absolute; z-index: 20; left: 24px; right: 24px; bottom: 22px; padding: 12px 16px; border-radius: 12px; pointer-events: none; opacity: 0; transform: translateY(12px); background: var(--ink); color: white; text-align: center; font-size: 12px; transition: opacity var(--motion) ease, transform var(--motion-slow) var(--ease-smooth); }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.copyright { position: absolute; z-index: 8; right: 0; bottom: 7px; left: 0; pointer-events: none; color: rgba(var(--brand-rgb), .82); text-align: center; font-size: 8px; font-weight: 500; letter-spacing: .06em; }

@media (max-height: 740px) {
  .screen { padding-top: 44px; }
  .brand--activation { margin-top: 5px; }
  .logo-stage--activation { width: 230px; margin-top: 10px; }
  .main-screen .logo-stage { width: min(86vw, 330px); margin-top: 38px; }
  .panel { padding-top: 48px; }
}
@media (max-width: 440px) { .app-shell { min-height: 100vh; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
