/* ============================================================
   ARCHIVES.css — Terminal Gallery Stylesheet v4.0
   ============================================================
   EASY EDIT ZONE — tweak these variables to restyle everything
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=VT323&display=swap');

:root {
  /* --- Core Palette --- */
  --bg:            #000000;
  --surface:       #050505;
  --surface-raised:#0a0a0a;
  --border:        #1a1a1a;
  --border-hover:  #555;
  --text-primary:  #cccccc;
  --text-dim:      #444444;
  --text-muted:    #2a2a2a;
  --text-accent:   #888888;
  --cursor-color:  #aaaaaa;

  /* --- Typography --- */
  --font-mono:     'Share Tech Mono', 'Courier New', monospace;
  --font-display:  'VT323', monospace;

  /* --- Sizing --- */
  --grid-gap:      40px;
  --grid-padding:  60px;
  --grid-max-w:    1200px;

  /* --- Animation timing --- */
  --img-reveal:    0.9s;
  --flicker-speed: 0.08s;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-x: hidden;
  cursor: crosshair;
  text-shadow: 0 0 6px rgba(180,180,180,0.08);
}

/* Global CRT vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(ellipse at center,
    transparent 60%,
    rgba(0,0,0,0.55) 100%
  );
}

/* ============================================================
   SCANLINES
   ============================================================ */
.scanlines {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.18) 2px,
      rgba(0,0,0,0.18) 4px
    );
  pointer-events: none;
  z-index: 10;
  animation: scanRoll 8s linear infinite;
}

@keyframes scanRoll {
  0%   { background-position: 0 0; }
  100% { background-position: 0 200px; }
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  text-align: center;
  padding-top: 50px;
  position: relative;
}

h1 {
  font-family: var(--font-display);
  font-size: 56px;
  letter-spacing: 20px;
  margin: 0 0 8px 20px;
  color: var(--text-primary);
  animation: titleGlitch 6s infinite;
  position: relative;
  display: inline-block;
}

#archive-title {
  cursor: crosshair;
  transition: text-shadow 0.3s ease, color 0.3s ease;
}

#archive-title:hover {
  text-shadow: 0 0 12px rgba(180,180,180,0.15), 0 0 30px rgba(180,180,180,0.06);
}

#archive-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #444, transparent);
  transform: translateX(-50%);
  transition: width 2.5s linear;
  opacity: 0;
}

#archive-title.hover-active::after {
  width: 100%;
  opacity: 1;
}

@keyframes titleGlitch {
  0%, 92%, 100%  { clip-path: none; transform: none; }
  93%  { clip-path: inset(30% 0 50% 0); transform: translateX(-4px); }
  94%  { clip-path: inset(60% 0 20% 0); transform: translateX(4px); }
  95%  { clip-path: none; transform: none; }
  96%  { clip-path: inset(10% 0 70% 0); transform: translateX(-2px); }
  97%  { clip-path: none; transform: none; }
}

.sub-header {
  font-family: var(--font-mono);
  color: var(--text-dim);
  letter-spacing: 6px;
  font-size: 10px;
  margin: 0 0 6px;
}

.system-status {
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.system-status span { animation: blink 1.2s step-end infinite; }

@keyframes blink { 50% { opacity: 0; } }

.header-rule {
  width: 160px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 18px auto 0;
}

/* ============================================================
   HIDDEN TERMINAL
   ============================================================ */
.hidden-terminal {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin: 0 auto;
  width: 340px;
  transition: max-height 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.4s ease 0.1s,
              margin-top 0.4s ease;
}

.hidden-terminal.revealed {
  max-height: 200px;
  opacity: 1;
  margin-top: 24px;
}

.hidden-terminal-inner {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 20px 22px;
  position: relative;
}

.hidden-terminal-inner::before,
.hidden-terminal-inner::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border-color: #333;
  border-style: solid;
}
.hidden-terminal-inner::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.hidden-terminal-inner::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.ht-label {
  font-size: 7px;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.ht-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 10px 12px;
  margin-bottom: 10px;
  position: relative;
}

.ht-input-wrap:focus-within {
  border-color: #333;
}

