:root {
  --bg: #070B1F;
  --s1: #0F1635;
  --s2: #172050;
  --bd: #2A3580;
  --blue: #1F6BFF;
  --blueD: #0B3FBF;
  --cyan: #00E5FF;
  --cyanD: #009DB3;
  --tx: #fff;
  --mu: #9AA7D6;
  --ink: #04122E;
  --red: #FF3B5C;
  --redD: #A8153A;
  --yel: #FFC21A;
  --yelD: #A87A00;
  --grn: #1FD18B;
  --grnD: #0B8A5C;
  --accent: #00E5FF;
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *:before, *:after { box-sizing: inherit; margin: 0; -webkit-tap-highlight-color: transparent; }
body { background: #030615; color: var(--tx); font-family: Montserrat, system-ui, sans-serif; font-weight: 500; font-size: 15px; line-height: 1.4; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--tx); background: var(--s2); border: 2px solid var(--bd); border-radius: 14px; padding: 13px 14px; width: 100%; outline: 0; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; padding-bottom: 120px; box-shadow: 0 0 50px rgba(0,0,0,0.8); }

.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.s14 { width: 14px; height: 14px; }
.s16 { width: 16px; height: 16px; }
.sh { fill: currentColor; stroke: none; width: 30px; height: 30px; flex: none; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 8px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.3px; }
.logo i { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--blue), var(--cyan)); box-shadow: 0 3px 0 var(--blueD); display: grid; place-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); box-shadow: 0 5px 0 var(--blueD); border-radius: 16px; padding: 14px 24px; font-weight: 800; font-size: 16px; transition: transform .08s, box-shadow .08s; text-decoration: none; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--blueD); }
.btn.cy { background: var(--cyan); color: var(--ink); box-shadow: 0 5px 0 var(--cyanD); }
.btn.gh { background: var(--s2); box-shadow: 0 5px 0 var(--bd); border: 2px solid var(--bd); }
.btn.w { width: 100%; }

.ib { width: 44px; height: 44px; border-radius: 14px; background: var(--s2); border: 2px solid var(--bd); display: grid; place-items: center; }
.tabs { display: flex; gap: 8px; padding: 8px 16px; }
.tabs button { flex: 1; padding: 11px; border-radius: 14px; font-weight: 700; color: var(--mu); background: var(--s1); transition: all .2s; }
.tabs button.on { background: var(--s2); color: var(--cyan); box-shadow: inset 0 -3px 0 var(--cyan); }

.chips { display: flex; gap: 8px; padding: 6px 16px 12px; overflow-x: auto; scrollbar-width: none; }
.chip { flex: none; padding: 9px 15px; border-radius: 99px; background: var(--s2); border: 2px solid var(--bd); font-weight: 700; font-size: 13px; color: var(--tx); transition: all .15s; }
.chip.on { background: var(--cyan); color: var(--ink); border-color: var(--cyan); box-shadow: 0 3px 0 var(--cyanD); }

.list { display: grid; gap: 18px; padding: 4px 16px; }
.card { background: var(--s1); border: 2px solid var(--bd); border-radius: 24px; overflow: hidden; transition: border-color .15s; }
.card:hover { border-color: var(--cyan); }
.card.idle { opacity: .75; }

