/* ==========================================================================
   JUST MAKE A FLIM - STYLESYSTEM
   Tactile, DIY, Analog Cinematic Aesthetics
   ========================================================================== */

:root {
  --bg-dark: #0a0a0c;
  --bg-slate: #141418;
  --accent-red: #ff3b30;
  --accent-yellow: #f1c40f;
  --accent-amber: #e67e22;
  --text-light: #f5f5f7;
  --text-muted: #8e8e93;
  --border-color: #2c2c2e;
  
  /* Gaffer Tape Palette */
  --gaffer-yellow: #ebc034;
  --gaffer-tape-shadow: rgba(0, 0, 0, 0.4);
  
  /* Fonts */
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --font-heading: 'Syncopate', sans-serif;
  --font-sans: 'Work Sans', sans-serif;
  
  /* Viewfinder Lines */
  --viewfinder-color: rgba(245, 245, 247, 0.15);
  --hud-color: #f5f5f7;
}

/* Reset & Core Setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-sans);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Custom Selection */
::selection {
  background: var(--accent-yellow);
  color: var(--bg-dark);
}

/* ==========================================================================
   ANALOG OVERLAYS (VHS, CRT, GRAIN)
   ========================================================================== */

/* Film Grain Overlay */
.film-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* VHS Scanlines */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  z-index: 9998;
}

/* Subtle CRT Screen Flicker */
.crt-flicker {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18, 16, 16, 0);
  pointer-events: none;
  z-index: 9997;
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0% { background-color: rgba(255, 255, 255, 0.002); }
  50% { background-color: rgba(0, 0, 0, 0.005); }
  100% { background-color: rgba(255, 255, 255, 0.002); }
}

/* Exposure Screen Flash (Clapper Snap Effect) */
.exposure-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  pointer-events: none;
  opacity: 0;
  z-index: 10000;
  transition: opacity 0.05s ease-out;
}

.exposure-flash.active {
  opacity: 0.95;
  transition: none; /* Instant flash */
}

/* ==========================================================================
   CAMERA VIEWFINDER HUD
   ========================================================================== */

.viewfinder-hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 24px;
  pointer-events: none;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.hud-top, .hud-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.hud-item {
  color: var(--hud-color);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.tally-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tally-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
  animation: pulse-red 1s infinite alternate;
}

@keyframes pulse-red {
  0% { opacity: 0.3; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.1); }
}

.timecode-hud {
  font-size: 14px;
  font-weight: 700;
}

.battery-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.battery-icon {
  width: 18px;
  height: 10px;
  border: 1px solid var(--hud-color);
  position: relative;
  border-radius: 1px;
}

.battery-icon::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  bottom: 1px;
  right: 1px;
  background-color: #4cd964;
}

.battery-icon::after {
  content: '';
  position: absolute;
  top: 2px;
  right: -3px;
  width: 2px;
  height: 4px;
  background-color: var(--hud-color);
}

.hud-corners {
  position: absolute;
  top: 36px;
  left: 36px;
  right: 36px;
  bottom: 36px;
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--viewfinder-color);
}

.top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.top-right { top: 0; right: 0; border-left: none; border-bottom: none; }
.bottom-left { bottom: 0; left: 0; border-right: none; border-top: none; }
.bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }

.font-tech {
  color: var(--text-muted);
}

/* ==========================================================================
   GAFFER TAPE HEADER
   ========================================================================== */

