/* backstage.html — Videostore Back Door theme
   Extracted from inline <style> (FC-3 CSP fix: style-src 'unsafe-inline' removed) */

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

body {
  background: #0a0a0a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier Prime', 'Courier New', monospace;
  overflow: hidden;
  position: relative;
}

/* Brick wall background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-color: #1a0f08;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(0,0,0,0.5) 28px,
      rgba(0,0,0,0.5) 32px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 58px,
      rgba(0,0,0,0.4) 58px,
      rgba(0,0,0,0.4) 62px
    );
  background-size: 62px 32px;
  opacity: 0.9;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 58px,
      rgba(0,0,0,0.4) 58px,
      rgba(0,0,0,0.4) 62px
    );
  background-size: 62px 64px;
  background-position: 31px 32px;
  opacity: 0.6;
  z-index: 0;
}

/* Scanlines overlay */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.15) 3px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
  z-index: 10;
}

/* Vignette */
.vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.85) 100%);
  pointer-events: none;
  z-index: 9;
}

/* Flickering overhead light */
.light {
  position: fixed;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(255,220,100,0.12) 0%, transparent 70%);
  animation: flicker 4s infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes flicker {
  0%,100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.4; }
  94% { opacity: 1; }
  96% { opacity: 0.6; }
  97% { opacity: 1; }
}

.door-frame {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 420px;
  padding: 0 1rem;
}

/* WARNING sign */
.warning-sign {
  background: #ffcc00;
  color: #1a0000;
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-align: center;
  padding: 0.4rem 1rem;
  text-transform: uppercase;
  border: 3px solid #cc9900;
  margin-bottom: 0;
  box-shadow: 0 0 12px rgba(255,200,0,0.4), inset 0 0 8px rgba(0,0,0,0.2);
  animation: signFlicker 6s infinite;
}

.warning-sign::before { content: '⚠ '; }
.warning-sign::after  { content: ' ⚠'; }

@keyframes signFlicker {
  0%,100% { opacity: 1; box-shadow: 0 0 12px rgba(255,200,0,0.4), inset 0 0 8px rgba(0,0,0,0.2); }
  85% { opacity: 1; }
  86% { opacity: 0.5; box-shadow: none; }
  87% { opacity: 1; box-shadow: 0 0 12px rgba(255,200,0,0.4); }
}

/* Metal door panel */
.door-panel {
  background: linear-gradient(160deg, #2a2a2a 0%, #1a1a1a 40%, #222 60%, #1c1c1c 100%);
  border: 3px solid #3a3a3a;
  border-top: none;
  padding: 2rem 2rem 1.5rem;
  box-shadow:
    inset 2px 2px 0 rgba(255,255,255,0.05),
    inset -2px -2px 0 rgba(0,0,0,0.5),
    0 8px 32px rgba(0,0,0,0.8);
}

/* Bolt details */
.door-panel::before {
  content: '● ● ● ●';
  display: block;
  color: #444;
  font-size: 0.5rem;
  letter-spacing: 24px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.door-title {
  text-align: center;
  margin-bottom: 1.8rem;
}

.door-title h1 {
  font-family: 'VT323', monospace;
  font-size: 2.2rem;
  color: #e8c97a;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(232,201,122,0.5), 0 0 20px rgba(232,201,122,0.2);
  line-height: 1.1;
}

.door-title .sub {
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: #666;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 4px;
}

.tape {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: #555;
  font-size: 0.7rem;
  letter-spacing: 1px;
}
.tape::before, .tape::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #444, transparent);
}

.field { margin-bottom: 1.1rem; }

label {
  display: block;
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: #888;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

input {
  width: 100%;
  background: #0d0d0d;
  border: 1px solid #3a3a3a;
  border-bottom: 2px solid #555;
  color: #e8c97a;
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  letter-spacing: 2px;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  caret-color: #e8c97a;
}

input::placeholder { color: #333; }

input:focus {
  border-color: #e8c97a;
  box-shadow: 0 0 8px rgba(232,201,122,0.2);
}

.btn {
  width: 100%;
  background: linear-gradient(180deg, #cc3300 0%, #991f00 100%);
  color: #fff;
  border: 2px solid #ff4400;
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  padding: 0.65rem;
  cursor: pointer;
  margin-top: 0.75rem;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 0 10px rgba(200,50,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn:hover {
  background: linear-gradient(180deg, #e03300 0%, #aa2200 100%);
  box-shadow: 0 0 16px rgba(220,60,0,0.5);
}
.btn:active { transform: scale(0.98); }

.error {
  background: rgba(180,0,0,0.15);
  border: 1px solid rgba(200,50,0,0.5);
  color: #ff6644;
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  letter-spacing: 1px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  display: none;
  text-align: center;
}
.error.show { display: block; }

.sticker {
  text-align: center;
  margin-top: 1.2rem;
  font-family: 'VT323', monospace;
  font-size: 0.85rem;
  color: #3a3a3a;
  letter-spacing: 2px;
}

/* TOTP setup screen helpers (replaces inline style="..." attributes) */
.totp-setup-label {
  font-family: 'VT323', monospace;
  font-size: 1rem;
  letter-spacing: 2px;
  color: #e8c97a;
  margin-bottom: 10px;
  text-transform: uppercase;
  text-align: center;
}

.totp-setup-hint {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 12px;
  text-align: center;
  line-height: 1.5;
}

.totp-setup-qr-wrap {
  text-align: center;
  margin-bottom: 10px;
}

.totp-setup-qr-container {
  width: 200px;
  height: 200px;
  background: #fff;
  display: inline-block;
  border-radius: 6px;
  border: 2px solid #3a3a3a;
}

.totp-setup-secret {
  font-family: 'VT323', monospace;
  font-size: 0.75rem;
  color: #555;
  text-align: center;
  margin-bottom: 14px;
  word-break: break-all;
}

/* Hidden screens — toggled by JS adding/removing .hidden */
.js-hidden { display: none; }
