@font-face {
  font-family: 'Press Start 2P';
  src: url('/fonts/pressstart2p/PressStart2P-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'VT323';
  src: url('/fonts/vt323/VT323-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #1a1235;
  --bg-2: #120a28;
  --panel: #6b4de6;
  --panel-2: #7b5cf0;
  --panel-dk: #3f2aa8;
  --ink: #f4ecd8;
  --ink-dim: #c9bfe4;
  --red: #e63946;
  --red-dk: #8a1420;
  --yellow: #ffd60a;
  --yellow-dk: #a88800;
  --green: #7bd87b;
  --green-dk: #2f7a2f;
  --shadow: #05010f;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'VT323', monospace;
  font-size: 22px;
  line-height: 1.25;
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

body {
  background: radial-gradient(circle at 15% 20%, rgba(107, 77, 230, .12), transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(230, 57, 70, .06), transparent 45%),
    var(--bg);
  min-height: 100vh;
}

/* scanline overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, .10) 2px 3px);
  mix-blend-mode: multiply;
}

h1,
h2,
h3,
h4,
.pixel {
  font-family: 'Press Start 2P', monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* chunky pixel panel */
.panel {
  position: relative;
  background: var(--panel);
  border: 4px solid #000;
  box-shadow: 10px 10px 0 #000;
  padding: 28px 32px;
}

.panel.dk {
  background: var(--bg-2);
}

.panel.flat {
  box-shadow: 6px 6px 0 #000;
}

/* winbar chrome */
.winbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-dk);
  border: 4px solid #000;
  border-bottom: 0;
  padding: 8px 12px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--ink);
}

.winbar .title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.winbar .title .dot {
  width: 10px;
  height: 10px;
  background: #000;
  display: inline-block;
}

.winbar .btns {
  display: flex;
  gap: 6px;
}

.winbar .btn {
  width: 18px;
  height: 18px;
  border: 3px solid #000;
  background: var(--ink);
  display: inline-block;
  image-rendering: pixelated;
}

.winbar .btn.min {
  background: var(--yellow);
}

.winbar .btn.max {
  background: var(--green);
}

.winbar .btn.cls {
  background: var(--red);
}

/* buttons */
.btn-pixel {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: #000;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  padding: 18px 26px;
  border: 4px solid #000;
  box-shadow: 6px 6px 0 #000;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .05s, box-shadow .05s;
}

.btn-pixel:hover {
  transform: translate(2px, 2px);
  box-shadow: 4px 4px 0 #000;
}

.btn-pixel.primary {
  background: var(--yellow);
}

.btn-pixel.ghost {
  background: var(--panel-dk);
  color: var(--ink);
}

/* form elements */
input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 14px;
  background: var(--bg-2);
  border: 4px solid #000;
  color: var(--ink);
  font-family: 'VT323', monospace;
  font-size: 22px;
  margin-bottom: 20px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--yellow);
}

label {
  display: block;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--yellow);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.helper {
  font-size: 18px;
  color: var(--ink-dim);
  margin-top: -15px;
  margin-bottom: 20px;
}

.required {
  color: var(--red);
}

/* nav (minimal version for subpages) */
.nav-mini {
  background: var(--bg-2);
  border-bottom: 4px solid #000;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand .logo {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
}

/* subpage layout */
.sub-wrap {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 28px;
}

.content-panel {
  padding: 40px;
}

.content-panel h1 {
  font-size: 28px;
  margin-bottom: 24px;
  text-shadow: 3px 3px 0 #000;
}

.content-panel p {
  margin-bottom: 20px;
}

.alert-panel {
  background: var(--bg-2);
  border: 4px solid #000;
  padding: 20px;
  margin-bottom: 30px;
}

/* message boxes */
.success,
.error,
.info-box {
  padding: 18px;
  border: 4px solid #000;
  margin-bottom: 24px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
}

.success {
  background: var(--green);
  color: #000;
}

.error {
  background: var(--red);
  color: var(--ink);
}

.info-box {
  background: var(--panel-dk);
  color: var(--ink);
  font-family: 'VT323', monospace;
  font-size: 20px;
}
