* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #0f1420; color: #f5f7fa;
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; overflow: hidden; }

#cam { position: fixed; inset: 0; background: #000; }
#video { width: 100%; height: 100%; object-fit: cover; }

/* scanning frame */
#frame { position: fixed; left: 10%; right: 10%; top: 34%; height: 26%;
  border: 3px solid rgba(255,176,32,.9); border-radius: 14px;
  box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }

#top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between;
  padding: 14px 16px; font-size: 14px; font-weight: 600;
  background: linear-gradient(#000a, #0000); text-shadow: 0 1px 2px #000; }
#bar { color: #ffb020; text-transform: uppercase; letter-spacing: .5px; }
#status { color: #cdd4de; }

.overlay { position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 14px;
  padding: 32px; background: #0f1420; z-index: 5; }
.overlay .big { font-size: 64px; }
.overlay h1 { font-size: 24px; }
.overlay p { color: #96a0af; max-width: 340px; line-height: 1.4; }
button { margin-top: 10px; padding: 14px 28px; font-size: 17px; font-weight: 700;
  color: #12161e; background: #ffb020; border: 0; border-radius: 12px; cursor: pointer; }
button:active { transform: translateY(1px); }

/* result card */
#card { position: fixed; left: 12px; right: 12px; bottom: 18px; z-index: 4;
  background: rgba(18,22,30,.94); border: 1px solid #2a3140; border-radius: 16px;
  padding: 18px 20px; backdrop-filter: blur(6px); }
#cardName { font-size: 20px; font-weight: 700; line-height: 1.25; }
#cardPrice { font-size: 30px; font-weight: 800; color: #ffb020; margin-top: 6px; }
#cardPrice .bar { font-size: 15px; color: #cdd4de; font-weight: 600; margin-right: 6px; }
#cardEan { margin-top: 6px; font-size: 12px; color: #7c8698; font-variant-numeric: tabular-nums; }
#card.miss #cardName { color: #ff6b6b; }
#card.miss #cardPrice { display: none; }

.hidden { display: none !important; }