.ht-prompt {
  font-size: 13px;
  color: var(--text-dim);
  margin-right: 8px;
  flex-shrink: 0;
}

.ht-mask {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 5px;
  color: #555;
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

.ht-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: transparent;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 5px;
  caret-color: transparent;
  position: relative;
  z-index: 3;
}

.ht-input::placeholder {
  color: #1a1a1a;
  letter-spacing: 2px;
  font-size: 10px;
}

.ht-feedback {
  font-size: 7px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-align: center;
  min-height: 10px;
  transition: color 0.2s;
}

.ht-feedback.error {
  color: #4a2a2a;
  animation: shake 0.4s;
}

.ht-feedback.success {
  color: #2a4a2a;
}

/* ============================================================
   GLITCH REVEAL ANIMATION
   ============================================================ */
@keyframes glitchReveal {
  0%   { clip-path: inset(0 0 100% 0);   transform: translateX(0); opacity: 0; }
  10%  { clip-path: inset(40% 0 30% 0);  transform: translateX(-6px); opacity: 1; }
  15%  { clip-path: inset(70% 0 10% 0);  transform: translateX(8px); }
  20%  { clip-path: inset(20% 0 60% 0);  transform: translateX(-4px); }
  30%  { clip-path: inset(0 0 50% 0);    transform: translateX(3px); }
  40%  { clip-path: inset(50% 0 0 0);    transform: translateX(-2px); }
  50%  { clip-path: inset(10% 0 10% 0);  transform: translateX(1px); }
  70%  { clip-path: inset(5% 0 5% 0);    transform: translateX(0); }
  100% { clip-path: inset(0 0 0 0);      transform: translateX(0); opacity: 1; }
}

.glitch-in {
  animation: glitchReveal 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes titleTear {
  0%   { clip-path: none; transform: none; filter: none; }
  10%  { clip-path: inset(0 0 50% 0); transform: translateX(-8px) skewX(-2deg); filter: hue-rotate(90deg); }
  20%  { clip-path: inset(50% 0 0 0); transform: translateX(8px) skewX(2deg); filter: hue-rotate(-60deg); }
  30%  { clip-path: inset(20% 0 30% 0); transform: translateX(-4px); filter: brightness(2); }
  40%  { clip-path: inset(60% 0 10% 0); transform: translateX(6px); filter: invert(1); }
  50%  { clip-path: none; transform: translateX(-2px); filter: none; }
  60%  { clip-path: inset(40% 0 40% 0); transform: translateX(3px); filter: contrast(3); }
  70%  { clip-path: none; transform: none; filter: brightness(0.5); }
  85%  { filter: none; }
  100% { clip-path: none; transform: none; filter: none; }
}

#archive-title.tearing {
  animation: titleTear 0.5s ease-out forwards !important;
}

/* ============================================================
   LOG SECTIONS — MODULAR (shared base + locked/unlocked states)
   ============================================================ */
#log-sections-container {
  max-width: 800px;
  margin: 40px auto 0;
  padding: 0 var(--grid-padding);
}

.log-section {
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(10px);
  animation: sectionFadeIn 0.6s ease forwards;
}

.log-section:nth-child(1) { animation-delay: 0s; }
.log-section:nth-child(2) { animation-delay: 0.15s; }
.log-section:nth-child(3) { animation-delay: 0.3s; }
.log-section:nth-child(4) { animation-delay: 0.45s; }
.log-section:nth-child(5) { animation-delay: 0.6s; }

@keyframes sectionFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Section Header (shared by locked + unlocked) --- */
.log-section-header {
  text-align: center;
  margin-bottom: 20px;
}

.forbidden-glitch-line {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    #2a1a1a 20%,
    #4a2a2a 50%,
    #2a1a1a 80%,
    transparent 100%
  );
  margin: 12px auto;
  width: 200px;
  animation: glitchLineFlicker 3s infinite;
}

@keyframes glitchLineFlicker {
  0%, 90%, 100% { opacity: 0.6; }
  92% { opacity: 0.1; transform: scaleX(0.8); }
  94% { opacity: 1; transform: scaleX(1.1); }
  96% { opacity: 0.3; }
}