.viewport-wrapper {
  flex: 1;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 40px 48px 100px; /* Leave space for bottom console */
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.gaffer-tape-banner {
  position: relative;
  align-self: flex-start;
  margin-top: 20px;
  margin-bottom: 50px;
  transform: rotate(-1.5deg);
  z-index: 50;
  cursor: default;
}

.tape-shadow {
  position: absolute;
  top: 4px;
  left: 2px;
  width: 100%;
  height: 100%;
  background-color: var(--gaffer-tape-shadow);
  transform: skewX(-2deg);
  filter: blur(2px);
}

.tape-body {
  background-color: var(--gaffer-yellow);
  padding: 10px 30px;
  color: var(--bg-dark);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  /* Torn edge simulation using linear gradients */
  background-image: 
    repeating-linear-gradient(90deg, transparent, transparent 5px, rgba(0,0,0,0.08) 5px, rgba(0,0,0,0.08) 10px),
    linear-gradient(rgba(255,255,255,0.15), transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  /* Jagged tear on left and right */
  clip-path: polygon(
    2px 0%, 98% 0%, 100% 4%, 99% 12%, 100% 25%, 98% 45%, 100% 70%, 99% 90%, 98% 100%,
    0% 100%, 1% 88%, -1% 72%, 2% 52%, 0% 30%, 1% 15%
  );
}

.gaffer-tape-banner h1 {
  margin: 0;
  text-shadow: 1px 1px 0px rgba(255,255,255,0.2);
}

/* ==========================================================================
   MAIN LAYOUT STRUCTURE
   ========================================================================== */

.main-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  flex: 1;
}

@media (max-width: 992px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 50px;
  }
}

/* ==========================================================================
   VISUAL SECTION: ACADEMY LEADER COUNTDOWN
   ========================================================================== */

.visual-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.film-leader-container {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1/1;
  background-color: var(--bg-slate);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

/* SVG Leader */
.film-leader-svg {
  width: 75%;
  height: auto;
  overflow: visible;
}

/* SVG Line & Circle Stylings */
.outer-ring {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.5;
  stroke-dasharray: 4, 2;
  opacity: 0.4;
}

.inner-ring {
  fill: none;
  stroke: var(--text-light);
  stroke-width: 1.5;
  opacity: 0.2;
}

.sub-ring {
  fill: none;
  stroke: var(--accent-yellow);
  stroke-width: 1;
  opacity: 0.15;
}

.crosshair-line {
  stroke: var(--text-muted);
  stroke-width: 0.75;
  opacity: 0.3;
}

/* Radar Sweep Sweep Radial Line */
.radar-sweep {
  stroke: var(--accent-yellow);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.75;
  transform-origin: 100px 100px;
  animation: radar-sweep 2s linear infinite;
  filter: drop-shadow(0 0 2px var(--accent-yellow));
}

@keyframes radar-sweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Countdown Number Typography */
.countdown-leader-num {
  fill: var(--text-light);
  font-family: var(--font-mono);
  font-size: 60px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  letter-spacing: -0.05em;
  animation: num-pulse 1s infinite steps(1);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

@keyframes num-pulse {
  0% { opacity: 0.9; transform: scale(1) translate(0, 0); }
  50% { opacity: 1; transform: scale(1.02) translate(0, 0); }
}

/* Countdown Digital Panel */
.digital-countdown-panel {
  width: 100%;
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: 10px;
}

.panel-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 8px;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 45px;
}

.time-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1;
}

.time-lbl {
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.time-divider {
  font-size: 18px;
  color: var(--accent-red);
  font-weight: 700;
  line-height: 1;
  animation: blink-divider 1s infinite steps(1);
  margin-bottom: 12px;
}

@keyframes blink-divider {
  0% { opacity: 0.1; }
  50% { opacity: 1; }
}

/* ==========================================================================
   INTERACTIVE SECTION: CLAPPERBOARD SLATE
   ========================================================================== */

.interactive-section {
  display: flex;
  justify-content: center;
}

/* Clapperboard Container */
.clapperboard {
  width: 100%;
  max-width: 440px;
  background-color: #121214;
  border-radius: 4px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.6);
  position: relative;
  cursor: pointer;
  perspective: 1000px; /* Dynamic hinge perspective */
}

/* Top Hinged Bar */
.clapper-top {
  height: 38px;
  background-color: #1c1c1e;
  border-radius: 4px 4px 0 0;
  position: relative;
  z-index: 10;
  transform-origin: bottom left;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Chevron Stripes on Clapper Stick */
.chevrons-top, .chevrons-bottom {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    #1c1c1e,
    #1c1c1e 18px,
    #e5e5ea 18px,
    #e5e5ea 36px
  );
  border-bottom: 2px solid #000;
}

