:root {
  color-scheme: dark;
  --bg: #050507;
  --card: rgba(16, 16, 22, 0.72);
  --card-hover: rgba(24, 20, 28, 0.88);
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.08);
  --line-orange: rgba(255, 85, 0, 0.45);
  --orange: #ff5500;
  --orange-bright: #ff7b00;
  --green: #10b981;
  --tg-safe: var(--tg-content-safe-area-inset-top, 0px);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-glide: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button, a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
  color: inherit;
}

button:disabled {
  opacity: 0.5;
  cursor: wait;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ЗАДНИЙ ФОН КАК НА САЙТЕ (Canvas + Glow + Кибер-сетка) */
#speed-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
}

.cursor-glow {
  position: fixed;
  top: 30%;
  left: 50%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 85, 0, 0.16) 0%, rgba(255, 85, 0, 0.04) 45%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  transition: left 0.15s ease-out, top 0.15s ease-out;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(255, 85, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 85, 0, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 50% 30%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, black 20%, transparent 80%);
}

.app {
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 85, 0, 0.1), transparent 55%);
}

/* ШАПКА */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(16px + var(--tg-safe)) 18px 14px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--orange), #ff9900);
  box-shadow: 0 0 22px rgba(255, 85, 0, 0.4);
  flex-shrink: 0;
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.logo-fallback {
  width: 100%;
  height: 100%;
  place-items: center;
  background: #090a0c;
  color: var(--orange);
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-style: italic;
  border-radius: 50%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 19px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.5px;
  line-height: 1.15;
  display: inline-flex;
  align-items: baseline;
}

.brand-title i {
  display: inline-block;
  padding-right: 6px;
  font-style: italic;
  background: linear-gradient(90deg, #ff5500, #ff8800);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--green);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.55; }
}

.round {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--ease-spring), border-color 0.25s, background 0.25s;
}

.round:hover, .round:active {
  border-color: var(--orange);
  background: rgba(255, 85, 0, 0.15);
  transform: rotate(90deg) scale(1.05);
}

.round.spinning {
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#preview {
  padding: 9px 16px;
  background: rgba(255, 85, 0, 0.16);
  border-bottom: 1px solid var(--line-orange);
  color: #ffb37b;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-align: center;
}

/* КОНТЕЙНЕР СТРАНИЦЫ И АНИМАЦИИ ПЕРЕХОДОВ МЕЖДУ ВКЛАДКАМИ */
main {
  padding: 18px 18px 125px;
  overflow-x: hidden;
}

.page-view {
  will-change: transform, opacity;
}

.page-view.slide-right {
  animation: pageSlideFromRight 0.42s var(--ease-spring) forwards;
}

.page-view.slide-left {
  animation: pageSlideFromLeft 0.42s var(--ease-spring) forwards;
}

.page-view.fade-in {
  animation: pageFadeIn 0.38s var(--ease-spring) forwards;
}