.forbidden-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 8px;
  color: #3a2020;
  margin: 8px 0;
  animation: forbiddenPulse 4s ease-in-out infinite;
}

@keyframes forbiddenPulse {
  0%, 100% { color: #3a2020; text-shadow: none; }
  50% { color: #5a2a2a; text-shadow: 0 0 10px rgba(90,42,42,0.3); }
}

.forbidden-sub {
  font-size: 8px;
  letter-spacing: 3px;
  color: #2a1a1a;
}

/* --- Unlocked: Log Entries --- */
.forbidden-logs {
  border: 1px solid #1a1010;
  background: #020101;
  padding: 16px 20px;
  position: relative;
}

.forbidden-logs::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 10px; height: 10px;
  border-top: 1px solid #3a2020;
  border-left: 1px solid #3a2020;
  pointer-events: none;
}

.forbidden-logs::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 10px; height: 10px;
  border-bottom: 1px solid #3a2020;
  border-right: 1px solid #3a2020;
  pointer-events: none;
}

.log-entry {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #0a0505;
  font-size: 10px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.log-entry.visible {
  opacity: 1;
  transform: translateY(0);
}

.log-ts {
  color: #2a2020;
  letter-spacing: 1px;
  flex-shrink: 0;
  font-size: 9px;
}

.log-tag {
  color: #4a2a2a;
  letter-spacing: 2px;
  font-weight: bold;
  flex-shrink: 0;
  font-size: 8px;
  min-width: 70px;
}

.log-entry:nth-child(odd) .log-tag { color: #3a2525; }

.log-msg {
  color: #3a2a2a;
  letter-spacing: 1px;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-entry:last-child .log-msg {
  color: #5a3030;
  font-style: italic;
}

/* --- Locked State --- */
.log-locked-state {
  border: 1px solid #1a1010;
  background: #020101;
  padding: 30px 20px;
  text-align: center;
  position: relative;
}

.log-locked-state::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 10px; height: 10px;
  border-top: 1px solid #2a1515;
  border-left: 1px solid #2a1515;
  pointer-events: none;
}

.log-locked-state::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 10px; height: 10px;
  border-bottom: 1px solid #2a1515;
  border-right: 1px solid #2a1515;
  pointer-events: none;
}

.log-locked-icon {
  margin-bottom: 16px;
}

.lock-glyph {
  font-size: 28px;
  color: #2a1a1a;
  animation: lockGlyphPulse 3s ease-in-out infinite;
  display: inline-block;
}

@keyframes lockGlyphPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.log-locked-label {
  font-size: 9px;
  letter-spacing: 3px;
  color: #3a2020;
  margin-bottom: 6px;
}

.log-locked-meta {
  font-size: 7px;
  letter-spacing: 2px;
  color: #1a1212;
  margin-bottom: 20px;
}

.log-unlock-btn {
  background: none;
  border: 1px solid #1a1010;
  color: #2a1a1a;
  padding: 9px 24px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 4px;
  cursor: crosshair;
  transition: all 0.2s ease;
  position: relative;
}

.log-unlock-btn:hover {
  border-color: #3a2020;
  color: #5a3030;
  background: #0a0505;
  box-shadow: 0 0 15px rgba(90,48,48,0.08);
}

.log-unlock-btn:active {
  transform: scale(0.98);
}

/* --- Access Denied flash --- */
.log-section.access-denied {
  animation: accessDeniedFlash 0.4s ease;
}

@keyframes accessDeniedFlash {
  0%, 100% { border-color: transparent; }
  25% { border-color: #4a1a1a; }
  50% { border-color: #2a0a0a; }
  75% { border-color: #4a1a1a; }
}

.log-section.access-denied .log-locked-state {
  border-color: #3a1515;
}

/* --- Unlocking transition --- */
.log-section.unlocking {
  animation: unlockingPulse 0.4s ease;
}

@keyframes unlockingPulse {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 0; }
}

/* --- Just unlocked glow --- */
.log-section.just-unlocked .forbidden-logs {
  animation: unlockGlow 2s ease-out;
}

@keyframes unlockGlow {
  0% { box-shadow: 0 0 20px rgba(90,48,48,0.2), inset 0 0 20px rgba(90,48,48,0.1); }
  100% { box-shadow: none; }
}

/* ============================================================
   ARCHIVE GRID
   ============================================================ */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--grid-gap);
  padding: var(--grid-padding);
  max-width: var(--grid-max-w);
  margin: 0 auto;
  align-items: start;
}

/* ============================================================
   ARCHIVE ITEM CARD
   ============================================================ */
.archive-item {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 10px;
  cursor: crosshair;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.archive-item::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 16px; height: 16px;
  border-top: 1px solid var(--text-dim);
  border-left: 1px solid var(--text-dim);
  pointer-events: none;
  transition: width 0.2s, height 0.2s;
}

.archive-item::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 16px; height: 16px;
  border-bottom: 1px solid var(--text-dim);
  border-right: 1px solid var(--text-dim);
  pointer-events: none;
  transition: width 0.2s, height 0.2s;
}

