/* ============================================================
   TERMINATOR 2: JUDGMENT DAY — Industrial 1990s Stylesheet
   ============================================================ */

/* --- RESET & BASE --- */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

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

body {
  background: #0d0d0d;
  color: #c0c0c0;
  font-family: 'Share Tech Mono', 'Courier New', Courier, monospace;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  background-image: 
    linear-gradient(0deg, transparent 24%, rgba(255, 120, 0, 0.02) 25%, rgba(255, 120, 0, 0.02) 26%, transparent 27%),
    linear-gradient(90deg, transparent 24%, rgba(255, 120, 0, 0.02) 25%, rgba(255, 120, 0, 0.02) 26%, transparent 27%);
  background-size: 4px 4px;
  border-left: 4px double #4a4a4a;
  border-right: 4px double #4a4a4a;
  min-height: 100vh;
}

/* --- DIVIDERS --- */
.ascii-divider {
  color: #ff6a00;
  font-size: 10px;
  line-height: 1;
  text-align: center;
  margin: 0;
  user-select: none;
  text-shadow: 0 0 8px rgba(255, 106, 0, 0.6);
}

/* --- HEADER --- */
header {
  text-align: center;
  margin-bottom: 40px;
}

h1 {
  font-size: 48px;
  font-weight: 400;
  letter-spacing: 6px;
  color: #e0e0e0;
  text-transform: uppercase;
  text-shadow: 
    0 0 10px rgba(255, 106, 0, 0.5),
    2px 2px 0 #1a1a1a;
  margin: 20px 0 10px;
  border-top: 2px solid #5a5a5a;
  border-bottom: 2px solid #5a5a5a;
  padding: 16px 0;
  background: linear-gradient(180deg, rgba(40,40,40,0.8) 0%, rgba(20,20,20,0.8) 100%);
}

h1 .subtitle {
  display: block;
  font-size: 28px;
  color: #ff6a00;
  letter-spacing: 10px;
  margin-top: 4px;
}

.tagline {
  color: #888;
  font-style: italic;
  font-size: 14px;
  margin: 12px 0;
  letter-spacing: 1px;
}

/* --- MAIN LAYOUT --- */
main {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
}

@media (max-width: 680px) {
  main {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 32px;
  }
  h1 .subtitle {
    font-size: 20px;
  }
}

/* --- LEFT COLUMN --- */
.column-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.poster-box {
  border: 3px ridge #666;
  padding: 6px;
  background: #1a1a1a;
  text-align: center;
}

.poster-img {
  width: 100%;
  display: block;
  filter: saturate(0.85) contrast(1.1);
  border: 1px solid #333;
}

.caption {
  font-size: 10px;
  color: #ff6a00;
  margin-top: 6px;
  letter-spacing: 2px;
}

/* --- INFO PANEL --- */
.info-panel {
  border: 2px solid #444;
  padding: 16px;
  background: #141414;
}

.info-panel h3 {
  color: #ff6a00;
  font-size: 14px;
  letter-spacing: 3px;
  margin-bottom: 12px;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
}

.info-panel table {
  width: 100%;
  font-size: 11px;
  border-collapse: collapse;
}

.info-panel td {
  padding: 4px 6px;
  border-bottom: 1px dotted #2a2a2a;
}

.info-panel td:first-child {
  color: #ff6a00;
  width: 80px;
  font-weight: bold;
  letter-spacing: 1px;
}

/* --- RIGHT COLUMN --- */
.column-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  border: 2px solid #3a3a3a;
  padding: 18px;
  background: #111;
}

.panel h3 {
  color: #ff6a00;
  font-size: 14px;
  letter-spacing: 3px;
  margin-bottom: 12px;
  border-bottom: 1px solid #333;
  padding-bottom: 8px;
}

.panel p {
  font-size: 13px;
  line-height: 1.7;
  color: #b0b0b0;
}

