/* Work Links Arcade styles */
/* Layout: one CRT screen; HUD on top, title, search + controls, then each category as a "level" of cartridge cards. Single dark look by choice. */
:root {
  color-scheme: dark;
  --bg: #0b0620;
  --bg-deep: #070414;
  --panel: #140c33;
  --ink: #ece9ff;
  --dim: #8a84b8;
  --line: #3a2a78;
  --cyan: #29f0ff;
  --pink: #ff3ea5;
  --yellow: #ffe14d;
  --green: #4dff7c;
  --orange: #ff9a3c;
  --violet: #8b4dff;
  --font-display: "Press Start 2P", "Courier New", ui-monospace, monospace;
  --font-body: "VT323", "Courier New", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 50% -10%, #2a1260 0%, transparent 55%),
    radial-gradient(ellipse at 50% 115%, #3b0a4a 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.2;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 28px 48px;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.035) 0 1px, transparent 1px 3px);
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 49;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.6) 100%);
}
.wrap { max-width: 1100px; margin-inline: auto; position: relative; z-index: 1; }

button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* HUD */
.hud {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 48px;
  font-family: var(--font-display); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 26px;
}
.hud b { color: var(--yellow); font-weight: 400; }

h1 {
  margin: 0; text-align: center; text-transform: uppercase; text-wrap: balance;
  font-family: var(--font-display); font-weight: 400; line-height: 1.15;
  font-size: clamp(26px, 6.5vw, 58px);
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 #6b1fb3, 0 0 24px rgba(255,225,77,.4);
}
.sub {
  margin: 16px 0 0; text-align: center; text-transform: uppercase; letter-spacing: .25em;
  color: var(--cyan); text-shadow: 0 0 8px var(--cyan); font-size: 22px;
}
.start {
  margin: 18px 0 26px; text-align: center; font-family: var(--font-display); font-size: 12px;
  letter-spacing: .15em; text-transform: uppercase;
}

/* Controls */
.controls {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: stretch; justify-content: center;
  margin-bottom: 34px;
}
.search {
  flex: 1 1 320px; min-width: 0; width: 100%; max-width: 520px; display: flex; align-items: center; gap: 10px;
  border: 3px solid var(--cyan); background: var(--bg-deep); padding: 6px 12px;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px #6b1fb3, 0 0 18px rgba(41,240,255,.3);
}
.search label { font-family: var(--font-display); font-size: 10px; color: var(--cyan); white-space: nowrap; }
.search input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
  color: var(--yellow); font-size: 26px; text-transform: uppercase; caret-color: var(--pink);
}
.search input::placeholder { color: #4a4478; }



/* Levels */
.levels { display: grid; gap: 38px; }
.level-head {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px;
  font-family: var(--font-display); font-weight: 400; font-size: 13px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--lvl); text-shadow: 0 0 10px var(--lvl);
}
.level-head .lv { background: var(--lvl); color: var(--bg); text-shadow: none; padding: 5px 7px; font-size: 10px; }
.level-head .ttl { min-width: 0; overflow-wrap: anywhere; }
.level-head::after {
  content: ""; flex: 1; height: 4px; min-width: 20px; opacity: .6;
  background: repeating-linear-gradient(90deg, var(--lvl) 0 8px, transparent 8px 14px);
}
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 158px), 1fr)); }

.card {
  position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--panel); border: 3px solid var(--lvl);
  box-shadow: 5px 5px 0 #000;
  transition: transform .08s steps(2), box-shadow .08s steps(2);
  cursor: pointer;
}
.card:hover, .card:focus-visible {
  outline: none; transform: translate(-2px,-2px);
  box-shadow: 7px 7px 0 #000, 0 0 22px var(--lvl);
}
.card:active { transform: translate(3px,3px); box-shadow: 2px 2px 0 #000; }
.pic {
  aspect-ratio: 4 / 3; max-width: 100%; display: grid; place-items: center; overflow: hidden;
  background:
    linear-gradient(45deg, rgba(255,255,255,.03) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.03) 75%) 0 0 / 16px 16px,
    linear-gradient(45deg, rgba(255,255,255,.03) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.03) 75%) 8px 8px / 16px 16px,
    var(--bg-deep);
  border-bottom: 3px solid var(--lvl);
}
.pic img { image-rendering: pixelated; width: 58%; height: auto; filter: drop-shadow(3px 3px 0 rgba(0,0,0,.6)); }
.pic img.photo { image-rendering: auto; width: 100%; height: 100%; object-fit: cover; filter: none; }
.label { padding: 10px 12px 12px; display: grid; gap: 2px; min-width: 0; }
.name { font-family: var(--font-display); font-size: 11px; line-height: 1.4; text-transform: uppercase; overflow-wrap: anywhere; }
.host { color: var(--dim); font-size: 18px; overflow-wrap: anywhere; }
.card:hover .name, .card:focus-visible .name { color: var(--lvl); }
.cursor {
  position: absolute; left: -24px; top: 34%; font-family: var(--font-display); font-size: 14px;
  color: var(--yellow); text-shadow: 0 0 8px var(--yellow); opacity: 0;
}
.card:hover .cursor, .card:focus-visible .cursor { opacity: 1; }

.empty, .note {
  text-align: center; padding: 40px 12px; border: 3px dashed var(--line); color: var(--dim);
  text-transform: uppercase; letter-spacing: .08em;
}
.empty strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 13px; color: var(--pink); margin-bottom: 12px; text-shadow: 0 0 10px var(--pink); }
.gameover { text-align: center; padding: 30px 0; font-family: var(--font-display); font-size: 13px; color: var(--pink); text-shadow: 0 0 10px var(--pink); }

.foot { margin-top: 44px; text-align: center; color: var(--dim); text-transform: uppercase; letter-spacing: .15em; font-size: 18px; }
.foot b { color: var(--pink); font-weight: 400; }

@media (prefers-reduced-motion: no-preference) {
  .blink { animation: blink 1.1s steps(1) infinite; }
  .card:hover .cursor { animation: blink .6s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
  h1 { animation: flicker 7s infinite; }
  @keyframes flicker { 0%, 96%, 100% { opacity: 1; } 97% { opacity: .75; } 98% { opacity: 1; } 99% { opacity: .85; } }
}

/* Cards that copy a path instead of opening a link */
button.card { font: inherit; text-align: left; padding: 0; width: 100%; }