.archive-item:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 20px rgba(200,200,200,0.04);
}

.archive-item:hover::before,
.archive-item:hover::after {
  width: 28px; height: 28px;
}

/* ============================================================
   IMAGE WRAPPER
   ============================================================ */
.image-wrapper {
  position: relative;
  overflow: hidden;
  background: var(--surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.archive-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: brightness(0.04) grayscale(100%) blur(30px);
  transition: filter var(--img-reveal) steps(6);
}

.archive-img.unlocked {
  filter: brightness(0.92) grayscale(15%) contrast(1.05);
}

.lock-overlay {
  position: absolute;
  color: var(--text-muted);
  font-size: 9px;
  letter-spacing: 3px;
  text-align: center;
  font-weight: bold;
  pointer-events: none;
  z-index: 2;
  animation: lockPulse 2.5s ease-in-out infinite;
}

@keyframes lockPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.9; }
}

/* ============================================================
   ITEM LABEL / METADATA STRIP
   ============================================================ */
.item-label {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-dim);
  padding: 0 2px;
}

.item-label .item-status {
  color: var(--text-muted);
  font-size: 8px;
  letter-spacing: 1px;
}

.item-label .item-status.decrypted {
  color: #555;
}

/* ============================================================
   FOOTER / RETURN BUTTON
   ============================================================ */
.terminate-container {
  text-align: center;
  margin: 60px 0;
  padding-bottom: 50px;
}

.footer-meta {
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.terminate-btn {
  background: none;
  border: 1px solid #2a2a2a;
  color: #3a3a3a;
  padding: 10px 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 4px;
  cursor: crosshair;
  transition: all 0.2s ease;
  position: relative;
}

.terminate-btn::before,
.terminate-btn::after {
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  border-color: var(--text-dim);
  border-style: solid;
  transition: all 0.2s;
}

.terminate-btn::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.terminate-btn::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.terminate-btn:hover {
  background: #0a0a0a;
  color: #888;
  border-color: #444;
  box-shadow: 0 0 12px rgba(255,255,255,0.03);
}

/* ============================================================
   CLEARANCE / LOGIN OVERLAY
   ============================================================ */
#clearance-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.clearance-inner {
  width: 340px;
  border: 1px solid var(--border);
  padding: 36px 32px;
  background: var(--surface);
  position: relative;
}

.clearance-inner::before,
.clearance-inner::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-color: #333;
  border-style: solid;
}
.clearance-inner::before { top: -1px; left: -1px;   border-width: 1px 0 0 1px; }
.clearance-inner::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.clearance-logo {
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: 10px;
  color: var(--text-accent);
  text-align: center;
  margin-bottom: 4px;
}

.clearance-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 14px 0 22px;
}

.clearance-label {
  font-size: 8px;
  letter-spacing: 3px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.clearance-prompt {
  font-size: 10px;
  letter-spacing: 2px;
  color: #333;
  min-height: 16px;
  margin-bottom: 12px;
}

.clearance-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 10px 12px;
  margin-bottom: 14px;
  position: relative;
}