/* --- REVIEWS --- */
.review-panel blockquote {
  border-left: 3px solid #ff6a00;
  margin: 14px 0;
  padding: 8px 14px;
  background: rgba(255, 106, 0, 0.04);
}

.review-panel blockquote p {
  font-size: 13px;
  color: #d0d0d0;
  font-style: italic;
  margin-bottom: 4px;
}

.review-panel blockquote cite {
  font-size: 11px;
  color: #888;
  font-style: normal;
}

.review-panel blockquote cite strong {
  color: #ff6a00;
}

/* --- SCORES --- */
.scores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.score-badge {
  display: inline-block;
  background: #1a1a1a;
  border: 1px solid #444;
  color: #ff6a00;
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 1px;
}

/* --- STILLS --- */
.stills-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.still-img {
  width: 100%;
  border: 2px ridge #555;
  filter: grayscale(0.3) contrast(1.15);
  background: #1a1a1a;
  padding: 3px;
}

/* --- FOOTER --- */
footer {
  text-align: center;
  margin-top: 40px;
}

.footer-text {
  font-size: 11px;
  color: #666;
  letter-spacing: 2px;
  margin-top: 6px;
}

.build-note {
  font-size: 10px;
  color: #444;
  margin-top: 8px;
  letter-spacing: 1px;
}


/* ============================================================
   EFFECTS: SCANLINES, CRT, GLITCH, CURSOR
   ============================================================ */

/* --- CRT SCANLINE OVERLAY --- */
.scanlines {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
}

/* --- CRT FLICKER (subtle periodic) --- */
.crt-flicker {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9998;
  background: transparent;
  animation: crt-flicker 8s infinite;
}

@keyframes crt-flicker {
  0%, 99.5%, 100% { opacity: 0; }
  99.6%, 99.8% { opacity: 0.03; }
  99.7% { opacity: 0.06; }
}

/* --- GLITCH TITLE --- */
.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text.glitching {
  animation: glitch-skew 0.15s ease-in-out;
}

@keyframes glitch-skew {
  0% { transform: skew(0deg); }
  20% { transform: skew(-2deg); }
  40% { transform: skew(1deg); }
  60% { transform: skew(-1deg); }
  80% { transform: skew(0.5deg); }
  100% { transform: skew(0deg); }
}