.chevrons-bottom {
  background: repeating-linear-gradient(
    45deg,
    #1c1c1e,
    #1c1c1e 18px,
    #e5e5ea 18px,
    #e5e5ea 36px
  );
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 3px solid #000;
}

.clapper-base-arm {
  height: 38px;
  position: relative;
  z-index: 8;
}

.clapper-hinge {
  position: absolute;
  top: 28px;
  left: 12px;
  width: 16px;
  height: 16px;
  background: radial-gradient(circle, #555 40%, #222 90%);
  border: 1px solid #111;
  border-radius: 50%;
  z-index: 20;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Clapper snap keyframes */
@keyframes snap-clapper {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(-25deg); }
  45% { transform: rotate(-28deg); }
  60% { transform: rotate(2deg); } /* Slam closed slightly past 0 */
  75% { transform: rotate(-1deg); }
  90% { transform: rotate(0.5deg); }
  100% { transform: rotate(0deg); }
}

.clapperboard.clapping .clapper-top {
  animation: snap-clapper 0.45s ease-out forwards;
}

/* Highlight Tape for Coming Soon */
.coming-soon-tape {
  position: absolute;
  top: 60px;
  right: -15px;
  background-color: var(--accent-red);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 20px;
  letter-spacing: 0.1em;
  transform: rotate(8deg);
  box-shadow: 2px 3px 6px rgba(0,0,0,0.4);
  z-index: 30;
  clip-path: polygon(
    2px 0%, 98% 0%, 100% 4%, 99% 12%, 100% 25%, 98% 45%, 100% 70%, 99% 90%, 98% 100%,
    0% 100%, 1% 88%, -1% 72%, 2% 52%, 0% 30%, 1% 15%
  );
  animation: glow-tape 1.5s infinite alternate;
}

@keyframes glow-tape {
  0% {
    background-color: var(--accent-red);
    box-shadow: 0 0 4px var(--accent-red), 2px 3px 6px rgba(0,0,0,0.3);
  }
  100% {
    background-color: #ff5722;
    box-shadow: 0 0 12px #ff5722, 2px 3px 6px rgba(0,0,0,0.3);
  }
}

/* Slate Board Body */
.slate-body {
  background-color: #17171a;
  border: 4px solid #111;
  border-top: none;
  border-radius: 0 0 4px 4px;
  padding: 24px;
  box-sizing: border-box;
}

/* Slate Text Grid */
.slate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 2px solid var(--border-color);
  background-color: #121214;
  margin-bottom: 24px;
}

.grid-cell {
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
}

.grid-cell:nth-child(3n) {
  border-right: none;
}

.span-full {
  grid-column: 1 / -1;
  border-right: none;
}

.span-two {
  grid-column: span 2;
}

.slate-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.slate-val {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Handwritten Chalk Font Aesthetic */
.font-marker {
  font-family: var(--font-mono);
  color: #ffffff;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.4);
}

.font-yellow {
  color: var(--accent-yellow);
  text-shadow: 0 0 2px rgba(241, 196, 15, 0.4);
}

.font-red {
  color: var(--accent-red);
  text-shadow: 0 0 2px rgba(255, 59, 48, 0.4);
}

.prod-line .slate-val {
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: 0.05em;
}

/* Slate Interactive Forms */
.slate-form-area {
  border-top: 1px dashed var(--border-color);
  padding-top: 20px;
}

.signup-pitch {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #0d0d0f;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  padding: 0 12px;
  height: 44px;
  transition: border-color 0.25s ease;
}

.input-wrapper:focus-within {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 6px rgba(241, 196, 15, 0.15);
}

.input-cursor {
  font-family: var(--font-mono);
  color: var(--accent-yellow);
  margin-right: 8px;
  font-weight: 700;
  font-size: 14px;
}

.input-wrapper input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 13px;
  width: 100%;
  letter-spacing: 0.05em;
}

