@font-face{
  font-family:"Px437VGA";
  src:
    url("../fonts/Px437_IBM_VGA_8x16.woff2") format("woff2"),
    url("../fonts/Px437_IBM_VGA_8x16.woff") format("woff"),
    url("../fonts/Px437_IBM_VGA_8x16.ttf") format("truetype");
  font-weight:normal;
  font-style:normal;
  font-display:swap;
}

@keyframes noiseMove{
  0%{transform:translate(0,0)}
  25%{transform:translate(-1px,1px)}
  50%{transform:translate(1px,-1px)}
  75%{transform:translate(-1px,-1px)}
  100%{transform:translate(0,0)}
}

.crt-noise{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:10001;
  opacity:0.06;
  mix-blend-mode: overlay;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  animation: noiseMove 0.5s infinite;
}

/* FOMA BIOS CARD — CRT-inspired styling */

:root{
  --bg:#000000;
  --text:#e7e7e7;
  --muted:#a9a9a9;
  --lime:#22ff57;
  --yellow:#ffe24a;
  --panel:#050505;
  --border:#3a3a3a;
}

*{box-sizing:border-box}

html,body{height:100%}
body{
  -webkit-font-smoothing: none;
  font-smooth: never;
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: "Px437VGA", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* --- CRT wrapper --- */
.crt{
  min-height:100%;
  display:flex;
  align-items:stretch;
  justify-content:center;
  position:relative;
  overflow:hidden;
}

/* vignette + slight curvature feel */
.crt::before{
  content:"";
  position:fixed;
  inset:-20px;
  background:
    radial-gradient(1200px 800px at 35% 25%, rgba(255,255,255,0.06), rgba(0,0,0,0) 55%),
    radial-gradient(900px 650px at 70% 70%, rgba(255,255,255,0.04), rgba(0,0,0,0) 60%),
    radial-gradient(1200px 900px at 50% 50%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.65) 100%);
  pointer-events:none;
}

/* scanlines */
.crt::after{
  content:"";
  position:fixed;
  inset:0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.030),
    rgba(255,255,255,0.030) 1px,
    rgba(0,0,0,0) 3px,
    rgba(0,0,0,0) 6px
  );
  pointer-events:none;
  opacity:.25;
  mix-blend-mode: soft-light;
}

/* --- BIOS layout --- */
.bios-frame{
  width:min(1440px, 100%);
  height:100%;
  padding:48px 56px;
  display:grid;
  grid-template-columns: 1fr 420px;
  gap:44px;
  align-items:start;
}

@media (max-width: 900px){
  .bios-frame{
    grid-template-columns: 1fr;
    padding:26px 22px;
    gap:26px;
  }
  .bios-logo{order:-1; display:flex; justify-content:center}
}

.bios-text pre{
  margin:0;
  font-size:28px;
  line-height:1.65;
  white-space:pre-wrap;
  /* CRT glow */
  text-shadow:
    0 0 10px rgba(255,255,255,0.08),
    0 0 22px rgba(255,255,255,0.06);
}

.bios-footer{
  margin-top:22px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,0.10);
  font-size:28px;
  color: var(--muted);
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  justify-content:space-between;
}
.bios-footer b{color:var(--text)}
.bios-footer .code{opacity:.9}

.bios-logo img{
  width:120%;
  max-width:360px;
  height:auto;
  display:block;
  /* logo glow */
  filter: drop-shadow(0 0 16px rgba(255,226,74,0.20))
          drop-shadow(0 0 36px rgba(34,255,87,0.08));
}

/* mobile button */
.mobile-btn{
  display:none;
  margin-top:18px;
  width:100%;
  padding:12px 14px;
  border:5px solid rgba(34,255,87,0.45);
  background: rgba(34,255,87,0.06);
  color: var(--lime);
  font: inherit;
  cursor:pointer;
}
@media (max-width: 900px){
  .mobile-btn{display:block}
}

/* --- Cursor blink --- */
.cursor{
  display:inline-block;
  width:10px;
  color: var(--text);
  animation: blink 1.5s steps(1,end) infinite;
}
@keyframes blink{
  0%,49%{opacity:1}
  50%,100%{opacity:0}
}

/* --- Boot flicker --- */
.boot{
  animation: boot 820ms ease-out;
}
@keyframes boot{
  0%{opacity:0; filter:brightness(0.6) contrast(1.1)}
  12%{opacity:1}
  20%{opacity:.55}
  32%{opacity:1}
  48%{opacity:.78}
  66%{opacity:1; filter:brightness(1) contrast(1)}
  100%{opacity:1; filter:brightness(1) contrast(1)}
}

/* --- Overlay window --- */
.overlay{
  display:none;
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.82);
  align-items:center;
  justify-content:center;
  padding:18px;
}
.overlay.active{display:flex}

.window{
  width:min(560px, 100%);
  background: rgba(5,5,5,0.92);
  border:2px solid rgba(255,226,74,0.85);
  box-shadow: 0 30px 90px rgba(0,0,0,0.75);
}

.window-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  background: rgba(255,226,74,0.95);
  color:#000;
  font-weight:700;
  letter-spacing:.08em;
}
.window-head button{
  border:1px solid rgba(0,0,0,0.25);
  background:#000;
  color: rgba(255,226,74,0.95);
  cursor:pointer;
  width:34px;height:30px;
}

form{padding:16px 14px 18px}
label{
  display:block;
  margin:12px 0;
  font-size:28px;
  color: var(--text);
}
input,textarea{
  width:100%;
  margin-top:6px;
  padding:10px 10px;
  background: rgba(0,0,0,0.65);
  border:5px solid rgba(255,255,255,0.16);
  color: var(--text);
  font: inherit;
  outline:none;
}
textarea{height:130px; resize:vertical}
input:focus,textarea:focus{
  border-color: rgba(255,226,74,0.55);
  box-shadow: 0 0 0 3px rgba(255,226,74,0.12);
}

.actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:14px;
}
.btn{
  padding:10px 14px;
  border:5px solid rgba(255,226,74,0.55);
  background: rgba(255,226,74,0.12);
  color: rgba(255,226,74,0.98);
  font: inherit;
  cursor:pointer;
}
.btn.ghost{
  border-color: rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.hint{
  margin:10px 0 0;
  color: var(--muted);
  font-size:12px;
}
.hint b{color:var(--text)}

.hp{position:absolute; left:-9999px; top:-9999px}

/* Force Px437 on key UI */
.bios, pre, input, textarea, button{font-family:"Px437VGA", monospace;}