.clearance-input-wrap:focus-within {
  border-color: #333;
}

.clearance-prompt-char {
  font-size: 13px;
  color: var(--text-dim);
  margin-right: 6px;
  flex-shrink: 0;
}

#clearanceInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 4px;
  caret-color: var(--cursor-color);
}

#clearanceInput::placeholder {
  color: #222;
  letter-spacing: 2px;
  font-size: 11px;
}

.clearance-cursor {
  width: 7px;
  height: 13px;
  background: var(--cursor-color);
  opacity: 0;
  flex-shrink: 0;
  animation: blink 1s step-end infinite;
}

.clearance-input-wrap:focus-within .clearance-cursor { opacity: 1; }

#verifyBtn {
  width: 100%;
  background: none;
  border: 1px solid #222;
  color: #3a3a3a;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 5px;
  cursor: crosshair;
  transition: all 0.15s;
  margin-bottom: 18px;
}

#verifyBtn:hover {
  border-color: #444;
  color: #888;
  background: #0a0a0a;
}

#verifyBtn:active { transform: scale(0.99); }

.clearance-feedback {
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-align: center;
  min-height: 12px;
  transition: color 0.2s;
}

.clearance-feedback.error { color: #4a2a2a; animation: shake 0.4s; }
.clearance-feedback.working { color: #3a3a3a; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

.clearance-bar {
  height: 1px;
  background: var(--border);
  margin-top: 14px;
  overflow: hidden;
}

.clearance-bar-fill {
  height: 100%;
  background: #444;
  width: 0%;
  transition: width 0.4s ease;
}

.clearance-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 7px;
  letter-spacing: 2px;
  color: var(--text-muted);
}

/* ============================================================
   BOOT / LOADING OVERLAY
   ============================================================ */
#overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
  cursor: crosshair;
}

.boot-log {
  width: 320px;
  margin-bottom: 30px;
}

.boot-line {
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 2px;
  line-height: 1.9;
  opacity: 0;
  transition: opacity 0.3s;
}

.boot-line.visible { opacity: 1; }

.boot-prompt {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 8px;
  color: var(--text-accent);
  margin-bottom: 6px;
  animation: flicker var(--flicker-speed) infinite;
}

@keyframes flicker {
  0%   { opacity: 1; }
  49%  { opacity: 1; }
  50%  { opacity: 0.82; }
  100% { opacity: 0.95; }
}

.boot-sub {
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 4px;
  margin-bottom: 28px;
}

.load-bar-container {
  width: 220px;
  height: 1px;
  background: #111;
  display: none;
  position: relative;
}

.load-bar-fill {
  height: 100%;
  background: #666;
  width: 0%;
  transition: width 0.05s linear;
}

.load-bar-label {
  font-size: 7px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-align: right;
  margin-top: 6px;
}

/* ============================================================
   INSPECTION MODAL
   ============================================================ */
#inspection-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.97);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.inspection-container {
  width: 90%;
  max-width: 860px;
  background: var(--surface);
  border: 1px solid #1e1e1e;
  padding: 0;
  box-shadow: 0 0 60px rgba(0,0,0,1);
  position: relative;
}

.inspection-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  background: var(--bg);
}

.inspection-titlebar-left {
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--text-dim);
}

.inspection-close {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-muted);
  cursor: crosshair;
  transition: color 0.15s;
}

.inspection-close:hover { color: var(--text-accent); }

.inspection-viewport {
  position: relative;
  line-height: 0;
  background: #000;
}

#inspected-image {
  width: 100%;
  display: block;
  filter: contrast(1.08) brightness(0.88) sepia(0.12) grayscale(80%);
  position: relative;
  z-index: 1;
}

.inspection-statusbar {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 2px;
  background: var(--bg);
}

/* ============================================================
   LOCKOUT SCREEN
   ============================================================ */
#lockout {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.lockout-code {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 6px;
  color: #2a2a2a;
  margin-bottom: 16px;
  animation: flicker var(--flicker-speed) infinite;
}

.lockout-sub {
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--text-muted);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1a1a1a; }
::-webkit-scrollbar-thumb:hover { background: #2a2a2a; }
