:root {
  --bg: #050505;
  --card: #0c0c0c;
  --card2: #111111;
  --line: #1c1c1c;
  --gold: #d4af37;
  --gold-l: #f0d78c;
  --gold-d: #a8892a;
  --text: #f3efe6;
  --muted: #8a8274;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  background:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(212, 175, 55, 0.09), transparent 60%),
    var(--bg);
}

#app {
  max-width: 430px;
  margin: 0 auto;
  padding: 8px 16px 96px;
  min-height: 100vh;
}

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

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0 14px;
}
.top-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
}
.top-btn-ph { width: 40px; height: 40px; }
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--gold-l);
}
.brand-shield { flex-shrink: 0; }

.page-head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  min-height: 40px;
}
.page-head h2 {
  flex: 1;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
}

.hello h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.hello-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.hello-sub.on { color: var(--gold); }

.status-card {
  position: relative;
  background: linear-gradient(165deg, #14110a 0%, #0a0a0a 55%, #080808 100%);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 22px;
  padding: 28px 20px 22px;
  text-align: center;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(212, 175, 55, 0.06),
    inset 0 1px 0 rgba(255, 220, 140, 0.06);
}
.status-dot {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a3a3a;
  box-shadow: 0 0 0 3px rgba(58, 58, 58, 0.25);
}
.status-dot.on {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25), 0 0 12px rgba(34, 197, 94, 0.5);
}

.shield-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 14px;
}

.ring {
  position: absolute;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  margin-left: -36px;
  margin-top: -36px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.15);
  animation: waveOut 3.6s ease-out infinite;
  pointer-events: none;
}
.ring-1 { animation-delay: 0s; }
.ring-2 { animation-delay: 1.2s; border-color: rgba(212, 175, 55, 0.28); }
.ring-3 { animation-delay: 2.4s; border-color: rgba(212, 175, 55, 0.2); }

@keyframes waveOut {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.75); opacity: 0; }
}

.shield-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.5));
  animation: shieldGlow 4s ease-in-out infinite;
}

@keyframes shieldGlow {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.4)); }
  50% { filter: drop-shadow(0 0 20px rgba(240, 215, 140, 0.55)); }
}

.status-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.status-sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 12px;
}
.server-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--gold-l);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.btn-outline-gold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: transparent;
  color: var(--gold-l);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 8px 10px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.stat-ico { font-size: 0.95rem; margin-bottom: 4px; }
.stat-val {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--gold-l);
  margin-bottom: 2px;
  line-height: 1.2;
}
.stat-lbl {
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.25;
}
.stat-bar {
  margin-top: 8px;
  height: 3px;
  background: #1a1a1a;
  border-radius: 99px;
  overflow: hidden;
}
.stat-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-d), var(--gold-l));
  border-radius: 99px;
}

/* ===== Banner carousel ===== */
.banner-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 4px;
}

.banner-track {
  display: flex;
  width: 100%;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

.banner-track .banner.slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  margin: 0;
  border-radius: 18px;
}

.banner {
  position: relative;
  width: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 28px 18px;
  border-radius: 18px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: linear-gradient(105deg, #1a160c 0%, #0d0d0d 55%, #0a0907 100%);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.banner-ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.banner-body {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
  max-width: 58%;
}
.banner-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
}
.banner-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.banner-art {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 130px;
  height: 96px;
  opacity: 0.85;
  pointer-events: none;
  z-index: 1;
  mask-image: linear-gradient(90deg, transparent 0%, #000 25%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 25%);
}
.server-rack {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.25));
}

.banner-chev {
  position: relative;
  z-index: 2;
  margin-left: auto;
  color: var(--gold);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 2px;
}
.banner-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.25);
  transition: background 0.25s, transform 0.25s;
}
.banner-dots .dot.active {
  background: var(--gold);
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.45);
}

.btn-gold {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0d78c, #b8962e);
  color: #1a1508;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 22px rgba(212, 175, 55, 0.32);
  margin-top: 4px;
}
.btn-gold:active { transform: scale(0.98); }
.btn-gold:disabled { opacity: 0.5; }