/* --- TERMINAL CURSOR --- */
.terminal-cursor {
  color: #ff6a00;
  font-weight: bold;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  display: inline-block;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- TAGLINE TYPEWRITER PREP --- */
.tagline {
  visibility: hidden; /* revealed by JS after typewriter starts */
}

/* --- SMOOTH SCROLL --- */
html {
  scroll-behavior: smooth;
}

/* --- REVIEW HIGHLIGHT TRANSITION --- */
.review-panel blockquote {
  transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

/* --- POSTER HOVER TRANSITION --- */
.poster-img {
  transition: filter 0.3s ease;
}

/* --- SCORE BADGE HOVER --- */
.score-badge {
  transition: all 0.3s ease;
}

.score-badge:hover {
  background: #2a1a00;
  border-color: #ff6a00;
  box-shadow: 0 0 10px rgba(255, 106, 0, 0.3);
  color: #fff;
  transform: translateY(-1px);
}


/* ============================================================
   INTENSIFIED EFFECTS: VHS, NOISE, HEAVY GLITCH
   ============================================================ */

/* VHS tracking bar animation */
@keyframes vhs-shift {
  0% { transform: translateX(-100%) skewX(-5deg); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(100%) skewX(3deg); opacity: 0; }
}

/* Static noise flicker */
@keyframes noise-flicker {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.15; }
}

/* Heavy glitch skew */
.glitch-heavy {
  animation: glitch-skew-heavy 0.15s ease-in-out;
}

@keyframes glitch-skew-heavy {
  0% { transform: skew(0deg) scale(1); }
  15% { transform: skew(-3deg) scale(1.02); }
  30% { transform: skew(2deg) scale(0.98); }
  45% { transform: skew(-2deg) scale(1.01); }
  60% { transform: skew(1deg) scale(1); }
  75% { transform: skew(-1deg) scale(1.01); }
  100% { transform: skew(0deg) scale(1); }
}

/* Glitch character flash */
.glitch-char {
  color: #ff4444;
  text-shadow: 0 0 8px rgba(255,0,0,0.8);
  animation: char-flicker 0.1s steps(2);
}

@keyframes char-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Cursor particle */
.cursor-particle {
  transition: none;
}

/* VHS bar base */
.vhs-bar {
  will-change: transform;
}

/* Noise burst base */
.noise-burst {
  will-change: opacity;
}

/* Score badge transition */
.score-badge {
  transition: all 0.3s ease;
}

.score-badge:hover {
  background: #2a1a00;
  border-color: #ff6a00;
  box-shadow: 0 0 15px rgba(255, 106, 0, 0.4);
  color: #fff;
  transform: translateY(-2px);
}


/* ============================================================
   INTENSIFIED 2.0: FIRE, FLASH, SHAKE, HAZE, WARNING
   ============================================================ */

/* --- FIRE EMBER --- */
.fire-ember {
  position: fixed;
  pointer-events: none;
  z-index: 9993;
  border-radius: 50%;
  will-change: transform, opacity;
}

/* --- SCREEN SHAKE --- */
@keyframes screen-shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-4px, 2px); }
  20% { transform: translate(3px, -3px); }
  30% { transform: translate(-2px, -1px); }
  40% { transform: translate(1px, 3px); }
  50% { transform: translate(-3px, -2px); }
  60% { transform: translate(4px, 1px); }
  70% { transform: translate(-1px, -3px); }
  80% { transform: translate(2px, 2px); }
  90% { transform: translate(-3px, -1px); }
}

body.screen-shaking {
  animation: screen-shake 0.3s ease-out;
}

/* --- NUCLEAR FLASH --- */
.nuclear-flash {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9992;
  background: radial-gradient(ellipse at center, rgba(255,200,100,0.9) 0%, rgba(255,150,50,0.5) 30%, rgba(255,50,0,0.15) 60%, transparent 80%);
  animation: nuke-flash 0.8s ease-out forwards;
}

@keyframes nuke-flash {
  0% { opacity: 1; }
  30% { opacity: 0.8; }
  100% { opacity: 0; }
}

/* --- HEAT HAZE OVERLAY --- */
.heat-haze {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9991;
  background: url("data:image/svg+xml," + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><filter id="h"><feTurbulence type="turbulence" baseFrequency="0.02 0.08" numOctaves="3" seed="1"/><feDisplacementMap in="SourceGraphic" scale="12"/></filter></svg>'));
  mix-blend-mode: overlay;
  opacity: 0;
  transition: opacity 0.3s;
}

.heat-haze.active {
  opacity: 0.25;
  animation: haze-warp 0.5s ease-in-out infinite alternate;
}

@keyframes haze-warp {
  0% { opacity: 0.15; }
  100% { opacity: 0.35; }
}

/* --- WARNING BANNER --- */
.warning-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9990;
  background: repeating-linear-gradient(
    90deg,
    rgba(200,0,0,0.85) 0px,
    rgba(200,0,0,0.85) 20px,
    rgba(40,0,0,0.9) 20px,
    rgba(40,0,0,0.9) 40px
  );
  color: #fff;
  text-align: center;
  padding: 6px 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  letter-spacing: 4px;
  border-bottom: 2px solid #ff0000;
  box-shadow: 0 0 30px rgba(255,0,0,0.5);
  animation: warning-pulse 0.5s ease-in-out infinite alternate;
}

.warning-banner .warning-text {
  animation: warning-blink 0.3s step-end infinite;
}