.input-wrapper input::placeholder {
  color: #48484a;
}

.input-tape-label {
  display: none; /* Decorative tag inside container if needed */
}

/* Toggled switch-styled submit btn */
.submit-btn {
  background-color: var(--accent-red);
  color: #fff;
  border: 1px solid #7f1d1d;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0 20px;
  height: 44px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 3px 6px rgba(255,59,48,0.2);
  transition: all 0.2s ease;
}

.submit-btn:hover {
  background-color: #ff453a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,59,48,0.3);
}

.submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(255,59,48,0.15);
}

.btn-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 0 4px #fff;
}

/* Form Submit Feedback */
.form-feedback {
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 10px;
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-feedback.success {
  color: #30d158;
}

.form-feedback.error {
  color: var(--accent-red);
}

/* ==========================================================================
   DECK CONSOLE FOOTER
   ========================================================================== */

.deck-console {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 70px;
  background-color: #111113;
  border-top: 2px solid #222225;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 32px;
  z-index: 200;
  box-sizing: border-box;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.5);
}

/* Deck Console mobile styling is grouped in the media queries at the bottom of the file */

/* Console Left: Audio & Indicator */
.console-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulsing-amber {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-yellow);
  box-shadow: 0 0 6px var(--accent-yellow);
  animation: pulse-amber 1.5s infinite alternate;
}

