:root {
  --bg: #07080a;
  --screen: #0b0c0f;
  --elev: #13151a;
  --card: #181b22;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f3f5f7;
  --muted: #8d939d;
  --dim: #5c616a;
  --hud: #c8ff4d;
  --hud-2: #9be36a;
  --hud-dim: rgba(200, 255, 77, 0.12);
  --hud-glow: rgba(200, 255, 77, 0.45);
  --danger: #ff5a62;
  --warn: #ffc45a;
  --blue: #7eb0ff;
  --radius: 18px;
  --tab-h: 76px;
  --safe-top: 54px;
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "SF Pro Text",
    system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { background: #050506; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 480px at 72% 18%, rgba(200, 255, 77, 0.08), transparent 55%),
    radial-gradient(700px 500px at 18% 80%, rgba(80, 90, 70, 0.18), transparent 50%),
    #050506;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  overflow: hidden;
}

button, input, textarea { font-family: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }

.stage {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 72px;
  padding: 32px 24px;
}

/* —— HUD / glasses —— */
.hud-col { width: 420px; color: #cfd3c6; }
.hud-kicker {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--hud);
  margin-bottom: 18px;
}
.glasses { position: relative; }
.glasses-frame {
  width: 100%;
  height: auto;
  color: #8a8f82;
  filter: drop-shadow(0 0 12px rgba(200, 255, 77, 0.15));
}
.hud {
  position: absolute;
  right: 13.5%;
  top: 22%;
  width: 31%;
  height: 52%;
  background: #020301;
  border: 1px solid rgba(200, 255, 77, 0.35);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(200, 255, 77, 0.18), inset 0 0 20px rgba(200, 255, 77, 0.06);
  color: var(--hud);
  font-family: var(--mono);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
}
.hud-scan {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(200, 255, 77, 0.05) 0 1px,
    transparent 1px 3px
  );
  animation: scan 4.5s linear infinite;
}
@keyframes scan {
  0% { transform: translateY(-8%); }
  100% { transform: translateY(8%); }
}
.hud-top {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 0.12em;
  opacity: 0.7;
  z-index: 1;
}
.hud-body {
  flex: 1;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  line-height: 1.25;
  text-shadow: 0 0 8px var(--hud-glow);
}
.hud-idle { opacity: 0.55; letter-spacing: 0.2em; text-align: center; }
.hud-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-big { font-size: 16px; letter-spacing: 0.04em; }
.hud-note {
  margin-top: 22px;
  font-size: 12px;
  color: #6e7368;
  letter-spacing: 0.04em;
}
.hud.flash { animation: hudflash 0.6s ease infinite; }
@keyframes hudflash {
  0%, 100% { box-shadow: 0 0 10px rgba(200, 255, 77, 0.2); }
  50% { box-shadow: 0 0 28px rgba(200, 255, 77, 0.7); }
}

