/* ============================================================
   ONRYO OS 95 - login screen
   ============================================================ */

@font-face {
  font-family: "W95FA";
  src: url("W95FA.otf") format("opentype");
  font-display: swap;
}

:root {
  --face: #c0c0c0;
  --face-light: #dfdfdf;
  --white: #fff;
  --shadow: #808080;
  --font: "W95FA", "MS Sans Serif", Tahoma, Verdana, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: #008080;
  font-family: var(--font);
  font-size: 12px;
  overflow: hidden;
  -webkit-font-smoothing: none;
}

#stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dlg {
  width: 420px;
  max-width: 100%;
  background: var(--face);
  border: 1px solid;
  border-color: var(--face-light) #000 #000 var(--face-light);
  box-shadow: inset 1px 1px 0 var(--white), inset -1px -1px 0 var(--shadow), 4px 4px 0 rgba(0,0,0,.35);
  padding: 2px;
  animation: pop .45s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }

.dlg .bar {
  height: 20px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
  padding: 0 3px;
  gap: 5px;
}
.dlg .bar .grow { flex: 1 1 auto; }
.dlg .bar button {
  width: 16px; height: 14px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--white) #000 #000 var(--white);
  box-shadow: inset 1px 1px 0 var(--face-light), inset -1px -1px 0 var(--shadow);
  font-family: var(--font); font-size: 10px; line-height: 1;
  cursor: default; padding: 0;
}

.dlg .inner { padding: 14px 14px 12px; display: flex; gap: 14px; }
.dlg .art { flex: 0 0 56px; }
.dlg .art svg { width: 56px; height: 56px; display: block; }
.dlg .form { flex: 1 1 auto; }
.dlg p { margin: 0 0 12px; line-height: 1.45; }

.row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.row label { flex: 0 0 78px; text-align: right; }
.row input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font);
  font-size: 12px;
  padding: 3px 4px;
  background: #fff;
  border: 1px solid;
  border-color: var(--shadow) var(--white) var(--white) var(--shadow);
  box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 var(--face-light);
  outline: none;
}

.btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.btns button {
  min-width: 84px;
  padding: 4px 10px 5px;
  font-family: var(--font);
  font-size: 12px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--face-light) #000 #000 var(--face-light);
  box-shadow: inset 1px 1px 0 var(--white), inset -1px -1px 0 var(--shadow);
  cursor: default;
}
.btns button:active {
  border-color: #000 var(--white) var(--white) #000;
  box-shadow: inset 1px 1px 0 var(--shadow);
  padding: 5px 9px 4px 11px;
}
.btns button:focus { outline: 1px dotted #000; outline-offset: -4px; }

.hint {
  margin-top: 10px;
  font-size: 11px;
  color: #404040;
  border-top: 1px solid var(--shadow);
  padding-top: 8px;
}

/* loading state */
#loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  background: #008080;
  color: #fff;
  text-align: center;
  z-index: 5;
}
#loading.on { display: flex; }
#loading .logo { font-size: 30px; letter-spacing: 10px; text-shadow: 2px 2px 0 rgba(0,0,0,.5); }
#loading .msg { font-size: 12px; }
.bar-outer {
  width: 260px; height: 18px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--shadow) var(--white) var(--white) var(--shadow);
  box-shadow: inset 1px 1px 0 #000;
  padding: 2px;
}
.bar-inner { height: 100%; width: 0; background: #000080; transition: width .25s linear; }

/* corner mark */
#mark {
  position: absolute;
  right: 14px; bottom: 10px;
  color: #fff;
  letter-spacing: 4px;
  font-size: 13px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.8);
  z-index: 6;
}
#skip {
  position: absolute;
  left: 14px; bottom: 10px;
  color: #cfe8e8;
  font-size: 11px;
  z-index: 6;
  text-decoration: none;
}
#skip:hover { color: #fff; text-decoration: underline; }

/* CRT */
#crt { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
#crt::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(18,16,16,0) 50%, rgba(0,0,0,.22) 50%),
    linear-gradient(90deg, rgba(255,0,0,.05), rgba(0,255,0,.02), rgba(0,0,255,.05));
  background-size: 100% 3px, 3px 100%;
  opacity: .75;
}
#crt::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(18,16,16,.08);
  animation: flicker .15s infinite;
}
#crt .vig { position: absolute; inset: 0; box-shadow: inset 0 0 120px rgba(0,0,0,.5); }
@keyframes flicker {
  0%{opacity:.28} 15%{opacity:.9} 25%{opacity:.34} 40%{opacity:.26}
  55%{opacity:.86} 70%{opacity:.53} 85%{opacity:.7} 100%{opacity:.24}
}
@media (prefers-reduced-motion: reduce) {
  #crt::after { animation: none; opacity: .3; }
  .dlg { animation: none; }
}

@media (max-width: 480px) {
  .dlg .inner { flex-direction: column; gap: 10px; }
  .dlg .art { align-self: center; }
  .row label { flex: 0 0 66px; }
}
