@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
  --bg: #06060c;
  --bg2: #0c0c16;
  --cyan: #00e5ff;
  --magenta: #ff2d6a;
  --text: #e8f4ff;
  --muted: #7a8a9a;
  --glass: rgba(18, 18, 30, 0.55);
  --glass-border: rgba(0, 229, 255, 0.28);
  --glass-border-mag: rgba(255, 45, 106, 0.28);
  --glow-cyan: 0 0 24px rgba(0, 229, 255, 0.35);
  --glow-mag: 0 0 24px rgba(255, 45, 106, 0.3);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Rajdhani, system-ui, sans-serif;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(0, 229, 255, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 35% at 85% 20%, rgba(255, 45, 106, 0.1), transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(0, 229, 255, 0.06), transparent 50%);
}

.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 12px 92px;
}

/* Glass panel base */
.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow:
    var(--glow-cyan),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.header {
  text-align: center;
  padding: 16px 14px 12px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.header::before,
.header::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1px solid var(--glass-border);
  opacity: 0.5;
}

.header::before {
  top: 8px;
  left: 8px;
  border-right: 0;
  border-bottom: 0;
  border-radius: 6px 0 0 0;
}

.header::after {
  bottom: 8px;
  right: 8px;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 6px 0;
  border-color: var(--glass-border-mag);
}

.logo-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0 8px;
}

.logo {
  max-width: min(240px, 88vw);
  height: auto;
  filter:
    drop-shadow(0 0 12px rgba(0, 229, 255, 0.55))
    drop-shadow(0 0 20px rgba(255, 45, 106, 0.35));
}

.tagline {
  color: var(--muted);
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gothic-card {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow:
    var(--glow-cyan),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
}

.gothic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), transparent);
  opacity: 0.6;
}

.gothic-card h2 {
  font-family: Orbitron, sans-serif;
  font-size: 1.05rem;
  margin: 0 0 12px;
  letter-spacing: 0.06em;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.gothic-card h3 {
  font-size: 0.95rem;
  margin: 14px 0 8px;
  color: var(--cyan);
}

.btn {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--cyan);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(255, 45, 106, 0.12));
  backdrop-filter: blur(8px);
  color: var(--text);
  font-family: Rajdhani, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 8px 0;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.btn-mag {
  border-color: var(--magenta);
  background: linear-gradient(135deg, rgba(255, 45, 106, 0.22), rgba(0, 229, 255, 0.08));
  box-shadow: var(--glow-mag);
}

.btn-share {
  border-color: var(--magenta);
  background: linear-gradient(135deg, rgba(255, 45, 106, 0.2), rgba(0, 229, 255, 0.15));
  box-shadow: var(--glow-mag), var(--glow-cyan);
}

.btn-row {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.btn-row .btn {
  flex: 1;
  margin: 0;
}

.ref-box {
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--glass-border-mag);
  background: rgba(255, 45, 106, 0.06);
  margin: 10px 0;
}

.ref-box .ref-link {
  font-size: 0.82rem;
  word-break: break-all;
  color: var(--cyan);
  margin: 6px 0 0;
}

.traffic-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
}

.traffic-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
  border-radius: 999px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 12, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  gap: 12px;
}

.loading-overlay.hidden { display: none; }

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(0, 229, 255, 0.15);
  border-top-color: var(--cyan);
  border-right-color: var(--magenta);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  box-shadow: var(--glow-cyan);
}

.loading-text { color: var(--muted); margin: 0; }

@keyframes spin { to { transform: rotate(360deg); } }

.error-banner {
  background: rgba(255, 45, 106, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid var(--magenta);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  box-shadow: var(--glow-mag);
}

.error-banner.hidden,
.main.hidden,
.bottom-nav.hidden { display: none; }

.glass-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  display: flex;
  background: rgba(8, 8, 14, 0.82);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -4px 24px rgba(0, 229, 255, 0.12);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: 0;
  border: 0;
  color: var(--muted);
  padding: 10px 4px 8px;
  font-size: 0.68rem;
  font-family: Rajdhani, sans-serif;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-ico { font-size: 1.15rem; line-height: 1; }

.nav-item.active {
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.plan-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 14px;
  margin: 8px 0;
  cursor: pointer;
  background: rgba(0, 229, 255, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.plan-item:active {
  border-color: var(--magenta);
  box-shadow: var(--glow-mag);
}

.qr {
  display: block;
  margin: 14px auto;
  border: 2px solid var(--cyan);
  border-radius: 12px;
  box-shadow: var(--glow-cyan);
}

.terms-box {
  max-height: 45vh;
  overflow: auto;
  border: 1px dashed var(--glass-border);
  padding: 10px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  margin: 8px 0;
  font-family: inherit;
}

.c-cyan { color: var(--cyan); }
.c-mag { color: var(--magenta); }
.ok { color: #5dffa8; text-shadow: 0 0 8px rgba(93, 255, 168, 0.4); }
.bad { color: var(--magenta); }
.muted { color: var(--muted); font-size: 0.92rem; }
.order-row { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }

.pay-pending {
  margin: 12px 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed var(--magenta);
  background: rgba(255, 45, 106, 0.08);
  box-shadow: var(--glow-mag);
}
