/* OldVids Retro Design System */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=VT323&display=swap');

:root {
  /* Color System */
  --bg-bone: #EAE9E5;
  --fg-ink: #1A1A1A;
  --accent-red: #D9381E;
  --phosphor-green: #4ADE80;
  --bezel-dark: #111111;
  --bezel-light: #333333;

  /* Spacing */
  --space-unit: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-bone);
  color: var(--fg-ink);
  font-family: 'Space Mono', monospace;
  /* Dot grid pattern */
  background-image: radial-gradient(circle, #ccc 1px, transparent 1px);
  background-size: 20px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Typography */
h1,
h2,
h3,
.font-digital {
  font-family: 'VT323', monospace;
  text-transform: uppercase;
}

.font-ui {
  font-family: 'Space Mono', monospace;
}

/* Layout */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1200px;
  width: 100%;
  padding: 32px;
}

@media (min-width: 1024px) {
  .main-layout {
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
  }
}

/* Header */
.site-header {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  width: 100%;
  max-width: 1200px;
  padding-top: 16px;
}

.logo {
  font-size: 4rem;
  line-height: 1;
  margin: 0;
  text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
  letter-spacing: 4px;
}

.subtitle {
  font-size: 1.2rem;
  letter-spacing: 0.3em;
  color: #666;
  margin-top: 8px;
  border-top: 1px solid #ccc;
  display: inline-block;
  padding-top: 8px;
}

.live-indicator {
  position: absolute;
  top: 32px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--fg-ink);
}

.rec-dot {
  width: 12px;
  height: 12px;
  background-color: var(--accent-red);
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* Filter Chips */
.filters {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-chip {
  background: transparent;
  border: 2px solid #ccc;
  padding: 8px 16px;
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-chip.active {
  background: white;
  border-color: var(--fg-ink);
  color: var(--fg-ink);
  box-shadow: 4px 4px 0px var(--fg-ink);
  transform: translate(-2px, -2px);
}

.filter-chip:active {
  transform: translate(0, 0);
  box-shadow: 0px 0px 0px var(--fg-ink);
}

.checkbox-square {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  display: inline-block;
  position: relative;
}

.filter-chip.active .checkbox-square::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: var(--fg-ink);
}

/* Monitor / Video Player */
.monitor-container {
  width: 100%;
}

.monitor-bezel {
  background-color: var(--bezel-dark);
  padding: 24px;
  border-radius: 16px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
  position: relative;
}

.brand-label {
  text-align: center;
  color: #444;
  font-family: sans-serif;
  font-size: 0.7rem;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-transform: uppercase;
  font-weight: bold;
}

.screen-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 4px;
  /* Slight curve for CRT feel */
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0),
      rgba(255, 255, 255, 0) 50%,
      rgba(0, 0, 0, 0.2) 50%,
      rgba(0, 0, 0, 0.2));
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 10;
}

.vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
  z-index: 11;
}

.crt-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.05);
  pointer-events: none;
  z-index: 12;
}

/* OSD Overlays */
.osd-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 24px;
  pointer-events: none;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: 'VT323', monospace;
  color: var(--phosphor-green);
  font-size: 2rem;
  text-shadow: 0 0 4px var(--phosphor-green);
  opacity: 0.8;
}

.osd-top,
.osd-bottom {
  display: flex;
  justify-content: space-between;
}

.play-icon {
  margin-right: 8px;
}

/* Controls */
.monitor-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding: 0 8px;
}

.tracking-bar {
  flex-grow: 1;
  height: 4px;
  background: #333;
  margin: 0 16px;
  position: relative;
}

.tracking-indicator {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  /* Dynamic */
  background: var(--phosphor-green);
  box-shadow: 0 0 4px var(--phosphor-green);
}

/* Next Button */
.next-btn {
  width: 100%;
  max-width: 320px;
  display: block;
  margin: 32px auto 0 auto;
  background: var(--fg-ink);
  color: white;
  border: none;
  padding: 16px;
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.next-btn:hover {
  background: #000;
}

.next-btn:active {
  transform: translateY(2px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

/* Metadata Card (Cassette Label) */
.metadata-card {
  background: white;
  border: 1px solid #ccc;
  padding: 20px;
  position: relative;
  transform: rotate(1deg);
  box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.05);
  max-width: 320px;
  margin: 0 auto;
}

.screw {
  width: 10px;
  height: 10px;
  border: 1px solid #aaa;
  border-radius: 50%;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screw::after {
  content: '+';
  color: #aaa;
  font-size: 12px;
  line-height: 0;
}

.screw.tl {
  top: 6px;
  left: 6px;
  transform: rotate(45deg);
}

.screw.tr {
  top: 6px;
  right: 6px;
  transform: rotate(15deg);
}

.screw.bl {
  bottom: 6px;
  left: 6px;
  transform: rotate(-10deg);
}

.screw.br {
  bottom: 6px;
  right: 6px;
  transform: rotate(30deg);
}

.label-header {
  border: 2px solid var(--fg-ink);
  padding: 4px 8px;
  display: inline-block;
  margin-bottom: 16px;
  background: white;
  transform: rotate(-2deg) translateY(-5px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.label-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.video-title {
  font-family: 'VT323', monospace;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 16px;
  word-break: break-word;
  border-bottom: 2px solid #eee;
  padding-bottom: 16px;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.meta-item label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.meta-item .value {
  font-size: 1.2rem;
  font-weight: bold;
}

.camera-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f5f5f5;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: bold;
  color: var(--accent-red);
}

/* Static Noise Effect */
.static-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48ZmlsdGVyIGlkPSJnoiPjxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIwLjY1IiBudW1PY3RhdmVzPSIzIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI2cpIiBvcGFjaXR5PSIwLjUiLz48L3N2Zz4=');
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 50;
  mix-blend-mode: hard-light;
}

.static-active .static-overlay {
  opacity: 1;
}

/* Footer */
.footer {
  margin-top: 64px;
  margin-bottom: 32px;
  color: #888;
  font-size: 0.9rem;
}

.footer a {
  color: var(--fg-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  border-bottom-color: var(--fg-ink);
}