.cov { height: 160px; position: relative; cursor: pointer; overflow: hidden; background-size: cover; background-position: center; }
.cov:before { content: ""; position: absolute; right: -50px; top: 30px; width: 190px; height: 190px; border-radius: 50%; background: #ffffff22; }
.pill, .mt { position: absolute; top: 12px; background: #04122Ed9; border-radius: 99px; display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12px; backdrop-filter: blur(4px); }
.pill { left: 12px; padding: 6px 10px; }
.mt { right: 12px; width: 36px; height: 36px; justify-content: center; }
.big { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 4px 0 #0005; transition: transform .15s; }
.cov:hover .big { transform: scale(1.08); }

.cb { padding: 14px 16px 16px; display: grid; gap: 12px; }
.cb h3 { font-size: 17px; font-weight: 800; line-height: 1.3; }
.au { display: flex; align-items: center; gap: 10px; }
.au div { flex: 1; display: grid; }
.au small { color: var(--mu); font-weight: 600; font-size: 12px; }
.av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--cyan)); display: grid; place-items: center; font-style: normal; font-weight: 800; color: var(--ink); flex: none; background-size: cover; background-position: center; }
.fol { padding: 7px 14px; border-radius: 99px; border: 2px solid var(--cyan); color: var(--cyan); font-weight: 800; font-size: 12px; }
.fol.on { background: var(--cyan); color: var(--ink); }

.st { display: flex; gap: 16px; align-items: center; color: var(--mu); font-weight: 700; font-size: 13px; }
.st button { display: flex; gap: 6px; align-items: center; font-weight: 700; transition: color .15s; }
.st button.on { color: var(--red); }
.st button.on svg { fill: var(--red); }
.lv { display: flex; gap: 6px; align-items: center; color: var(--cyan); }
.empty { text-align: center; padding: 48px 28px; color: var(--mu); display: grid; gap: 16px; justify-items: center; }
.empty b { color: var(--tx); font-size: 18px; }

nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100%); background: var(--s1); border-top: 2px solid var(--bd); display: flex; justify-content: space-between; align-items: center; padding: 8px 20px calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 5; }
nav button { display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--mu); min-width: 56px; }
nav button.on { color: var(--cyan); }
nav .cr { width: 56px; height: 56px; border-radius: 18px; background: var(--blue); box-shadow: 0 5px 0 var(--blueD); color: #fff; display: grid; place-items: center; min-width: 0; transition: transform .1s; }
nav .cr:active { transform: scale(0.92); }

.pad { padding: 8px 16px; display: grid; gap: 14px; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
label { display: grid; gap: 7px; font-weight: 700; font-size: 13px; color: var(--mu); }
.err { color: #FF8FA3; font-weight: 700; font-size: 13px; min-height: 18px; }

.up { border: 2px dashed var(--bd); border-radius: 18px; padding: 18px; display: grid; gap: 6px; justify-items: center; text-align: center; color: var(--mu); cursor: pointer; position: relative; transition: border-color .2s; }
.up:hover { border-color: var(--cyan); }
.up input { position: absolute; inset: 0; opacity: 0; cursor: pointer; padding: 0; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.seg button { padding: 12px 6px; border-radius: 14px; background: var(--s2); border: 2px solid var(--bd); display: grid; justify-items: center; gap: 4px; font-weight: 700; font-size: 12px; }
.seg button.on { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 4px 0 var(--cyanD); }

.qb { background: var(--s1); border: 2px solid var(--bd); border-radius: 20px; padding: 14px; display: grid; gap: 10px; }
.qb .r { display: flex; gap: 8px; align-items: center; }
.qb .r input[type=radio] { width: 22px; height: 22px; accent-color: var(--cyan); padding: 0; flex: none; }

.ov { position: fixed; inset: 0; z-index: 20; background: #030615d9; display: flex; justify-content: center; align-items: flex-end; backdrop-filter: blur(6px); }
.ov > div { width: min(480px, 100%); background: var(--bg); border: 2px solid var(--bd); border-radius: 28px 28px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; max-height: 92vh; overflow: auto; box-shadow: 0 -10px 40px rgba(0,0,0,0.8); }
.ov.full { align-items: stretch; background: var(--bg); }
.ov.full > div { border: 0; border-radius: 0; max-height: none; min-height: 100%; align-content: start; padding-top: calc(16px + env(safe-area-inset-top, 0px)); }

.ph { height: 170px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), var(--cyan)); position: relative; overflow: hidden; background-size: cover; background-position: center; }
.ph .big { position: static; margin: 0; }
.wave { display: flex; gap: 4px; align-items: center; height: 44px; position: absolute; bottom: 16px; }
.wave i { width: 5px; border-radius: 3px; background: #fff9; }
.tb { height: 12px; border-radius: 99px; background: var(--s2); overflow: hidden; }
.tb i { display: block; height: 100%; background: var(--cyan); border-radius: 99px; transition: width .1s linear; }
.ph2 { display: flex; align-items: center; gap: 12px; }
.ph2 b { min-width: 34px; text-align: right; font-weight: 800; font-size: 18px; color: var(--cyan); }
.q { font-size: 20px; font-weight: 800; line-height: 1.3; text-align: center; padding: 6px 4px; }

.ans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.ans button { min-height: 112px; border-radius: 20px; display: flex; gap: 10px; align-items: center; padding: 14px; text-align: left; font-weight: 800; font-size: 17px; line-height: 1.2; transition: transform .08s, box-shadow .08s, opacity .2s; }
.a0 { background: var(--red); box-shadow: 0 8px 0 var(--redD); color: #fff; }
.a1 { background: var(--blue); box-shadow: 0 8px 0 var(--blueD); color: #fff; }
.a2 { background: var(--yel); color: var(--ink); box-shadow: 0 8px 0 var(--yelD); }
.a3 { background: var(--grn); color: var(--ink); box-shadow: 0 8px 0 var(--grnD); }
.ans button:active:not(:disabled) { transform: translateY(6px); box-shadow: 0 2px 0 #0006; }
.ans button.dim { opacity: .25; }
.ans button.ok { outline: 4px solid #fff; outline-offset: 3px; }

.fb { text-align: center; font-weight: 800; min-height: 24px; font-size: 16px; }
.row { display: flex; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--bd); font-weight: 700; }
.row span:last-child { color: var(--accent); }
.score { font-size: 56px; font-weight: 800; text-align: center; color: var(--cyan); letter-spacing: -1px; text-shadow: 0 0 20px rgba(0,229,255,0.4); }

/* Profile layout styles */
.prof { --a: var(--accent); }
.ban { height: 110px; background: linear-gradient(135deg, var(--accent), var(--blue)); border-radius: 0 0 28px 28px; position: relative; background-size: cover; background-position: center; }
.me { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; margin-top: -48px; padding: 0 16px; }
.me .av { width: 92px; height: 92px; font-size: 34px; border: 4px solid var(--bg); background: var(--accent); box-shadow: 0 0 0 3px var(--accent); }

.nums { display: flex; gap: 28px; text-align: center; margin-top: 4px; }
.nums b { display: block; font-size: 20px; font-weight: 800; }
.nums small { color: var(--mu); font-weight: 600; font-size: 12px; }

.sw { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sw button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--bd); }
.sw button.on { box-shadow: 0 0 0 3px #fff; }
.sw input[type=color] { width: 46px; height: 38px; padding: 2px; border-radius: 12px; }

.box { background: var(--s1); border: 2px solid var(--bd); border-radius: 20px; padding: 6px 16px; }
.hex { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; font-size: 11px; font-weight: 700; color: var(--mu); }
.hex svg { width: 100%; max-width: 72px; margin: auto; display: block; }

#toast { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); background: var(--cyan); color: var(--ink); font-weight: 800; padding: 12px 20px; border-radius: 99px; box-shadow: 0 4px 0 var(--cyanD); z-index: 50; display: none; max-width: 90%; text-align: center; }
.link { color: var(--cyan); font-weight: 700; text-align: center; padding: 6px; text-decoration: none; display: inline-block; }
.adm { background: var(--cyan); color: var(--ink); font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; margin-left: 8px; vertical-align: middle; box-shadow: 0 2px 0 var(--cyanD); }
.gear { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; background: #04122Eb3; }
.rp { margin-left: auto; color: var(--mu); }
.g { width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #4285F4; font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.xp { display: grid; gap: 6px; }

.cm { display: flex; gap: 12px; align-items: center; background: var(--s1); border: 2px solid var(--bd); border-radius: 20px; padding: 14px; cursor: pointer; transition: border-color .15s; }
.cm:hover { border-color: var(--cyan); }
.cm i { width: 48px; height: 48px; border-radius: 16px; background: linear-gradient(135deg, var(--blue), var(--cyan)); display: grid; place-items: center; flex: none; }
.cm div { flex: 1; display: grid; gap: 2px; }

details { background: var(--s1); border: 2px solid var(--bd); border-radius: 16px; padding: 12px 14px; }
summary { font-weight: 800; cursor: pointer; }
details p { color: var(--mu); margin-top: 8px; font-size: 14px; }
.sep { text-align: center; color: var(--mu); font-weight: 700; font-size: 13px; }

.geo-btn { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--s2); border: 2px dashed var(--cyan); color: var(--cyan); padding: 11px 16px; border-radius: 14px; font-weight: 700; font-size: 13px; cursor: pointer; transition: all .15s; }
.geo-btn:active { transform: scale(0.98); background: #00e5ff18; }
.geo-tag { background: #00e5ff22; color: var(--cyan); border: 1px solid var(--cyan); padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }

.c-select-box { max-height: 200px; overflow-y: auto; background: var(--s2); border: 2px solid var(--bd); border-radius: 14px; padding: 4px; display: grid; gap: 4px; }
.c-item { padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.c-item:hover, .c-item.selected { background: var(--blue); color: #fff; }

/* User search result cards */
.ucard { display: flex; align-items: center; gap: 14px; background: var(--s1); border: 2px solid var(--bd); border-radius: 20px; padding: 14px 16px; cursor: pointer; transition: border-color .15s, transform .12s; }
.ucard:hover { border-color: var(--accent, var(--cyan)); transform: translateY(-2px); }
.ucard .uav { width: 54px; height: 54px; border-radius: 50%; flex: none; overflow: hidden; border: 3px solid var(--accent, var(--cyan)); background: var(--s2); display:grid; place-items:center; font-weight:800; font-size:20px; }
.ucard .uav img { width:100%; height:100%; object-fit:cover; }
.ucard .uinfo { flex:1; display:grid; gap:2px; min-width:0; }
.ucard .uinfo b { font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ucard .uinfo small { color: var(--mu); font-size:12px; font-weight:600; }
.ucard .ufol { flex: none; }
.stabs { display:flex; gap:8px; padding: 0 16px 4px; overflow-x:auto; scrollbar-width:none; }
.stabs button { padding:7px 16px; border-radius:99px; font-weight:700; font-size:13px; border:2px solid var(--bd); background:var(--s1); color:var(--mu); white-space:nowrap; transition:all .15s; }
.stabs button.on { background:var(--cyan); color:var(--ink); border-color:var(--cyan); }

/* PWA Installation & Banner */
.pwa-banner { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: 440px; background: rgba(15, 22, 53, 0.96); backdrop-filter: blur(16px); border: 2px solid var(--cyan); border-radius: 20px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 30px rgba(0, 229, 255, 0.25); z-index: 99; }
.pwa-banner img { width: 44px; height: 44px; border-radius: 12px; flex: none; border: 1.5px solid var(--bd); }
.pwa-banner .pwa-info { flex: 1; display: grid; gap: 2px; min-width: 0; }
.pwa-banner .pwa-info b { font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwa-banner .pwa-info small { color: var(--mu); font-size: 11px; line-height: 1.2; }
.pwa-banner .pwa-actions { display: flex; gap: 6px; align-items: center; flex: none; }
.pwa-banner .pwa-btn { background: var(--cyan); color: var(--ink); font-weight: 800; font-size: 12px; padding: 8px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.pwa-banner .pwa-close { color: var(--mu); font-size: 18px; padding: 4px 6px; cursor: pointer; background: none; border: none; }