@keyframes pageSlideFromRight {
  0% { opacity: 0; transform: translate3d(38px, 0, 0) scale(0.985); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes pageSlideFromLeft {
  0% { opacity: 0; transform: translate3d(-38px, 0, 0) scale(0.985); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes pageFadeIn {
  0% { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.985); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.stagger-item {
  opacity: 0;
  animation: cardStaggerUp 0.52s var(--ease-spring) forwards;
  animation-delay: calc(var(--i, 0) * 65ms);
}

@keyframes cardStaggerUp {
  0% {
    opacity: 0;
    transform: translate3d(0, 22px, 0) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* ТИПОГРАФИКА */
.eyebrow {
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--orange-bright);
  font-weight: 700;
}

h1 {
  font-family: 'Unbounded', sans-serif;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.8px;
  font-weight: 900;
  margin: 8px 0 10px;
}

h2 {
  font-family: 'Unbounded', sans-serif;
  font-size: 17px;
  letter-spacing: -0.4px;
  font-weight: 800;
  margin: 0;
}

h3 {
  font-family: 'Unbounded', sans-serif;
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 6px;
}

p {
  line-height: 1.6;
  margin: 6px 0;
  color: var(--muted);
}

/* ПЛАШКА НОВОСТНОГО КАНАЛА @GdriveVPN_news */
.news-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  margin-bottom: 16px;
  border-radius: 22px;
  background: linear-gradient(125deg, rgba(255, 85, 0, 0.18) 0%, rgba(16, 16, 22, 0.88) 65%);
  border: 1px solid rgba(255, 85, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 85, 0, 0.12);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: transform 0.28s var(--ease-spring), border-color 0.25s, box-shadow 0.25s;
}

.news-banner:hover, .news-banner:active {
  transform: translateY(-2px);
  border-color: var(--orange-bright);
  box-shadow: 0 14px 36px rgba(255, 85, 0, 0.22);
}

.news-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.news-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff5500, #ff8800);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(255, 85, 0, 0.4);
}

.news-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.news-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.news-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  color: var(--orange-bright);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.news-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.news-sub {
  font-size: 11px;
  color: var(--muted);
}

.news-arrow {
  padding: 7px 12px;
  border-radius: 99px;
  background: rgba(255, 85, 0, 0.16);
  border: 1px solid rgba(255, 85, 0, 0.35);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #ff9b52;
  white-space: nowrap;
}

/* КАРТОЧКИ И BENTO СТАТИСТИКА (Баланс + Активных подписок) */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.stat, .card {
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s var(--ease-spring), border-color 0.28s, box-shadow 0.28s;
}

.stat::before, .card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 85, 0, 0.14), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.stat:hover::before, .card:hover::before,
.stat:active::before, .card:active::before {
  opacity: 1;
}

.stat:hover, .card:hover, .stat:active {
  border-color: var(--line-orange);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 25px rgba(255, 85, 0, 0.12);
}

.stat {
  padding: 18px 16px;
  text-align: left;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.stat strong {
  font-family: 'Unbounded', sans-serif;
  font-size: 21px;
  letter-spacing: -0.8px;
  display: block;
  margin: 8px 0 6px;
}

.stat small {
  color: var(--orange-bright);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 12px;
}

.section-head button {
  background: rgba(255, 85, 0, 0.12);
  border: 1px solid rgba(255, 85, 0, 0.3);
  padding: 5px 12px;
  border-radius: 99px;
  color: var(--orange-bright);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
}

.card {
  padding: 20px;
  margin: 12px 0;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.key-name {
  font-family: 'Unbounded', sans-serif;
  font-size: 15px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  padding: 5px 10px;
  border-radius: 99px;
}

.badge.expired {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.38);
  color: #f87171;
}

.sub-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
}

.progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), #ffae00);
  border-radius: 99px;
  transition: width 0.8s var(--ease-spring);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* КНОПКИ */
.btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  min-height: 46px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s var(--ease-spring), box-shadow 0.25s, border-color 0.25s, background 0.25s;
}

.btn:active:not(:disabled) {
  transform: scale(0.96);
}

.btn.primary {
  background: linear-gradient(135deg, #ff5500 0%, #ff8000 100%);
  border-color: #ff7b00;
  color: #ffffff;
  box-shadow: 0 8px 26px rgba(255, 85, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 85, 0, 0.6);
}

.btn.full {
  width: 100%;
}

.btn + .btn.full {
  margin-top: 10px;
}

.actions .btn {
  flex: 1;
  font-size: 12px;
}

/* ТАРИФЫ */
.intro {
  margin: 4px 0 20px;
}

.plan.popular {
  background: linear-gradient(180deg, rgba(255, 85, 0, 0.18) 0%, rgba(16, 16, 22, 0.88) 55%);
  border: 1.5px solid var(--orange);
  box-shadow: 0 16px 40px rgba(255, 85, 0, 0.18);
}

.pop-badge {
  display: inline-block;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #ff5500, #ff8800);
  color: #fff;
  font-family: 'Unbounded', sans-serif;
  font-size: 9px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px;
  text-transform: uppercase;
}

.term {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 85, 0, 0.16);
  border: 1px solid rgba(255, 85, 0, 0.35);
  color: #ff9b52;
  padding: 5px 10px;
  border-radius: 99px;
}

.plan h2 {
  font-size: 20px;
  margin-top: 12px;
}

.plan .price {
  font-family: 'Unbounded', sans-serif;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1px;
  margin: 12px 0 6px;
}

.price small {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}

.features span {
  padding: 6px 11px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #e5e7eb;
}

/* БАЛАНС И ИСТОРИЯ */
.balance {
  padding: 26px 22px;
  background: radial-gradient(ellipse at top right, rgba(255, 85, 0, 0.25), transparent 70%), var(--card);
  border-color: var(--line-orange);
}

.balance strong {
  font-family: 'Unbounded', sans-serif;
  font-size: 38px;
  display: block;
  margin: 10px 0 18px;
  letter-spacing: -1.5px;
  text-shadow: 0 0 25px rgba(255, 85, 0, 0.45);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.row span {
  color: var(--muted);
}

.row:last-child {
  border-bottom: 0;
}

.history b {
  display: block;
  margin-bottom: 4px;
}

.history small {
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.trust {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  padding: 16px 14px;
  margin-top: 14px;
  border-radius: 16px;
  background: rgba(16, 16, 22, 0.6);
  border: 1px solid var(--line);
}

.trust .icon {
  color: var(--orange);
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.empty {
  text-align: center;
  padding: 34px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(16, 16, 22, 0.65);
  backdrop-filter: blur(12px);
  border-radius: 22px;
  margin: 15px 0;
  color: var(--muted);
}

.empty h2 {
  color: white;
  margin-bottom: 8px;
}

.welcome-logo {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  margin: 0 auto 18px;
  border: 2px solid var(--orange);
  box-shadow: 0 0 30px rgba(255, 85, 0, 0.4);
}

/* НИЖНЯЯ НАВИГАЦИЯ С ПЛАВНО ПЕРЕЕЗЖАЮЩЕЙ ОБВОДКОЙ (.nav-glider) */
nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 14, 0.85);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  padding: 8px 10px calc(12px + env(safe-area-inset-bottom));
  z-index: 30;
}

.nav-glider {
  position: absolute;
  top: 8px;
  left: 10px;
  width: calc((100% - 20px) / 4);
  height: 54px;
  border-radius: 16px;
  background: rgba(255, 85, 0, 0.14);
  border: 1px solid rgba(255, 85, 0, 0.42);
  box-shadow: 0 6px 22px rgba(255, 85, 0, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.12);
  transform: translate3d(calc(var(--nav-idx, 0) * 100%), 0, 0);
  transition: transform 0.44s var(--ease-glide);
  pointer-events: none;
  z-index: 0;
}

nav button {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: #83858d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 54px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 16px;
  transition: color 0.3s ease, transform 0.3s var(--ease-spring);
}

nav button svg {
  width: 20px;
  height: 20px;
  transition: transform 0.35s var(--ease-spring), filter 0.35s ease;
}

nav button.active {
  color: #ff8000;
}

nav button.active svg {
  transform: translateY(-2px) scale(1.12);
  filter: drop-shadow(0 0 8px rgba(255, 128, 0, 0.55));
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* МОДАЛЬНЫЕ ОКНА И ИНПУТЫ */
label {
  display: block;
  margin: 16px 0 7px;
  color: #d1d5db;
  font-size: 12px;
  font-weight: 600;
}

input, select {
  width: 100%;
  background: #090a0d;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 13px 15px;
  color: white;
  min-height: 48px;
  font-family: 'JetBrains Mono', monospace;
}

.presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.presets button {
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
}

.presets button:hover, .presets button:active {
  border-color: var(--orange);
  background: rgba(255, 85, 0, 0.16);
}

.subtle {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
}

.warn {
  color: #ffb277;
  background: rgba(255, 85, 0, 0.12);
  border: 1px solid rgba(255, 85, 0, 0.35);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.link-field {
  font: 12px 'JetBrains Mono', monospace;
  word-break: break-all;
  background: #07080a;
  border: 1px solid rgba(255, 85, 0, 0.35);
  color: #ffb37b;
  padding: 14px;
  border-radius: 14px;
  margin: 12px 0;
}

.offline {
  border: 1px solid #6d3820;
  background: #2b1b12;
  color: #ffbf8b;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 12px;
}

#toast {
  position: fixed;
  bottom: 98px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90%;
  z-index: 50;
  padding: 12px 18px;
  border-radius: 99px;
  background: linear-gradient(135deg, #18181f, #101015);
  border: 1px solid var(--orange);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 20px rgba(255, 85, 0, 0.3);
  font-weight: 600;
  font-size: 12px;
  animation: toastPop 0.3s var(--ease-spring);
}

@keyframes toastPop {
  from { opacity: 0; transform: translate(-50%, 12px) scale(0.92); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

dialog {
  max-width: 460px;
  width: calc(100% - 28px);
  margin: auto;
  background: rgba(18, 19, 24, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 85, 0, 0.45);
  border-radius: 26px;
  color: #fff;
  padding: 22px;
  max-height: 86dvh;
  overflow: auto;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(255, 85, 0, 0.2);
  animation: modalOpen 0.32s var(--ease-spring);
}

@keyframes modalOpen {
  from { opacity: 0; transform: translateY(18px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.close {
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
}

.pending {
  border-left: 3px solid var(--orange);
}
/* Group durations under the actual subscription tier. */
.plan-group .card-top { align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-group .card-top h2 { margin: 0; font-size: 21px; }
.plan-group .features { margin: 14px 0 18px; }
.plan-terms { display: grid; gap: 9px; }
.plan-term { display: grid; grid-template-columns: minmax(0,1fr) auto 18px; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 14px; border: 1px solid #ffffff19; border-radius: 14px; background: #ffffff05; color: #fff; text-align: left; cursor: pointer; font: inherit; }
.plan-term strong { color: #ff8a18; white-space: nowrap; font-size: 16px; }
.plan-term:hover, .plan-term:focus-visible { border-color: #ff7900; background: #ff790014; outline: 2px solid transparent; }
.plan-term:active { background: #ff790027; }
.key-name { overflow-wrap: anywhere; }

.plan-includes { margin: 0 0 20px; color: #c1bdba; font-size: 13px; line-height: 1.6; }
.plan-includes p { margin: 0 0 10px; }
.plan-countries, .plan-extras { list-style: none; padding: 0; margin: 0; }
.plan-countries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 10px; }
.plan-extras { display: grid; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #ffffff14; }
@media (max-width: 360px) { .plan-countries { grid-template-columns: 1fr; } }
