style.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. :root {
  2. --bg: #0a0a1a;
  3. --grid: rgba(0, 255, 255, 0.04);
  4. --cyan: #00e5ff;
  5. --cyan-dim: #00b8d4;
  6. --text: #e0f7fa;
  7. --text-dim: #80deea;
  8. --danger: #ff5252;
  9. --ok: #00e676;
  10. --warn: #ffb74d;
  11. --panel: rgba(10, 20, 40, 0.55);
  12. --panel-border: rgba(0, 229, 255, 0.35);
  13. }
  14. * { box-sizing: border-box; margin: 0; padding: 0; }
  15. html, body {
  16. width: 100%;
  17. height: 100%;
  18. overflow: hidden;
  19. background: var(--bg);
  20. color: var(--text);
  21. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  22. -webkit-font-smoothing: antialiased;
  23. user-select: none;
  24. }
  25. body {
  26. background-color: var(--bg);
  27. background-image:
  28. linear-gradient(var(--grid) 1px, transparent 1px),
  29. linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  30. background-size: 40px 40px;
  31. background-position: -1px -1px;
  32. }
  33. /* Subtle radial vignette */
  34. body::before {
  35. content: "";
  36. position: fixed;
  37. inset: 0;
  38. pointer-events: none;
  39. background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.6) 100%);
  40. z-index: 1;
  41. }
  42. #stage {
  43. position: fixed;
  44. inset: 0;
  45. z-index: 2;
  46. cursor: crosshair;
  47. }
  48. /* ---------- Webcam preview ---------- */
  49. #preview-wrap {
  50. position: fixed;
  51. left: 24px;
  52. bottom: 64px;
  53. width: 240px;
  54. height: 180px;
  55. border-radius: 14px;
  56. overflow: hidden;
  57. background: #000;
  58. border: 1px solid var(--panel-border);
  59. box-shadow:
  60. 0 0 0 1px rgba(0, 229, 255, 0.08) inset,
  61. 0 8px 32px rgba(0, 229, 255, 0.12),
  62. 0 2px 8px rgba(0, 0, 0, 0.6);
  63. z-index: 10;
  64. backdrop-filter: blur(4px);
  65. }
  66. #preview-wrap::before {
  67. content: "LIVE · IRIS";
  68. position: absolute;
  69. top: 8px;
  70. left: 10px;
  71. font-size: 10px;
  72. letter-spacing: 0.15em;
  73. color: var(--cyan);
  74. text-shadow: 0 0 8px rgba(0, 229, 255, 0.7);
  75. z-index: 12;
  76. pointer-events: none;
  77. }
  78. #preview-wrap::after {
  79. content: "";
  80. position: absolute;
  81. inset: 0;
  82. border-radius: 14px;
  83. pointer-events: none;
  84. box-shadow: 0 0 24px rgba(0, 229, 255, 0.18) inset;
  85. z-index: 11;
  86. }
  87. #webcam, #overlay {
  88. position: absolute;
  89. inset: 0;
  90. width: 100%;
  91. height: 100%;
  92. }
  93. #webcam {
  94. object-fit: cover;
  95. transform: scaleX(-1); /* mirrored */
  96. z-index: 1;
  97. }
  98. #overlay {
  99. z-index: 2;
  100. pointer-events: none;
  101. }
  102. /* ---------- Status bar ---------- */
  103. #status-bar {
  104. position: fixed;
  105. left: 0;
  106. right: 0;
  107. bottom: 0;
  108. height: 48px;
  109. display: flex;
  110. align-items: center;
  111. gap: 24px;
  112. padding: 0 20px;
  113. background: var(--panel);
  114. border-top: 1px solid var(--panel-border);
  115. backdrop-filter: blur(8px);
  116. font-size: 12px;
  117. letter-spacing: 0.05em;
  118. z-index: 20;
  119. color: var(--text-dim);
  120. }
  121. .stat {
  122. display: flex;
  123. align-items: center;
  124. gap: 8px;
  125. }
  126. .stat .label {
  127. color: rgba(128, 222, 234, 0.55);
  128. text-transform: uppercase;
  129. font-size: 10px;
  130. letter-spacing: 0.18em;
  131. }
  132. .stat .value {
  133. color: var(--cyan);
  134. text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
  135. font-variant-numeric: tabular-nums;
  136. min-width: 60px;
  137. }
  138. .stat .value.ok { color: var(--ok); text-shadow: 0 0 8px rgba(0, 230, 118, 0.4); }
  139. .stat .value.warn { color: #ffb74d; text-shadow: 0 0 8px rgba(255, 183, 77, 0.4); }
  140. .stat .value.err { color: var(--danger); text-shadow: 0 0 8px rgba(255, 82, 82, 0.4); }
  141. .dot {
  142. width: 8px;
  143. height: 8px;
  144. border-radius: 50%;
  145. background: var(--cyan-dim);
  146. box-shadow: 0 0 8px var(--cyan-dim);
  147. animation: pulse 1.6s ease-in-out infinite;
  148. }
  149. .dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
  150. .dot.warn { background: #ffb74d; box-shadow: 0 0 10px #ffb74d; }
  151. .dot.err { background: var(--danger); box-shadow: 0 0 10px var(--danger); animation: none; }
  152. @keyframes pulse {
  153. 0%, 100% { opacity: 1; transform: scale(1); }
  154. 50% { opacity: 0.4; transform: scale(0.8); }
  155. }
  156. /* Small inline button (used for "Recalibrate" in the status bar) */
  157. .btn-mini {
  158. font-family: inherit;
  159. font-size: 10px;
  160. letter-spacing: 0.18em;
  161. text-transform: uppercase;
  162. color: var(--cyan);
  163. background: transparent;
  164. border: 1px solid var(--panel-border);
  165. border-radius: 4px;
  166. padding: 4px 10px;
  167. cursor: pointer;
  168. transition: background 0.2s, box-shadow 0.2s, color 0.2s;
  169. }
  170. .btn-mini:hover {
  171. background: rgba(0, 229, 255, 0.1);
  172. box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
  173. color: #ffffff;
  174. }
  175. .btn-mini:disabled {
  176. color: rgba(128, 222, 234, 0.35);
  177. border-color: rgba(0, 229, 255, 0.15);
  178. cursor: not-allowed;
  179. background: transparent;
  180. box-shadow: none;
  181. }
  182. /* ---------- Title ---------- */
  183. #title {
  184. position: fixed;
  185. top: 18px;
  186. left: 24px;
  187. z-index: 15;
  188. font-size: 11px;
  189. letter-spacing: 0.3em;
  190. color: rgba(0, 229, 255, 0.7);
  191. text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
  192. }
  193. #title .accent { color: var(--cyan); }
  194. /* ---------- Loading overlay ---------- */
  195. #loader {
  196. position: fixed;
  197. inset: 0;
  198. z-index: 100;
  199. display: flex;
  200. flex-direction: column;
  201. align-items: center;
  202. justify-content: center;
  203. gap: 28px;
  204. background: rgba(10, 10, 26, 0.92);
  205. backdrop-filter: blur(6px);
  206. transition: opacity 0.5s ease, visibility 0.5s;
  207. }
  208. #loader.hidden {
  209. opacity: 0;
  210. visibility: hidden;
  211. }
  212. .spinner {
  213. width: 64px;
  214. height: 64px;
  215. border: 2px solid rgba(0, 229, 255, 0.15);
  216. border-top-color: var(--cyan);
  217. border-right-color: var(--cyan);
  218. border-radius: 50%;
  219. animation: spin 1s linear infinite;
  220. box-shadow: 0 0 24px rgba(0, 229, 255, 0.3);
  221. }
  222. @keyframes spin {
  223. to { transform: rotate(360deg); }
  224. }
  225. .loader-text {
  226. font-size: 12px;
  227. letter-spacing: 0.4em;
  228. text-transform: uppercase;
  229. color: var(--cyan);
  230. text-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
  231. }
  232. .loader-sub {
  233. font-size: 11px;
  234. color: var(--text-dim);
  235. letter-spacing: 0.15em;
  236. max-width: 320px;
  237. text-align: center;
  238. line-height: 1.6;
  239. }
  240. /* ---------- Error overlay ---------- */
  241. #error-overlay {
  242. position: fixed;
  243. inset: 0;
  244. z-index: 90;
  245. display: none;
  246. flex-direction: column;
  247. align-items: center;
  248. justify-content: center;
  249. gap: 18px;
  250. background: rgba(10, 10, 26, 0.88);
  251. backdrop-filter: blur(6px);
  252. padding: 40px;
  253. text-align: center;
  254. }
  255. #error-overlay.show { display: flex; }
  256. #error-overlay .icon {
  257. font-size: 48px;
  258. filter: drop-shadow(0 0 12px rgba(255, 82, 82, 0.6));
  259. }
  260. #error-overlay h2 {
  261. font-size: 18px;
  262. letter-spacing: 0.15em;
  263. color: var(--danger);
  264. text-transform: uppercase;
  265. }
  266. #error-overlay p {
  267. color: var(--text-dim);
  268. font-size: 13px;
  269. max-width: 520px;
  270. line-height: 1.7;
  271. }
  272. #error-overlay button {
  273. margin-top: 12px;
  274. padding: 10px 24px;
  275. background: transparent;
  276. border: 1px solid var(--cyan);
  277. color: var(--cyan);
  278. font-family: inherit;
  279. font-size: 12px;
  280. letter-spacing: 0.2em;
  281. text-transform: uppercase;
  282. cursor: pointer;
  283. border-radius: 6px;
  284. transition: background 0.2s, box-shadow 0.2s;
  285. }
  286. #error-overlay button:hover {
  287. background: rgba(0, 229, 255, 0.1);
  288. box-shadow: 0 0 16px rgba(0, 229, 255, 0.3);
  289. }
  290. /* ---------- Debug panel (top-left, collapsible) ---------- */
  291. #debug-panel {
  292. position: fixed;
  293. top: 48px;
  294. left: 24px;
  295. z-index: 30;
  296. width: 260px;
  297. max-width: calc(100vw - 48px);
  298. background: var(--panel);
  299. border: 1px solid var(--panel-border);
  300. border-radius: 10px;
  301. backdrop-filter: blur(8px);
  302. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  303. font-size: 11px;
  304. color: var(--text);
  305. overflow: hidden;
  306. transition: max-height 0.25s ease;
  307. }
  308. #debug-panel.collapsed { max-height: 32px; }
  309. #debug-panel.expanded { max-height: 480px; }
  310. #debug-header {
  311. display: flex;
  312. align-items: center;
  313. justify-content: space-between;
  314. padding: 8px 12px;
  315. cursor: pointer;
  316. user-select: none;
  317. background: rgba(0, 229, 255, 0.06);
  318. border-bottom: 1px solid var(--panel-border);
  319. font-size: 10px;
  320. letter-spacing: 0.2em;
  321. text-transform: uppercase;
  322. color: var(--cyan);
  323. }
  324. #debug-panel.collapsed #debug-body { display: none; }
  325. #debug-panel.collapsed #debug-header { border-bottom: none; }
  326. #debug-toggle {
  327. font-family: inherit;
  328. color: var(--cyan);
  329. font-size: 14px;
  330. line-height: 1;
  331. }
  332. #debug-body {
  333. padding: 10px 12px 12px;
  334. display: flex;
  335. flex-direction: column;
  336. gap: 6px;
  337. max-height: 440px;
  338. overflow-y: auto;
  339. }
  340. .dbg-row {
  341. display: flex;
  342. align-items: center;
  343. justify-content: space-between;
  344. gap: 8px;
  345. font-size: 11px;
  346. line-height: 1.4;
  347. word-break: break-all;
  348. }
  349. .dbg-row .k {
  350. color: rgba(128, 222, 234, 0.7);
  351. text-transform: uppercase;
  352. letter-spacing: 0.1em;
  353. font-size: 10px;
  354. flex-shrink: 0;
  355. }
  356. .dbg-row .v {
  357. color: var(--text);
  358. text-align: right;
  359. font-variant-numeric: tabular-nums;
  360. }
  361. .dbg-row .v.ok { color: var(--ok); }
  362. .dbg-row .v.warn { color: #ffb74d; }
  363. .dbg-row .v.err { color: var(--danger); }
  364. .dbg-row .v.run { color: var(--cyan); }
  365. #debug-err {
  366. margin-top: 6px;
  367. padding: 8px 10px;
  368. background: rgba(255, 82, 82, 0.08);
  369. border: 1px solid rgba(255, 82, 82, 0.35);
  370. border-radius: 6px;
  371. color: var(--danger);
  372. font-size: 10px;
  373. line-height: 1.5;
  374. word-break: break-word;
  375. display: none;
  376. max-height: 120px;
  377. overflow-y: auto;
  378. }
  379. #debug-err.show { display: block; }
  380. /* ---------- Calibration overlay (9-point) ---------- */
  381. #calibration-overlay {
  382. position: fixed;
  383. inset: 0;
  384. z-index: 80;
  385. display: none;
  386. align-items: center;
  387. justify-content: center;
  388. background: rgba(10, 10, 26, 0.92);
  389. backdrop-filter: blur(6px);
  390. }
  391. #calibration-overlay.show { display: flex; }
  392. #cal-dot {
  393. position: absolute;
  394. width: 36px;
  395. height: 36px;
  396. margin-left: -18px;
  397. margin-top: -18px;
  398. border-radius: 50%;
  399. background: radial-gradient(circle at center,
  400. rgba(255, 255, 255, 1) 0%,
  401. rgba(0, 229, 255, 1) 35%,
  402. rgba(0, 229, 255, 0.6) 65%,
  403. rgba(0, 229, 255, 0) 100%);
  404. box-shadow:
  405. 0 0 24px rgba(0, 229, 255, 0.9),
  406. 0 0 60px rgba(0, 229, 255, 0.5);
  407. animation: calPulse 1s ease-in-out infinite;
  408. pointer-events: none;
  409. transform-origin: center;
  410. }
  411. #cal-dot::after {
  412. content: "";
  413. position: absolute;
  414. inset: 12px;
  415. border-radius: 50%;
  416. border: 2px solid rgba(0, 229, 255, 0.6);
  417. }
  418. @keyframes calPulse {
  419. 0%, 100% { transform: scale(1); opacity: 1; }
  420. 50% { transform: scale(1.3); opacity: 0.7; }
  421. }
  422. #cal-text {
  423. position: absolute;
  424. top: 32px;
  425. left: 50%;
  426. transform: translateX(-50%);
  427. font-size: 13px;
  428. letter-spacing: 0.3em;
  429. text-transform: uppercase;
  430. color: var(--cyan);
  431. text-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
  432. text-align: center;
  433. pointer-events: none;
  434. }
  435. #cal-sub {
  436. position: absolute;
  437. top: 58px;
  438. left: 50%;
  439. transform: translateX(-50%);
  440. font-size: 10px;
  441. letter-spacing: 0.2em;
  442. color: var(--text-dim);
  443. text-align: center;
  444. pointer-events: none;
  445. }
  446. #cal-cancel {
  447. position: absolute;
  448. bottom: 32px;
  449. left: 50%;
  450. transform: translateX(-50%);
  451. }
  452. /* Faint preview ghost dots for upcoming calibration points */
  453. .cal-ghost {
  454. position: absolute;
  455. width: 14px;
  456. height: 14px;
  457. margin-left: -7px;
  458. margin-top: -7px;
  459. border-radius: 50%;
  460. border: 1px solid rgba(0, 229, 255, 0.25);
  461. background: rgba(0, 229, 255, 0.05);
  462. pointer-events: none;
  463. }