:root {
  --bg: #041412;
  --bg-2: #07211e;
  --accent: #2ee6d6;
  --accent-2: #17c8b8;
  --accent-soft: rgba(46, 230, 214, 0.16);
  --text: #f4fffd;
  --muted: rgba(232, 255, 252, 0.58);
  --danger: #ff6b6b;
  --card: rgba(6, 32, 30, 0.72);
  --stroke: rgba(46, 230, 214, 0.22);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --nav: #071c1a;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  background: #041412;
  color: var(--text);
  overflow: hidden;
}

.glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}
.glow-a {
  top: -80px; left: 10%; right: 10%; height: 220px;
  background: radial-gradient(ellipse at center, rgba(46,230,214,.32), transparent 70%);
}
.glow-b {
  bottom: 80px; right: -40px; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(23,200,184,.16), transparent 70%);
}

.app {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.boot {
  flex: 1;
  display: grid;
  place-items: center;
  animation: fadeIn .5s ease;
}
.boot-logo {
  font-weight: 800;
  letter-spacing: .08em;
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 18px;
}
.boot-bar {
  width: 120px; height: 4px; border-radius: 99px;
  background: rgba(255,255,255,.08); overflow: hidden;
}
.boot-bar span {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent));
  animation: load 1.1s ease infinite;
}

.screen {
  flex: 1;
  overflow: auto;
  padding: 12px 16px calc(96px + var(--safe-bottom));
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }

.view { animation: rise .55s cubic-bezier(.2,.8,.2,1); }
.view + .view { display: none; }

.promo {
  position: relative;
  height: 76px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(4,18,16,.15), rgba(4,18,16,.55)),
    radial-gradient(circle at 88% 40%, rgba(90, 255, 236, .55), transparent 42%),
    linear-gradient(135deg, #0b3c38, #082824);
  display: flex;
  align-items: center;
  padding: 0 18px;
  box-shadow: var(--shadow);
}
.promo b { font-size: 16px; font-weight: 700; }
.promo span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.wifi {
  position: absolute; right: 18px; top: 14px;
  width: 54px; height: 54px; opacity: .95;
}

.balance-wrap {
  text-align: center;
  padding: 28px 8px 8px;
}
.balance-wrap .label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.balance {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}
.sub-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}
.sub-status.ok { color: #6ef0c8; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255,107,107,.12);
}
.sub-status.ok .dot { box-shadow: 0 0 0 4px rgba(110,240,200,.12); }

.pills {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 22px;
}
.pill {
  min-width: 132px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 18px;
  min-height: 54px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: linear-gradient(180deg, #4ff3e3 0%, #1ad8c6 100%);
  color: #042421;
  box-shadow: 0 10px 24px rgba(26, 216, 198, .28);
  margin-bottom: 12px;
}
.btn-outline {
  background: rgba(8, 36, 33, .35);
  color: #8ff8ee;
  border: 1.5px solid rgba(46,230,214,.5);
}
.btn svg { width: 20px; height: 20px; }

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.tile {
  position: relative;
  height: 200px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(10,42,40,.9), rgba(6,24,22,.92));
  border: 1px solid rgba(255,255,255,.05);
  overflow: hidden;
  padding: 16px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  animation: floaty 5.5s ease-in-out infinite;
}
.tile:nth-child(2) { animation-delay: -.9s; }
.tile h3 { font-size: 16px; font-weight: 700; position: relative; z-index: 3; }
.tile .art {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 150px;
  display: grid;
  place-items: end center;
  pointer-events: none;
  z-index: 1;
}
.tile .go {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(8,20,18,.7);
  border: 1px solid rgba(46,230,214,.35);
  display: grid; place-items: center;
  color: var(--accent);
}

.nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(430px, 100%);
  height: calc(72px + var(--safe-bottom));
  padding: 8px 18px var(--safe-bottom);
  background: linear-gradient(180deg, rgba(5,22,20,.72), #071c1a 40%);
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: space-between;
  z-index: 5;
}
.nav button {
  width: 56px; height: 48px;
  border: 0; background: transparent; color: rgba(255,255,255,.46);
  display: grid; place-items: center;
  border-radius: 16px;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.nav button.active {
  color: #042421;
  background: linear-gradient(180deg, #4ff3e3, #1ad8c6);
  box-shadow: 0 8px 18px rgba(26,216,198,.25);
}
.nav svg { width: 24px; height: 24px; }

.panel {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
}
.panel h2 { font-size: 18px; margin-bottom: 6px; }
.panel p, .muted { color: var(--muted); font-size: 14px; line-height: 1.45; }

.plan {
  width: 100%;
  text-align: left;
  color: inherit;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.plan.selected {
  border-color: rgba(46,230,214,.7);
  background: var(--accent-soft);
}
.plan .price { font-size: 20px; font-weight: 800; }
.badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(46,230,214,.18);
  color: var(--accent);
  margin-top: 4px;
}

.top {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.back {
  width: 36px; height: 36px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.2);
  color: var(--text);
}

.toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--safe-bottom));
  transform: translateX(-50%) translateY(12px);
  background: rgba(8,28,26,.94);
  border: 1px solid var(--stroke);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  z-index: 9;
  max-width: 86%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.account {
  display: flex; gap: 12px; align-items: center;
}
.avatar {
  width: 48px; height: 48px; border-radius: 16px;
  background: linear-gradient(180deg, #2ee6d6, #0d7d73);
  display: grid; place-items: center; font-weight: 800;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes load {
  from { transform: translateX(-120%); }
  to { transform: translateX(280%); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