/* —— Phone —— */
.phone {
  position: relative;
  width: 390px;
  height: 844px;
  flex-shrink: 0;
  background: #1a1c20;
  border-radius: 54px;
  padding: 10px;
  box-shadow:
    0 0 0 1px #2c2e33,
    0 40px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.phone-screen {
  position: relative;
  height: 100%;
  background: var(--screen);
  border-radius: 44px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 34px;
  background: #000;
  border-radius: 20px;
  z-index: 8;
}
.phone-btn {
  position: absolute;
  background: #2a2c30;
  border-radius: 2px;
}
.phone-btn-l { left: -3px; top: 148px; width: 3px; height: 92px; }
.phone-btn-r1 { right: -3px; top: 168px; width: 3px; height: 52px; }
.phone-btn-r2 { right: -3px; top: 230px; width: 3px; height: 72px; }

.status-bar {
  position: relative;
  z-index: 6;
  height: var(--safe-top);
  padding: 16px 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.status-icons { display: flex; align-items: center; gap: 6px; padding-top: 2px; }
.sig, .wifi, .bat {
  display: inline-block;
  background: currentColor;
}
.sig {
  width: 17px; height: 10px;
  clip-path: polygon(0 100%, 22% 70%, 22% 100%, 44% 45%, 44% 100%, 66% 22%, 66% 100%, 100% 0, 100% 100%);
}
.wifi {
  width: 14px; height: 10px;
  border-radius: 0 0 10px 10px;
  clip-path: polygon(50% 100%, 0 40%, 18% 40%, 50% 78%, 82% 40%, 100% 40%);
}
.bat {
  width: 22px; height: 10px;
  background: transparent;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  position: relative;
}
.bat::after {
  content: "";
  position: absolute;
  inset: 1.5px 6px 1.5px 1.5px;
  background: currentColor;
}
.bat::before {
  content: "";
  position: absolute;
  right: -3.5px; top: 2px;
  width: 2px; height: 4px;
  background: currentColor;
  border-radius: 0 1px 1px 0;
}

.app {
  flex: 1;
  overflow: auto;
  padding: 6px 20px calc(var(--tab-h) + 8px);
  scrollbar-width: none;
}
.app::-webkit-scrollbar { display: none; }
.app.full { padding-bottom: 28px; }

.home-indicator {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 128px;
  height: 5px;
  background: #fff;
  opacity: 0.22;
  border-radius: 99px;
  z-index: 9;
}

/* —— Tabbar —— */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--tab-h);
  padding: 8px 10px 22px;
  display: flex;
  justify-content: space-around;
  background: linear-gradient(to top, rgba(11, 12, 15, 0.96), rgba(11, 12, 15, 0.88) 70%, transparent);
  backdrop-filter: blur(16px);
  z-index: 7;
}
.tab {
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.tab.on { color: var(--hud); }
.tab svg { width: 22px; height: 22px; }

/* —— Common UI —— */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 8px;
}
.nav h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.back, .nav-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: var(--hud);
  border-radius: 50%;
}
.back { margin-left: -8px; }
.ghost { color: var(--muted); font-size: 14px; }

.hero-title {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.sub { color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 6px; }
.kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hud);
  margin-bottom: 6px;
}

.device-card {
  margin: 12px 0 18px;
  padding: 16px;
  background:
    linear-gradient(160deg, rgba(200, 255, 77, 0.1), transparent 42%),
    var(--card);
  border: 1px solid var(--line-2);
  border-radius: 22px;
}
.device-row { display: flex; align-items: center; gap: 12px; }
.lens {
  width: 56px; height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(200, 255, 77, 0.35);
  display: grid; place-items: center;
  background: #050605;
  box-shadow: inset 0 0 18px rgba(200, 255, 77, 0.15);
}
.lens i {
  width: 18px; height: 12px;
  border-radius: 2px;
  background: var(--hud);
  box-shadow: 0 0 12px var(--hud-glow);
}
.device-card h2 { font-size: 18px; font-weight: 650; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 11px;
  background: var(--hud-dim);
  color: var(--hud);
  margin-top: 6px;
}
.pill.off { background: rgba(255, 90, 98, 0.12); color: var(--danger); }
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.metric {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}
.metric b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.metric span { font-size: 10px; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tile {
  text-align: left;
  padding: 14px 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  min-height: 96px;
}
.tile:active { transform: scale(0.985); }
.tile .ico {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--hud-dim);
  color: var(--hud);
  margin-bottom: 10px;
}
.tile b { display: block; font-size: 15px; font-weight: 600; }
.tile span { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }

.section-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 22px 0 10px;
  font-size: 13px;
  color: var(--muted);
}
.list {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row:active { background: rgba(255, 255, 255, 0.03); }
.row .grow { flex: 1; min-width: 0; }
.row b { display: block; font-size: 14px; font-weight: 550; }
.row span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.chev { color: var(--dim); font-size: 16px; }
.badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--hud-dim);
  color: var(--hud);
}
.badge.mute { background: rgba(255,255,255,.06); color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--hud);
  color: #111;
  font-size: 15px;
  font-weight: 650;
  width: 100%;
}
.btn:active { transform: scale(0.98); }
.btn.ghost {
  background: var(--elev);
  color: var(--text);
  border: 1px solid var(--line-2);
  font-weight: 550;
}
.btn.danger { background: var(--danger); color: #fff; }
.btn.sm { height: 36px; font-size: 13px; width: auto; padding: 0 12px; border-radius: 10px; }
.btns { display: flex; gap: 8px; margin-top: 14px; }

.toggle {
  width: 48px; height: 30px;
  border-radius: 99px;
  background: #2a2d34;
  position: relative;
  flex-shrink: 0;
}
.toggle.on { background: var(--hud); }
.toggle i {
  position: absolute;
  top: 3px; left: 3px;
  width: 24px; height: 24px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.toggle.on i { transform: translateX(18px); }

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: #2a2d34;
  border-radius: 99px;
  outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}

.seg {
  display: flex;
  background: var(--elev);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  flex: 1;
  height: 34px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
}
.seg button.on { background: #23262d; color: var(--text); font-weight: 600; }

.field {
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.field input, .field textarea {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 15px;
}
.field textarea { min-height: 72px; resize: none; }

/* splash */
.splash {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 80px;
}
.mark {
  width: 72px; height: 72px;
  border-radius: 22px;
  border: 1px solid rgba(200, 255, 77, 0.4);
  display: grid; place-items: center;
  margin-bottom: 18px;
  box-shadow: 0 0 32px rgba(200, 255, 77, 0.18);
}
.mark i {
  width: 28px; height: 16px;
  background: var(--hud);
  border-radius: 3px;
  box-shadow: 0 0 16px var(--hud-glow);
}
.splash h1 { font-size: 32px; letter-spacing: -0.04em; font-weight: 670; }
.splash h1 em { font-style: normal; color: var(--hud); }
.splash p { margin-top: 8px; color: var(--muted); font-size: 13px; letter-spacing: 0.18em; }

/* AI */
.chat { display: flex; flex-direction: column; gap: 12px; padding-bottom: 88px; }
.bubble {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.bubble.me {
  align-self: flex-end;
  background: var(--hud);
  color: #111;
  border-bottom-right-radius: 6px;
}
.bubble.bot {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.chip {
  padding: 6px 10px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--muted);
}
.chip.on { border-color: rgba(200,255,77,.4); color: var(--hud); background: var(--hud-dim); }
.composer {
  position: absolute;
  left: 16px; right: 16px;
  bottom: calc(var(--tab-h) + 2px);
  display: flex;
  gap: 8px;
  z-index: 6;
}
.composer .field { flex: 1; }
.mic {
  width: 48px; height: 48px;
  border-radius: 16px;
  background: var(--hud);
  color: #111;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.mic.rec { background: var(--danger); color: #fff; animation: pulse 1s ease infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 98, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(255, 90, 98, 0); }
}

/* translate live */
.live-card {
  margin-top: 12px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 88px;
}
.live-card .lang { font-size: 11px; color: var(--hud); letter-spacing: 0.12em; margin-bottom: 8px; }
.live-card p { font-size: 18px; line-height: 1.45; letter-spacing: -0.02em; }
.live-card.origin p { color: var(--muted); font-size: 15px; }
.pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0;
}
.lang-btn {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  text-align: left;
}
.lang-btn b { display: block; font-size: 16px; }
.lang-btn span { font-size: 11px; color: var(--muted); }
.swap {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  color: var(--hud);
}

/* map */
.map {
  height: 210px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 40%, rgba(200,255,77,.12), transparent 40%),
    linear-gradient(#14171c, #0e1014);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  margin: 10px 0 14px;
}
.map svg { width: 100%; height: 100%; }
.nav-banner {
  position: absolute;
  left: 10px; right: 10px; top: 10px;
  background: rgba(7,8,10,.82);
  border: 1px solid rgba(200,255,77,.25);
  border-radius: 12px;
  padding: 10px 12px;
  backdrop-filter: blur(8px);
}
.nav-banner b { font-size: 20px; color: var(--hud); font-variant-numeric: tabular-nums; }
.nav-banner span { display: block; font-size: 12px; color: var(--muted); }

/* teleprompter */
.prompt-stage {
  background: #050605;
  border: 1px solid rgba(200,255,77,.2);
  border-radius: 16px;
  padding: 18px 16px;
  min-height: 280px;
  color: var(--hud);
  font-size: 22px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  overflow: hidden;
}
.prompt-stage .done { opacity: 0.28; }
.prompt-stage .now { background: rgba(200,255,77,.14); }

/* music */
.cover {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  background:
    conic-gradient(from 210deg, #c8ff4d, #1b3a12, #6aa7ff, #c8ff4d);
  position: relative;
  overflow: hidden;
  margin: 8px 0 16px;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: #07080a;
  box-shadow: inset 0 0 0 18px rgba(0,0,0,.35);
}
.cover.sm {
  width: 44px; height: 44px; aspect-ratio: auto; margin: 0;
  border-radius: 10px;
}
.cover.sm::after { inset: 28%; box-shadow: none; }
.now-meta h2 { font-size: 20px; }
.now-meta p { color: var(--muted); margin-top: 4px; }
.progress {
  height: 3px;
  background: #2a2d34;
  border-radius: 99px;
  margin: 16px 0 6px;
  overflow: hidden;
}
.progress i { display: block; height: 100%; background: var(--hud); width: 42%; }
.times { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.transport {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 8px 8px;
}
.transport .play {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--hud);
  color: #111;
  display: grid; place-items: center;
}
.icon-btn { color: var(--text); width: 44px; height: 44px; display: grid; place-items: center; }
.icon-btn.on { color: var(--hud); }

/* record */
.rec-orb {
  width: 96px; height: 96px;
  margin: 18px auto;
  border-radius: 50%;
  background: var(--elev);
  border: 2px solid var(--line-2);
  display: grid; place-items: center;
}
.rec-orb i { width: 28px; height: 28px; border-radius: 8px; background: var(--danger); }
.rec-orb.on {
  border-color: var(--danger);
  box-shadow: 0 0 0 10px rgba(255,90,98,.12);
}
.rec-orb.on i { border-radius: 6px; width: 22px; height: 22px; }

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: #16181e;
  border-top: 1px solid var(--line-2);
  border-radius: 22px 22px 0 0;
  padding: 12px 16px 28px;
  z-index: 12;
  animation: up 0.28s ease;
}
@keyframes up {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.grab {
  width: 40px; height: 4px;
  background: #3a3d44;
  border-radius: 99px;
  margin: 4px auto 12px;
}
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.46);
  z-index: 11;
}

.qr {
  width: 120px; height: 120px;
  margin: 12px auto;
  background:
    repeating-conic-gradient(#111 0% 25%, var(--hud) 0% 50%) 0 0 / 12px 12px;
  border-radius: 8px;
  filter: contrast(1.2);
  position: relative;
}
.qr::after {
  content: "AiGlass";
  position: absolute;
  inset: 38px;
  background: #111;
  color: var(--hud);
  font-size: 9px;
  display: grid; place-items: center;
  letter-spacing: 0.08em;
}

.ota {
  text-align: center;
  padding: 24px 8px;
}
.bar {
  height: 8px;
  background: #2a2d34;
  border-radius: 99px;
  overflow: hidden;
  margin: 16px 0;
}
.bar i { display: block; height: 100%; background: var(--hud); }

.radar {
  width: 180px; height: 180px;
  margin: 10px auto 16px;
  border-radius: 50%;
  border: 1px solid rgba(200,255,77,.25);
  position: relative;
  overflow: hidden;
}
.radar::before, .radar::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(200,255,77,.18);
  border-radius: 50%;
}
.radar::after { inset: 36%; }
.radar b {
  position: absolute;
  left: 50%; top: 50%;
  width: 50%; height: 2px;
  background: linear-gradient(to right, transparent, var(--hud));
  transform-origin: left center;
  animation: spin 2.4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.warn-text { color: var(--warn); font-size: 12px; line-height: 1.5; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #f3f5f7;
  color: #111;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}

.locked {
  margin-top: 40px;
  text-align: center;
  color: var(--muted);
}
.locked h2 { color: var(--text); margin: 8px 0; }

@media (max-width: 860px) {
  body { overflow: auto; }
  .stage { display: block; padding: 0; min-height: 100%; }
  .hud-col { display: none; }
  .phone {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }
  .phone-screen { border-radius: 0; }
  .phone-btn, .island { display: none; }
  .status-bar { padding-top: max(12px, env(safe-area-inset-top)); }
}

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