/* GoldenEye Me: dossier, watch and results screens. Inspired by 90s spy-game menus; original artwork only. */
:root {
  --ink: #2b2a24;
  --paper: #e9dfbf;
  --paper-dark: #d6c99f;
  --olive: #3b3d2b;
  --red: #c8231b;
  --gold: #e2b13c;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 40%, #5a5c43 0%, var(--olive) 55%, #1d1e15 100%);
  color: var(--ink);
  font-family: 'Special Elite', 'Courier New', monospace;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
.screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 16px; }

/* --- Folder --- */
.folder { position: relative; width: min(980px, 100%); }
.tabs { position: absolute; right: -34px; top: 70px; display: flex; flex-direction: column; gap: 8px; }
.tabs span {
  writing-mode: vertical-rl; padding: 18px 8px; font-size: 13px; letter-spacing: 0.2em;
  background: var(--paper-dark); border-radius: 0 10px 10px 0; box-shadow: 2px 2px 6px rgba(0,0,0,0.35);
}
.paper {
  position: relative; display: flex; gap: 40px; padding: 48px 56px; min-height: 560px;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.018) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at 30% 20%, #f3ead0, var(--paper) 50%, var(--paper-dark));
  border-radius: 4px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 0 60px rgba(120,100,50,0.25);
}
.sheet { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.sheet.wide { width: 100%; }
.small { margin: 0; font-size: 13px; letter-spacing: 0.15em; opacity: 0.7; }
h1 { margin: 0; font-size: 34px; letter-spacing: 0.08em; }
.headline { font-size: 27px; line-height: 1.15; }
.brief { margin: 0; font-size: 16px; line-height: 1.55; max-width: 52ch; }

/* START: a typed, inked button */
.actions { display: flex; align-items: center; gap: 20px; margin-top: 6px; }
.see {
  font: inherit; font-size: 18px; letter-spacing: 0.15em; cursor: pointer; color: var(--ink);
  background: none; border: 0; border-bottom: 2px dotted var(--ink); padding: 4px 2px;
}
.see:hover { color: var(--red); border-bottom-color: var(--red); }
.start { font: inherit; font-size: 24px; letter-spacing: 0.2em; cursor: pointer;
  color: var(--paper); background: var(--ink); border: 0; padding: 10px 26px; box-shadow: 3px 3px 0 var(--red);
}
.start:hover { background: var(--red); box-shadow: 3px 3px 0 var(--ink); }

/* + on the photo: centred while empty, in the corner once there's a photo */
.add {
  position: absolute; left: 50%; top: calc(50% - 11px); transform: translate(-50%, -50%); z-index: 3;
  width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--paper); cursor: pointer;
  font: inherit; font-size: 40px; line-height: 1; color: var(--paper); background: rgba(43,42,36,0.85);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.add:hover { background: var(--red); }
.photo.has .add { left: auto; top: auto; right: 2px; bottom: 6px; transform: none; width: 40px; height: 40px; font-size: 26px; }
.add-menu {
  position: absolute; left: 50%; top: calc(50% + 34px); transform: translateX(-50%); z-index: 4;
  display: flex; flex-direction: column; background: #fbfaf6; box-shadow: 3px 4px 12px rgba(0,0,0,0.4); min-width: 200px;
}
.photo.has .add-menu { top: auto; bottom: -70px; }
.add-menu button {
  font: inherit; font-size: 16px; letter-spacing: 0.12em; text-align: left; color: var(--ink);
  background: none; border: 0; padding: 12px 16px; cursor: pointer;
}
.add-menu button + button { border-top: 1px dashed rgba(43,42,36,0.3); }
.add-menu button:hover { background: var(--ink); color: var(--paper); }

/* paperclipped photo */
.photo {
  position: relative; flex: none; align-self: flex-start; padding: 12px 12px 34px; background: #fbfaf6;
  transform: rotate(-3deg); box-shadow: 4px 6px 14px rgba(0,0,0,0.35);
}
.photo canvas { display: block; width: 240px; height: 304px; background: #c9c3ad; }
.clip {
  position: absolute; top: -26px; left: 34px; width: 22px; height: 70px; z-index: 2;
  border: 3px solid #9ea3a8; border-radius: 12px; box-shadow: inset 0 0 0 4px transparent, 1px 1px 2px rgba(0,0,0,0.4);
}
.clip::after { content: ''; position: absolute; inset: 8px 4px 14px; border: 3px solid #9ea3a8; border-radius: 8px; }

/* typewritten fields and menu */
.agent { font-size: 22px; letter-spacing: 0.1em; display: flex; gap: 10px; align-items: baseline; }
.agent input {
  flex: 1; font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 2px dotted var(--ink);
  outline: none; text-transform: uppercase; letter-spacing: 0.1em;
}
.menu { list-style: none; margin: 6px 0 0; padding: 0; counter-reset: item; display: flex; flex-direction: column; gap: 14px; }
.menu li {
  counter-increment: item; position: relative; font-size: 22px; letter-spacing: 0.08em; padding: 4px 8px 4px 56px; cursor: pointer; width: fit-content;
}
.menu li::before { content: counter(item) '.'; position: absolute; left: 22px; }
.menu li:hover { background: rgba(43,42,36,0.12); }
.menu li:hover::after {   /* crosshair cursor */
  content: ''; position: absolute; left: -26px; top: 50%; width: 34px; height: 34px; transform: translate(0, -50%);
  background:
    linear-gradient(var(--red), var(--red)) center / 3px 100% no-repeat,
    linear-gradient(var(--red), var(--red)) center / 100% 3px no-repeat;
  border: 3px solid var(--red); border-radius: 50%;
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px);
}
.menu li.disabled { opacity: 0.35; pointer-events: none; }

/* rubber stamp */
#dossier .stamp { right: 36px; bottom: 30px; font-size: 34px; }
.stamp {
  position: absolute; right: 70px; bottom: 60px; transform: rotate(-14deg);
  font-size: 46px; letter-spacing: 0.15em; color: var(--red); opacity: 0.55;
  border: 5px solid var(--red); padding: 4px 18px; border-radius: 6px; pointer-events: none;
}
.stamp.approved { color: #1f7a3a; border-color: #1f7a3a; }

/* processing log */
.log { list-style: none; padding: 0; margin: 16px 0; font-size: 20px; line-height: 1.8; }
.log li::before { content: '> '; }
.log li.done::after { content: ' ... OK'; color: #1f7a3a; }
.log li.fail::after { content: ' ... FAILED'; color: var(--red); }

/* --- Results --- */
.results { flex-direction: column; }
.exhibits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.exhibits figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.exhibits canvas {
  width: 100%; aspect-ratio: 1; border-radius: 4px; touch-action: none;
  background: radial-gradient(#3a3a3c, #121214); box-shadow: 3px 4px 10px rgba(0,0,0,0.35);
}
.exhibits figcaption { font-size: 12px; letter-spacing: 0.12em; opacity: 0.75; }
.downloads { display: flex; flex-wrap: wrap; gap: 12px; }
.downloads a {
  color: var(--ink); text-decoration: none; font-size: 16px; letter-spacing: 0.1em;
  border: 2px solid var(--ink); padding: 6px 12px; cursor: pointer;
}
.downloads a:hover { background: var(--ink); color: var(--paper); }
.downloads a.off { opacity: 0.3; pointer-events: none; }

/* --- Watch --- */
.watch { position: relative; width: min(520px, 90vw); aspect-ratio: 1; }
.bezel {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, #d9dde2 0deg 1deg, transparent 1deg 6deg),
    radial-gradient(circle, #50555c 58%, #a9b0b8 62%, #5c6168 68%, #2a2d31 72%, #8d949b 76%, #3c4045 100%);
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 0 30px rgba(0,0,0,0.6);
}
.face { position: absolute; inset: 14%; border-radius: 50%; overflow: hidden; background: #000; box-shadow: inset 0 0 40px rgba(0,0,0,0.9); }
.face video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.face canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.crown {
  position: absolute; right: -28px; top: 50%; transform: translateY(-50%); width: 46px; height: 70px;
  border: 0; border-radius: 10px; cursor: pointer; font-size: 18px; color: var(--red);
  background: linear-gradient(90deg, #6d737a, #c9ced3 40%, #6d737a);
  box-shadow: 0 6px 14px rgba(0,0,0,0.5);
}
.crown:active { transform: translateY(-50%) translateX(-4px); }
.lcd {
  min-width: 320px; text-align: center; padding: 10px 18px; font-size: 18px; letter-spacing: 0.12em; color: #a8f0a0;
  background: #0d1a0d; border: 3px solid #2c3a2c; border-radius: 6px; box-shadow: inset 0 0 12px rgba(0,0,0,0.9);
  font-family: 'Courier New', monospace; text-transform: uppercase;
}
.back { font: inherit; background: none; border: 0; color: var(--paper); letter-spacing: 0.15em; cursor: pointer; font-size: 16px; }

@media (max-width: 760px) {
  .paper { flex-direction: column; padding: 32px 24px; gap: 24px; }
  .exhibits { grid-template-columns: 1fr; }
  .tabs { display: none; }
  .menu li { font-size: 21px; }
}

/* --- Gun-barrel camera --- */
.barrel-screen { position: fixed; inset: 0; padding: 0; background: #000; justify-content: flex-end; }
#barrel { position: absolute; inset: 0; width: 100%; height: 100%; }
.aperture { position: absolute; border-radius: 50%; overflow: hidden; background: #fff; }
.aperture video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.aperture canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.barrel-ui { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-bottom: 32px; }
.caption { color: #fff; font-size: 20px; letter-spacing: 0.25em; text-shadow: 0 2px 8px #000; text-align: center; }
.barrel-buttons { display: flex; gap: 20px; align-items: center; }
#capture {
  font: inherit; font-size: 18px; letter-spacing: 0.2em; color: #000; background: #fff; border: 0; padding: 10px 22px; cursor: pointer;
}
#capture span { font-size: 12px; opacity: 0.6; }
.wash { position: absolute; left: 0; right: 0; top: 0; height: 0; z-index: 1; pointer-events: none; }

/* example strip under the photo: photo -> in-game -> box */
.side { flex: none; display: flex; flex-direction: column; gap: 34px; align-self: flex-start; }
.side .photo { align-self: auto; }
.example {
  font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 8px; width: 264px;
}
.strip { display: flex; align-items: center; gap: 6px; }
.strip i { font-style: normal; opacity: 0.6; }
.strip figure { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.strip img { display: block; height: 64px; width: 64px; object-fit: cover; box-shadow: 2px 3px 6px rgba(0,0,0,0.35); background: #fff; }
.strip img.pixel { image-rendering: pixelated; filter: contrast(1.1); }
.strip img.wide { width: 88px; }
.strip figcaption { font-size: 10px; letter-spacing: 0.12em; opacity: 0.7; }
.example:hover img { outline: 2px solid var(--red); }
.example:hover .small { color: var(--red); opacity: 1; }

/* camera: step markers, success message and which-way-to-turn arrows */
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; font-size: 13px; letter-spacing: 0.18em; color: rgba(255,255,255,0.45); }
.steps li::before { content: '○ '; }
.steps li.now { color: #fff; }
.steps li.done { color: #7fd88a; }
.steps li.done::before { content: '✓ '; }
.caption.ok { color: #7fd88a; }
#capture:disabled { opacity: 0.4; cursor: default; }
.turn { position: absolute; top: 50%; z-index: 2; display: flex; gap: 6px; transform: translateY(-50%); pointer-events: none; }
.turn.right { right: 7%; }
.turn.left { left: 7%; flex-direction: row-reverse; }
.turn .arrow {
  width: 0; height: 0; border-top: 34px solid transparent; border-bottom: 34px solid transparent;
  border-left: 40px solid var(--gold); filter: drop-shadow(0 2px 6px #000); opacity: 0.2;
  animation: turn 1.2s infinite;
}
.turn.left .arrow { border-left: 0; border-right: 40px solid var(--gold); }
.turn .arrow:nth-child(2) { animation-delay: 0.2s; }
.turn .arrow:nth-child(3) { animation-delay: 0.4s; }
@keyframes turn { 0%, 100% { opacity: 0.2; } 30% { opacity: 1; } }

/* "printing" overlay on the cartridge and box while their art is generated */
.exhibits figure { position: relative; }
.printing {
  position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 1; border-radius: 4px; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(18, 18, 20, 0.6); color: var(--paper); font-size: 14px; letter-spacing: 0.18em; backdrop-filter: blur(2px);
}
.spinner {
  width: 46px; height: 46px; border-radius: 50%; border: 4px solid rgba(233,223,191,0.25); border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
.printing.failed .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