.btn-dashed {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px;
  margin-top: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  background: transparent;
  color: var(--gold-l);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-dashed span {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
}

.smart-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: linear-gradient(105deg, #16120a, #0c0c0c);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.smart-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.smart-title { font-weight: 700; font-size: 0.95rem; color: var(--gold-l); }
.smart-desc { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }

.seg {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  background: var(--card);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.seg-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.seg-btn.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-l);
}

.srv-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.srv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}
.srv-item.active-srv {
  border-color: rgba(212, 175, 55, 0.4);
}
.srv-flag { font-size: 1.4rem; }
.srv-info { flex: 1; }
.srv-name { font-weight: 700; font-size: 0.92rem; display: flex; align-items: center; gap: 8px; }
.srv-meta { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.tag-rec {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-l);
  border: 1px solid rgba(212, 175, 55, 0.35);
}
.srv-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0d78c, #b8962e);
  color: #1a1508;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-box {
  background: #080808;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  word-break: break-all;
}
.link-box code {
  font-size: 0.72rem;
  color: var(--gold-l);
  line-height: 1.45;
}

.dev-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.dev-summary-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dev-phone-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--card2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.dev-sum-label { font-size: 0.78rem; color: var(--muted); }
.dev-sum-val { font-weight: 800; font-size: 1.1rem; color: var(--gold-l); }
.dev-avail { font-size: 0.78rem; color: var(--muted); }

.progress {
  height: 6px;
  background: #1a1a1a;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 16px;
}
.progress.thin { height: 4px; }
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-d), var(--gold-l));
  border-radius: 99px;
  transition: width 0.4s ease;
}

.dev-list { margin-bottom: 8px; }
.dev-empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  padding: 28px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.dev-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  margin-bottom: 8px;
}
.dev-item-ico { font-size: 1.3rem; }
.dev-item-name { font-weight: 700; font-size: 0.92rem; }
.dev-item-meta { font-size: 0.75rem; color: var(--muted); }
.dev-online {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: #22c55e;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
}

.sub-card {
  background: var(--card);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
}
.sub-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.sub-crown {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.25), #1a160c);
  border: 1px solid rgba(212, 175, 55, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.sub-name { font-weight: 800; font-size: 1.1rem; }
.sub-desc { font-size: 0.8rem; color: var(--muted); }
.badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.18);
  color: var(--gold-l);
  border: 1px solid rgba(212, 175, 55, 0.35);
}
.sub-days-lbl { font-size: 0.8rem; color: var(--muted); margin-bottom: 2px; }
.sub-days-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold-l);
  margin-bottom: 2px;
}
.sub-days-until { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }

.feats {
  list-style: none;
  margin: 16px 0;
}
.feats li {
  padding: 6px 0 6px 22px;
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
}
.feats li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

.plans { display: flex; flex-direction: column; gap: 8px; }
.plan {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.plan-prem {
  border-color: rgba(212, 175, 55, 0.4);
  background: linear-gradient(105deg, rgba(212, 175, 55, 0.08), #0c0c0c);
}
.plan-name { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.plan-meta { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.plan-price { font-weight: 800; color: var(--gold); font-size: 1.05rem; }

.prof-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f0d78c, #a8892a);
  color: #1a1508;
  font-weight: 800;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
}
.prof-name { font-weight: 700; font-size: 1.15rem; }
.prof-meta { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

.prof-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.ps {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}
.ps-n { font-weight: 800; color: var(--gold-l); margin-bottom: 2px; }
.ps-l { font-size: 0.7rem; color: var(--muted); }

.menu {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.mi {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 4px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
}
.mi:last-child { border-bottom: none; }
.chev { color: var(--muted); }

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 14px;
}
.hint b { color: var(--gold-l); }

.input {
  width: 100%;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 12px;
  outline: none;
}
.input:focus { border-color: var(--gold); }

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: flex;
  background: rgba(8, 8, 8, 0.97);
  border-top: 1px solid #1a1a1a;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  backdrop-filter: blur(16px);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: #6b6560;
  font-size: 0.6rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 2px;
}
.tab svg { stroke: currentColor; }
.tab.active { color: var(--gold); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  background: #1a160c;
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  z-index: 50;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.toast.hidden { display: none; }

.error-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  z-index: 40;
  text-align: center;
}
.error-screen.hidden { display: none; }
.error-screen p { color: #e57373; max-width: 260px; }
.error-screen .btn-gold { max-width: 160px; }