@keyframes warning-pulse {
  0% { box-shadow: 0 0 20px rgba(255,0,0,0.5); }
  100% { box-shadow: 0 0 50px rgba(255,0,0,0.9), 0 0 100px rgba(255,60,0,0.6); }
}

@keyframes warning-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* --- LIQUID METAL MORPH --- */
.liquid-metal {
  transition: none !important;
  filter: url(#liquid-filter) !important;
}

/* --- COUNTDOWN TIMER --- */
.countdown-overlay {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9989;
  font-family: 'Share Tech Mono', monospace;
  color: #ff2200;
  font-size: 18px;
  letter-spacing: 3px;
  background: rgba(0,0,0,0.8);
  border: 1px solid #ff2200;
  padding: 10px 16px;
  box-shadow: 0 0 20px rgba(255,30,0,0.4);
  animation: timer-pulse 1s ease-in-out infinite alternate;
}

@keyframes timer-pulse {
  0% { box-shadow: 0 0 15px rgba(255,30,0,0.4); }
  100% { box-shadow: 0 0 40px rgba(255,30,0,0.9), 0 0 80px rgba(255,0,0,0.5); }
}

/* --- INTENSIFIED GLITCH RGB CLONE --- */
.rgb-clone {
  position: fixed;
  pointer-events: none;
  z-index: 9988;
  font-family: 'Share Tech Mono', monospace;
  font-weight: 400;
  text-transform: uppercase;
  animation: clone-fade 0.3s ease-out forwards;
}

@keyframes clone-fade {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}

/* --- TV POWER-OFF EFFECT --- */
.tv-power-off {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9987;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.9) 100%);
  animation: power-crush 0.25s ease-in forwards;
}

@keyframes power-crush {
  0% { transform: scaleY(0.01); opacity: 0; }
  30% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0); opacity: 0; }
}

/* --- SCANLINE GLITCH BAR --- */
@keyframes scan-bar {
  0% { top: -5%; opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { top: 105%; opacity: 0; }
}

.scan-glitch-bar {
  position: fixed;
  left: 0; right: 0;
  height: 3px;
  pointer-events: none;
  z-index: 9986;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), rgba(255,106,0,0.5), rgba(255,255,255,0.7), transparent);
  box-shadow: 0 0 15px rgba(255,106,0,0.8), 0 2px 5px rgba(255,255,255,0.3);
  animation: scan-bar 1.5s linear forwards;
}


/* ============================================================
   MOBILE RESPONSIVE OVERRIDES
   ============================================================ */

@media (max-width: 768px) {
  /* Smaller countdown */
  .countdown-overlay {
    bottom: 10px;
    right: 10px;
    font-size: 13px;
    padding: 6px 10px;
    letter-spacing: 2px;
  }

  /* Smaller warning banner */
  .warning-banner {
    font-size: 10px;
    letter-spacing: 2px;
    padding: 4px 0;
  }

  /* Reduce scanline density */
  .scanlines {
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 4px,
      rgba(0, 0, 0, 0.04) 4px,
      rgba(0, 0, 0, 0.04) 8px
    );
  }

  /* Disable fixed background attachment (perf) */
  body {
    background-attachment: scroll;
  }
}

@media (max-width: 480px) {
  .countdown-overlay {
    bottom: 6px;
    right: 6px;
    font-size: 11px;
    padding: 4px 8px;
  }

  .warning-banner {
    font-size: 9px;
    letter-spacing: 1px;
    padding: 3px 0;
  }

  /* Simpler scanlines for tiny screens */
  .scanlines {
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 6px,
      rgba(0, 0, 0, 0.03) 6px,
      rgba(0, 0, 0, 0.03) 12px
    );
  }
}

/* GPU acceleration helpers */
.fire-ember, .cursor-particle, .vhs-bar, .noise-burst,
.scan-glitch-bar, .nuclear-flash, .tv-power-off, .glitch-clone {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}
