@font-face { font-family: Inter; font-weight: 400; src: url(fonts/Inter-Regular.ttf); font-display: swap; }
@font-face { font-family: Inter; font-weight: 700; src: url(fonts/Inter-Bold.ttf); font-display: swap; }
:root { --bg: #0f0f0f; --panel: #242424; --panel2: #161616; --text: #fff; --soft: #cdd2dc; --muted: #8b9099; --blue: #0a84ff; --green: #2ed573; --red: #ff7878; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 16px/1.45 Inter, system-ui, sans-serif; overscroll-behavior: none; }
button, input { font: inherit; color: inherit; }
#app { max-width: 560px; margin: 0 auto; min-height: 100%; padding: env(safe-area-inset-top) 0 calc(110px + env(safe-area-inset-bottom)); position: relative; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; position: sticky; top: 0; background: linear-gradient(var(--bg) 75%, transparent); z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.brand img { width: 34px; height: 34px; border-radius: 10px; corner-shape: squircle; }
.actions { display: flex; gap: 4px; }
.icon { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; }
.icon:hover { background: rgba(255, 255, 255, .08); }
.icon svg, .more svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon svg circle, .more svg circle { fill: #fff; stroke: none; }

.list { list-style: none; margin: 8px 0 0; padding: 0 14px; display: grid; gap: 12px; }
.acc { background: var(--panel); border-radius: 30px; corner-shape: squircle; padding: 16px 12px 16px 22px; display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "meta ring more" "code code code"; align-items: center; cursor: pointer; row-gap: 4px; }
.acc:active { background: #2c2c2c; }
.meta { grid-area: meta; min-width: 0; }
.meta b { display: block; font-size: 16px; }
.meta span { display: block; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code { grid-area: code; font-size: 38px; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; color: #fff; transition: color .3s; }
.code.soon { color: var(--red); }
.ring { grid-area: ring; width: 34px; height: 34px; transform: rotate(-90deg); margin-right: 4px; }
.ring circle { fill: none; stroke-width: 4; }
.ring .bg { stroke: rgba(255, 255, 255, .12); }
.ring .fg { stroke: var(--blue); stroke-dasharray: 94.25; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.ring .fg.soon { stroke: var(--red); }
.more { grid-area: more; width: 38px; height: 38px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.more:hover { background: rgba(255, 255, 255, .08); }

.fab { position: fixed; right: max(20px, calc(50% - 260px)); bottom: calc(24px + env(safe-area-inset-bottom)); width: 62px; height: 62px; border: 0; border-radius: 22px; corner-shape: squircle; background: var(--blue); display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 30px rgba(10, 132, 255, .35); z-index: 6; }
.fab:active { transform: scale(.96); }
.fab svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }

.center { text-align: center; padding: 70px 28px 20px; }
.center h2 { margin: 18px 0 10px; font-size: 24px; }
.center p { color: var(--soft); margin: 0 0 24px; }
.bigshield, .lockicon { width: 84px; height: 84px; margin: 0 auto; border-radius: 28px; corner-shape: squircle; background: var(--panel); display: grid; place-items: center; transform: rotate(-8deg); }
.bigshield svg, .lockicon svg { width: 42px; height: 42px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: rotate(8deg); }
.lockicon svg { stroke: #fff; }

.btn { border: 0; border-radius: 999px; padding: 13px 26px; background: rgba(255, 255, 255, .1); font-weight: 700; cursor: pointer; }
.btn:hover { background: rgba(255, 255, 255, .16); }
.btn.primary { background: #fff; color: #101216; }
.btn.primary:hover { background: #e2e2e2; }
.btn.danger { background: #3a1f1f; color: var(--red); }
.row2 { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
input { width: 100%; background: var(--panel2); border: 2px solid transparent; border-radius: 999px; padding: 13px 18px; outline: 0; margin-bottom: 12px; }
input:focus { border-color: var(--blue); }
.err { color: var(--red); font-size: 14px; min-height: 20px; margin: -2px 0 8px; }
form .btn { width: 100%; }
.hint { margin: 28px 18px 0; background: var(--panel); border-radius: 26px; corner-shape: squircle; padding: 16px 20px; color: var(--soft); font-size: 14px; text-align: left; }
.hint b { display: block; color: #fff; margin-bottom: 2px; }
.hint a { color: var(--blue); font-weight: 700; }

.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); display: none; align-items: center; justify-content: center; padding: 18px; z-index: 20; }
.overlay.show { display: flex; }
.dialog { background: var(--panel); border-radius: 36px; corner-shape: squircle; padding: 28px 24px 24px; width: min(420px, 100%); max-height: 90vh; overflow: auto; text-align: center; box-shadow: 0 20px 70px rgba(0, 0, 0, .6); }
.dialog h2 { margin: 0 0 10px; font-size: 22px; }
.dialog p { margin: 0 0 18px; color: var(--soft); }
.small { font-size: 13px; color: var(--muted); }
.menulist { display: grid; gap: 4px; text-align: left; }
.menulist button, .menulist .mi { background: none; border: 0; padding: 14px 16px; border-radius: 16px; font-weight: 700; text-align: left; cursor: pointer; color: #fff; text-decoration: none; display: block; }
.menulist button:hover, .menulist .mi:hover { background: rgba(255, 255, 255, .08); }
.menulist .danger { color: var(--red); }
.pre { background: var(--panel2); border-radius: 22px; corner-shape: squircle; padding: 14px; margin-bottom: 16px; }
.pre b { display: block; } .pre span { color: var(--muted); font-size: 14px; }
.tabs { display: flex; background: var(--panel2); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.tab { flex: 1; border: 0; background: none; padding: 10px; border-radius: 999px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tab.on { background: #fff; color: #101216; }
.cam { background: #000; border-radius: 28px; corner-shape: squircle; overflow: hidden; aspect-ratio: 1; margin-bottom: 12px; }
.cam video { width: 100%; height: 100%; object-fit: cover; display: block; }

.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: #fff; color: #101216; font-weight: 700; font-size: 14px; border-radius: 999px; padding: 11px 20px; opacity: 0; pointer-events: none; transition: .2s; z-index: 30; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.codegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.rc { background: var(--panel2); border: 0; border-radius: 16px; corner-shape: squircle; padding: 12px 6px; font: 700 14px ui-monospace, monospace; cursor: pointer; color: #fff; }
textarea { width: 100%; background: var(--panel2); border: 2px solid transparent; border-radius: 22px; padding: 12px 16px; outline: 0; margin-bottom: 12px; font: 700 14px ui-monospace, monospace; color: #fff; resize: none; }
textarea:focus { border-color: var(--blue); }