@keyframes pulse-amber {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

.status-msg {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.audio-control-panel {
  display: flex;
}

.console-btn {
  background: #1c1c1e;
  border: 1px solid #3a3a3c;
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.console-btn:hover {
  background: #2c2c2e;
  border-color: #48484a;
}

.console-btn:active {
  background: #121214;
}

.audio-icon.muted {
  filter: grayscale(1) opacity(0.5);
}

.btn-lbl {
  font-weight: 700;
}

/* Console Center: Transport deck controls */
.console-controls {
  display: flex;
  justify-content: center;
}

.deck-btn-group {
  display: flex;
  background-color: #070709;
  border: 1px solid #222;
  border-radius: 4px;
  padding: 4px;
  gap: 4px;
}

.deck-btn {
  background: #17171a;
  border: 1px solid #2c2c30;
  color: var(--text-light);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 48px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.deck-btn:hover {
  background-color: #242429;
  border-color: #3e3e46;
}

.deck-btn:active {
  background-color: #0c0c0e;
  transform: translateY(1px);
}

.deck-symbol {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}

.deck-btn-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Active buttons styling */
.play-active {
  background-color: #121214;
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
  cursor: default;
}

.play-active .deck-symbol {
  text-shadow: 0 0 6px rgba(241, 196, 15, 0.4);
}

/* Console Right: VU audio metrics */
.console-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
}

/* Console positioning is handled at the bottom */

.metric-readout {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
}

.metric-name {
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.metric-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-yellow);
}

.vu-meter {
  display: flex;
  gap: 2px;
  align-items: center;
}

.vu-segment {
  width: 4px;
  height: 12px;
  background-color: #222;
  border-radius: 1px;
}

.vu-segment.green { background-color: #107c10; }
.vu-segment.amber { background-color: #b85c00; }
.vu-segment.red { background-color: #990000; }

.vu-segment.green.active { background-color: #30d158; box-shadow: 0 0 4px #30d158; }
.vu-segment.amber.active { background-color: #ff9f0a; box-shadow: 0 0 4px #ff9f0a; }
.vu-segment.red.active { background-color: #ff453a; box-shadow: 0 0 4px #ff453a; }

.blinking.active {
  animation: vu-blink 0.5s infinite steps(1);
}

@keyframes vu-blink {
  0%, 100% { background-color: #3a0d0d; box-shadow: none; }
  50% { background-color: #ff453a; box-shadow: 0 0 4px #ff453a; }
}

/* ==========================================================================
   MOBILE PORTRAIT OPTIMIZATIONS (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Viewport Wrapper */
  .viewport-wrapper {
    padding: 16px 16px 90px; /* Tighter padding, leaving room for fixed deck */
  }

  /* Gaffer Tape Title Banner */
  .gaffer-tape-banner {
    margin: 10px auto 30px;
    transform: rotate(-1.5deg);
    align-self: center;
  }

  .tape-body {
    padding: 6px 16px;
    font-size: 1.1rem;
  }

  /* Viewfinder HUD Overlays */
  .viewfinder-hud {
    padding: 12px;
  }

  .hud-top {
    font-size: 10px;
  }

  .timecode-hud {
    font-size: 12px;
  }

  .hud-corners {
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

  .hud-bottom {
    display: none; /* Hide bottom camera details to prevent overlapping slate contents */
  }

  /* Layout grids stacking */
  .main-content {
    gap: 32px;
  }

  /* Film Leader Container (Shrunk to fit screen vertically) */
  .film-leader-container {
    max-width: 290px;
    padding: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  }

  .film-leader-svg {
    width: 68%;
  }

  .countdown-leader-num {
    font-size: 50px;
  }

  .digital-countdown-panel {
    padding-top: 12px;
  }

  .countdown-timer {
    gap: 4px;
  }

  .time-block {
    min-width: 38px;
  }

  .time-num {
    font-size: 17px;
  }

  .time-lbl {
    font-size: 7px;
    margin-top: 2px;
  }

  .time-divider {
    font-size: 14px;
    margin-bottom: 10px;
  }

  /* Clapperboard Slate (Shrunk to fit mobile viewport widths) */
  .clapperboard {
    max-width: 100%;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  }

  .clapper-top, .clapper-base-arm {
    height: 26px;
  }

  .chevrons-top, .chevrons-bottom {
    background: repeating-linear-gradient(
      -45deg,
      #1c1c1e,
      #1c1c1e 10px,
      #e5e5ea 10px,
      #e5e5ea 20px
    );
  }

  .chevrons-bottom {
    background: repeating-linear-gradient(
      45deg,
      #1c1c1e,
      #1c1c1e 10px,
      #e5e5ea 10px,
      #e5e5ea 20px
    );
  }

  .clapper-hinge {
    top: 18px;
    left: 8px;
    width: 12px;
    height: 12px;
  }

  .coming-soon-tape {
    top: 40px;
    right: -10px;
    font-size: 9px;
    padding: 4px 14px;
  }

  .slate-body {
    padding: 14px;
    border-width: 3px;
  }

  .slate-grid {
    margin-bottom: 16px;
  }

  .grid-cell {
    padding: 6px 8px;
    gap: 2px;
  }

  .slate-label {
    font-size: 8px;
  }

  .slate-val {
    font-size: 12px;
  }

  .prod-line .slate-val {
    font-size: 13px;
  }

  /* Slate Forms area */
  .slate-form-area {
    padding-top: 14px;
  }

  .signup-pitch {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .input-wrapper {
    height: 38px;
    padding: 0 10px;
  }

  .input-cursor {
    font-size: 12px;
    margin-right: 6px;
  }

  .input-wrapper input {
    font-size: 11px;
  }

  .submit-btn {
    height: 38px;
    font-size: 11px;
  }

  /* Deck Console Footer (Compact fixed overlay bottom controls) */
  .deck-console {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 56px;
    padding: 0 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0c0c0e;
    border-top: 1.5px solid #222225;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.6);
    z-index: 200;
  }

  .console-left, .console-right {
    display: none !important; /* Hide status/audio/VU indicators on mobile to fit transport deck controls */
  }

  .console-controls {
    width: 100%;
    margin: 0;
  }

  .deck-btn-group {
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    gap: 4px;
  }

  .deck-btn {
    width: calc(20% - 3.2px); /* 5 buttons scale side-by-side */
    height: 44px;
  }

  .deck-symbol {
    font-size: 10px;
    margin-bottom: 1px;
  }

  .deck-btn-label {
    font-size: 6.5px;
    letter-spacing: 0;
  }
}
