:root {
  --bg: #0b1624;
  --panel: #121a22;
  --border: #1c2936;
  --text: #e6f1ff;
  --glass: #14202a;
  --glass-edge: #0d1620;
  --slot-off: #18222b;
  --slot-on: #6bd3ff;
  --slot-glow: #3494c7;
  --key-top: #2a3642;
  --key-edge: #11171f;
  --key-light: #3a4754;
  --danger: #ff5a6b;
  --ok: #4ce7b6;
  --accent-ice: #79c7ff;
  --accent-ice-deep: #2b86b8;
  --warn: #f5a623;
  --uv-x: 50%;
  --uv-y: 50%;
  --uv-radius: 60px;
  --uv-diameter: 80px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Rajdhani', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #0b1624, #0a1420);
  color: var(--text);
  display: grid;
  place-items: center;
}

.app {
  display: grid;
  width: min(760px, 95vw);
  grid-template-columns: 420px 300px;
  gap: 16px;
  align-items: start;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.screen {
  width: min(420px, 92vw);
  padding: 20px;
  border-radius: 12px;
  background: linear-gradient(180deg, #0f1c28, #0b141d);
  border: 1px solid #152231;
  box-shadow: 0 22px 50px rgba(5,12,18,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
}

.screen::after { content: none; display: none; }

.hud {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, #13202c, #0f1a24);
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), inset 0 -1px 0 rgba(0,0,0,0.45);
}

.hud::before { content: none; display: none; }

.hud::after { content: none; display: none; }

.title {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 13px;
  color: #e7eaea;
  opacity: 0.9;
  margin: 8px 0 10px;
}

.status {
  font-size: 15px;
  margin-bottom: 12px;
  color: #c8ced4;
}

.display {
  border: 1px solid var(--glass-edge);
  border-radius: 10px;
  padding: 14px 12px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #142635, #102130);
  box-shadow: inset 0 0 14px rgba(46, 116, 164, 0.35), inset 0 1px 0 rgba(255,255,255,0.05);
}


.logs-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(180deg, #13202c, #0f1a24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), inset 0 -1px 0 rgba(0,0,0,0.35);
  width: 300px;
  display: flex;
  flex-direction: column;
}

.log-title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: #e7eaea;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 8px;
}

.legend {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #c8ced4;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.ok { background: var(--ok); }
.legend-dot.warn { background: var(--warn); }
.legend-dot.bad { background: var(--danger); }

.log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #25323f transparent; /* Firefox */
}

/* WebKit scrollbars (Chrome, Edge, Safari) */
.log-list::-webkit-scrollbar {
  width: 8px;
}

.log-list::-webkit-scrollbar-track {
  background: transparent;
}

.log-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--key-light), var(--key-top));
  border-radius: 8px;
  border: 1px solid #1b2a38;
}

.log-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #445463, #313f4c);
}

.log-item {
  border: 1px solid #1b2a38;
  border-radius: 8px;
  padding: 8px;
  background: linear-gradient(180deg, #101b26, #0c1722);
}

.log-cells {
  display: flex;
  gap: 8px;
}

.log-cell {
  width: 30px;
  height: 34px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #081218;
}

.log-cell.ok { background: var(--ok); }
.log-cell.warn { background: var(--warn); }
.log-cell.bad { background: var(--danger); }

.slots {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.slot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #1e2b38;
  background: var(--slot-off);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.06), inset 0 -1px 2px rgba(0,0,0,0.5);
  transition: all .18s ease;
}

.slot.filled {
  background: radial-gradient(80% 80% at 50% 50%, var(--slot-on) 0%, #45bff0 70%, #2b86b8 100%);
  border-color: #2b86b8;
  box-shadow: 0 0 10px rgba(52, 148, 199, 0.6);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.key {
  height: 58px;
  border-radius: 8px;
  border: 1px solid var(--key-edge);
  background: linear-gradient(180deg, #3a4a58, #2a3744);
  color: #e8f2ff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(8,15,22,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease, filter .2s ease;
}

.key:hover { filter: brightness(1.08); }

.key:active { transform: translateY(1px) scale(0.992); box-shadow: 0 4px 10px rgba(0,0,0,0.55); }

.key.alt { color: #c9ced3; }

.enter {
  width: 100%;
  height: 46px;
  margin-top: 14px;
  border-radius: 8px;
  border: 1px solid #1e2a38;
  color: #071218;
  background: linear-gradient(180deg, var(--accent-ice), var(--accent-ice-deep));
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: none;
}

.hud.success .status { color: var(--ok); }
.hud.error .status { color: var(--danger); }

.shake {
  animation: shake .5s ease;
}

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

@media (max-width: 400px) {
  .key { height: 54px; font-size: 18px; }
  .enter { height: 44px; }
  .app { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .app { width: 92vw; grid-template-columns: 1fr; }
  .logs-panel { width: auto; }
}
.uv-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.uv-digit {
  position: absolute;
  color: #0a1420;
  opacity: 0.02;
  font-weight: 800;
}

body.uv-on .uv-layer { opacity: 1; }
body.uv-on .uv-digit {
  color: #b892ff;
  opacity: 1;
  text-shadow: 0 0 14px rgba(184,146,255,0.95), 0 0 28px rgba(184,146,255,0.6);
}

body.uv-on .uv-layer {
  -webkit-mask-image: radial-gradient(circle var(--uv-radius) at var(--uv-x) var(--uv-y), #000 70%, rgba(0,0,0,0) 72%);
  mask-image: radial-gradient(circle var(--uv-radius) at var(--uv-x) var(--uv-y), #000 70%, rgba(0,0,0,0) 72%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.uv-cursor {
  position: fixed;
  width: var(--uv-diameter);
  height: var(--uv-diameter);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 50% 50%, rgba(184,146,255,0.35) 0%, rgba(184,146,255,0.18) 55%, rgba(184,146,255,0) 65%);
  box-shadow: 0 0 40px rgba(184,146,255,0.8), inset 0 0 60px rgba(184,146,255,0.95);
  display: none;
  z-index: 2;
}

body.uv-on { cursor: none; }
body.uv-on .uv-cursor { display: block; }
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.doc-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #122231, #0f1d2a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), inset 0 -1px 0 rgba(0,0,0,0.35);
  text-decoration: none;
}

.doc-thumb {
  height: 120px;
  background-size: cover;
  background-position: center;
}

.doc-name {
  padding: 10px;
  font-size: 13px;
  color: #e6f1ff;
}
