@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600&display=swap");

/* ABC Favorit Regular */
@font-face {
  font-family: "ABC Favorit";
  src:
    url("/assets/fonts/ABCFavorit-Regular-Trial.woff2") format("woff2"),
    url("/assets/fonts/ABCFavorit-Regular-Trial.woff") format("woff"),
    url("/assets/fonts/ABCFavorit-Regular-Trial.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

/* ABC Favorit Bold */
@font-face {
  font-family: "ABC Favorit";
  src: url("/assets/fonts/ABCFavorit-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

:root {
  --background-black: #000000;
  --heading-cyan: #00b9c7;
  --film-purple: #b40096;
  --title-white: #fffedc;
  --dcp-success: #22c55e;
  --film-gray-900: #111111;
  --film-gray-800: #1a1a1a;
  --film-gray-700: #2a2a2a;
  --field-gray: #333333;
  --film-gray-500: #666666;
}

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

body {
  background: var(--background-black);
  color: var(--title-white);
  font-family: "Inter", sans-serif;
  font-weight: 400;
  line-height: 1.15;
  overflow-x: hidden;
  padding-top: 6rem;
}

/* Header and dropdown menu styles moved to /styles/universal-menu.css */

.container {
  padding: 0 150px 2rem 150px;
}

.page-title {
  font-family: "ABC Favorit", "Inter", sans-serif;
  font-size: 3.7rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--title-white);
  margin-bottom: 1rem;
  text-align: center;
}

.page-subtitle {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--heading-cyan);
  text-align: center;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 2rem 2rem 2rem;
  }
}

.player-container {
  background: #111111;
  max-width: 1200px;
  width: 100%;
  border: 1px solid var(--field-gray);
  position: relative;
}

/* Upload Drop Zone */
.upload-drop-zone {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background-black);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  cursor: pointer;
  border: 1px dashed var(--field-gray);
  transition: all 0.3s ease;
}

.upload-drop-zone:hover,
.upload-drop-zone.dragover {
  border-color: var(--dcp-success);
  background: rgba(34, 197, 94, 0.05);
}

.upload-drop-zone.hidden {
  display: none;
}

.upload-drop-content {
  text-align: center;
}

.upload-icon {
  color: var(--heading-cyan);
  margin-bottom: 1rem;
}

.upload-text {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--title-white);
  margin-bottom: 0.5rem;
}

.upload-subtext {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--film-gray-500);
}

/* Fullscreen mode styling */
.player-container:fullscreen {
  max-width: 100vw;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  box-shadow: none;
  border: none;
  display: flex;
  flex-direction: column;
}

.player-container:fullscreen .video-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-container:fullscreen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-container:fullscreen .controls-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.player-container:fullscreen .video-wrapper:hover .controls-overlay {
  opacity: 1;
}

/* Webkit prefix for Safari */
.player-container:-webkit-full-screen {
  max-width: 100vw;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  box-shadow: none;
  border: none;
  display: flex;
  flex-direction: column;
}

.player-container:-webkit-full-screen .video-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-container:-webkit-full-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-container:-webkit-full-screen .controls-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.player-container:-webkit-full-screen .video-wrapper:hover .controls-overlay {
  opacity: 1;
}

.video-wrapper {
  position: relative;
  background: #000;
  aspect-ratio: 2.39 / 1; /* Default cinema widescreen ratio */
  width: 100%;
  border: 0;
  overflow: hidden; /* Prevent notifications from spilling beyond player */
}

/* When video is loaded, aspect ratio will be set inline via JS */
.video-wrapper.video-loaded {
  aspect-ratio: var(--video-aspect-ratio, 2.39 / 1);
}

video {
  width: 100%;
  height: 100%;
  display: block;
  background: #00000000;
  outline: none;
  border: none;
  object-fit: contain;
}

/* Force hide all native video controls across all browsers */
video::-webkit-media-controls {
  display: none !important;
}

video::-webkit-media-controls-panel {
  display: none !important;
}

video::-webkit-media-controls-play-button {
  display: none !important;
}

video::-webkit-media-controls-start-playback-button {
  display: none !important;
}

video::-webkit-media-controls-volume-slider {
  display: none !important;
}

video::-webkit-media-controls-mute-button {
  display: none !important;
}

video::-webkit-media-controls-timeline {
  display: none !important;
}

video::-webkit-media-controls-current-time-display {
  display: none !important;
}

video::-webkit-media-controls-time-remaining-display {
  display: none !important;
}

video::-webkit-media-controls-fullscreen-button {
  display: none !important;
}

video::-webkit-media-controls-toggle-closed-captions-button {
  display: none !important;
}

/* Firefox controls */
video::-moz-media-controls {
  display: none !important;
}

/* Edge/IE controls */
video::-ms-media-controls {
  display: none !important;
}

/* Prevent right-click context menu */
video {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: auto;
}

/* Audio Visualizer Canvas */
.audio-visualizer {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  height: 60px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.audio-visualizer.show {
  opacity: 0.8;
}

.controls-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  padding: 8px 15px 8px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.video-wrapper:hover .controls-overlay {
  opacity: 1;
}

.controls-overlay.interacting {
  opacity: 1;
}

.controls-overlay.hidden {
  opacity: 0 !important;
  pointer-events: none;
}

.main-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 28px;
}

.control-icon {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: #b40096;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.control-icon:hover {
  color: #fffedc;
  transform: scale(1.1);
}

.control-icon:active {
  transform: scale(0.95);
}

.progress-container {
  flex: 1;
  margin: 0 12px;
  position: relative;
  min-height: 16px;
  display: flex;
  align-items: center;
}

.progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  position: relative;
  border-radius: 2px;
}

.progress-buffer {
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  width: 0%;
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.progress-fill {
  height: 100%;
  background: rgba(255, 254, 220, 0.6);
  width: 0%;
  transition: width 0.1s ease;
  position: relative;
  border-radius: 2px;
  z-index: 2;
}

/* Disable transition when dragging for instant playhead feedback */
.progress-container.dragging .progress-fill {
  transition: none;
}

.progress-handle {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #fffedc;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 0;
  cursor: grab;
  z-index: 3;
}

.progress-container:hover .progress-handle,
.progress-container.dragging .progress-handle {
  opacity: 1;
}

.progress-container.dragging .progress-handle {
  cursor: grabbing;
}

.progress-container:hover .progress-bar,
.progress-container.dragging .progress-bar {
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.progress-container.dragging .progress-handle {
  transform: translateY(-50%) scale(1.2);
}

.timecode-display {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  font-family: "SF Mono", "Monaco", "Inconsolata", "Roboto Mono", monospace;
  background: rgba(0, 0, 0, 0.9);
  padding: 4px 8px;
  border: 1px solid #33333300;
  margin: 0;
  min-width: 100px;
  text-align: center;
}

/* Stream Quality Indicator */
.quality-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: #fffedc;
  padding: 4px 8px;
  font-size: 10px;
  font-family: "SF Mono", monospace;
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.quality-indicator.show {
  opacity: 1;
}

.settings-menu {
  position: relative;
  margin: 0;
}

.cog-icon {
  width: 9px;
  height: 9px;
  position: relative;
  display: inline-block;
  overflow: visible;
}

.cog-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #b40096;
  border-radius: 0;
  transform: translate(-50%, -50%);
  box-shadow:
    0 -4.5px 0 0 #b40096,
    3px -3px 0 0 #b40096,
    4.5px 0 0 0 #b40096,
    3px 3px 0 0 #b40096,
    0 4.5px 0 0 #b40096,
    -3px 3px 0 0 #b40096,
    -4.5px 0 0 0 #b40096,
    -3px -3px 0 0 #b40096;
  transition: all 0.2s ease;
  z-index: 1;
}

.cog-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  background: #0a0a0a;
  border-radius: 0;
  transform: translate(-50%, -50%);
  z-index: 2;
  transition: all 0.2s ease;
}

.control-icon:hover .cog-icon::before {
  background: #fffedc;
  box-shadow:
    inset 0 0 0 2px transparent,
    0 -4.5px 0 -1px #fffedc,
    3px -3px 0 -1px #fffedc,
    4.5px 0 0 -1px #fffedc,
    3px 3px 0 -1px #fffedc,
    0 4.5px 0 -1px #fffedc,
    -3px 3px 0 -1px #fffedc,
    -4.5px 0 0 -1px #fffedc,
    -3px -3px 0 -1px #fffedc;
  transform: translate(-50%, -50%) rotate(22.5deg);
}

/* Visualizer Icon */
.visualizer-icon::before {
  content: "";
  display: block;
  width: 16px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) 1px 8px / 2px 6px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 6px / 2px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 7px 4px / 2px 10px no-repeat,
    linear-gradient(currentColor, currentColor) 10px 6px / 2px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 13px 8px / 2px 6px no-repeat;
}

.mixer-icon {
  width: 16px;
  height: 12px;
  position: relative;
}

.mixer-icon::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 12px;
  background: currentColor;
  box-shadow:
    4px 0 0 currentColor,
    8px 0 0 currentColor,
    12px 0 0 currentColor;
}

.mixer-icon::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 2px;
  width: 4px;
  height: 2px;
  background: currentColor;
  box-shadow:
    4px 4px 0 currentColor,
    8px -1px 0 currentColor,
    12px 6px 0 currentColor;
}

/* Keyboard Help Icon */
.keyboard-icon::before {
  content: "";
  display: block;
  width: 18px;
  height: 12px;
  border: 1px solid currentColor;
  position: relative;
  background:
    linear-gradient(currentColor, currentColor) 2px 8px / 2px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 5px 8px / 2px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 8px 8px / 6px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 2px 5px / 2px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 5px 5px / 2px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 8px 5px / 2px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 11px 5px / 2px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 2px 2px / 2px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 5px 2px / 2px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 8px 2px / 2px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 11px 2px / 2px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 14px 2px / 2px 2px no-repeat;
}

.settings-menu .settings-dropdown {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: fit-content;
  width: auto;
  display: none;
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-radius: 0;
}

.settings-menu .settings-dropdown.show {
  display: block;
}

.settings-menu .settings-dropdown .menu-item,
.settings-menu .submenu .submenu-item {
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  line-height: 16px !important;
  padding: 0px 1px !important;
  font-family:
    "Favourite Mono Medium", "SF Mono", "Monaco", "Inconsolata", "Roboto Mono",
    monospace !important;
  display: block !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.settings-menu .settings-dropdown .menu-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #fffedc !important;
  cursor: pointer !important;
  position: relative !important;
}

.settings-menu .settings-dropdown .menu-item:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fffedc !important;
}

.settings-menu .submenu .submenu-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  font-size: 12px !important;
  font-weight: 300 !important;
  color: #fffedc !important;
  cursor: pointer !important;
}

.settings-menu .submenu .submenu-item:hover {
  background: #b40096 !important;
  color: #fffedc !important;
}

.settings-menu .submenu .submenu-item.selected {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fffedc !important;
}

.menu-item:last-child {
  border-bottom: none;
}

.submenu-item:last-child {
  border-bottom: none;
}

.submenu {
  position: fixed;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 0;
  min-width: 200px;
  max-width: 300px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1001;
  display: none;
  font-family:
    "Favourite Mono Medium", "SF Mono", "Monaco", "Inconsolata", "Roboto Mono",
    monospace;
}

.submenu.show {
  display: block;
}

.menu-item.has-submenu::after {
  content: "▶";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #b40096;
}

/* Hide triangle for metadata menu items */
.menu-item.metadata-menu-item::after {
  display: none;
}

/* Metadata submenu styling - position below menu item and grow upward */
.submenu.metadata-submenu {
  max-height: 400px;
  transform-origin: bottom left;
}

.submenu-item.metadata-item {
  padding: 4px 8px;
  font-size: 11px;
  min-height: auto;
  cursor: default;
  color: var(--title-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.submenu-item.metadata-item:first-child {
  border-bottom: none;
}

.submenu-item.metadata-item:hover {
  background: transparent;
}

.submenu-item.metadata-item .meta-label {
  color: var(--film-gray-500);
  margin-right: 6px;
}

.volume-slider {
  width: 100px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #fffedc;
  cursor: pointer;
  border: 0;
  border-radius: 0 !important;
  box-shadow: none;
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #fffedc;
  cursor: pointer;
  border: 0;
  border-radius: 0 !important;
  box-shadow: none;
}

.subtitle-overlay {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fffedc;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  max-width: 80%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.subtitle-overlay.show {
  opacity: 1;
}

/* Info Modal */
.info-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--background-black);
  border: 1px solid var(--heading-cyan);
  padding: 2rem;
  z-index: 10000;
  display: none;
  max-width: 500px;
  width: 90%;
  text-align: center;
}

.info-modal.show {
  display: block;
}

.info-modal h3 {
  color: var(--heading-cyan);
  margin-bottom: 1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-modal p {
  color: var(--title-white);
  margin-bottom: 1.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
}

.info-modal button {
  background: var(--film-purple);
  color: var(--title-white);
  border: none;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  transition: background 0.2s ease;
}

.info-modal button:hover {
  background: rgba(180, 0, 150, 0.8);
}

/* Keyboard Shortcuts Help Panel */
.keyboard-help-panel {
  position: absolute;
  top: 0.65rem;
  left: 1rem;
  background: transparent;
  border: none;
  padding: 0;
  z-index: 10000;
  display: none;
}

.keyboard-help-panel.show {
  display: block;
}

/* Dim video when keyboard shortcuts are shown */
.video-wrapper:has(.keyboard-help-panel.show) video {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.keyboard-help-panel h3 {
  color: var(--title-white);
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  font-family:
    "Favourite Mono Medium", "SF Mono", "Monaco", "Inconsolata", "Roboto Mono",
    monospace;
  font-weight: 400;
  letter-spacing: -0.035em;
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
}

.shortcuts-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
}

.shortcuts-column {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.shortcuts-section {
  margin-bottom: 0.5rem;
}

.shortcuts-section:last-child {
  margin-bottom: 0;
}

.shortcuts-section-title {
  color: var(--film-gray-500);
  font-size: 0.55rem;
  text-transform: uppercase;
  font-family:
    "Favourite Mono Medium", "SF Mono", "Monaco", "Inconsolata", "Roboto Mono",
    monospace;
  font-weight: 500;
  margin-bottom: 0.25rem;
  letter-spacing: 0.3px;
}

@keyframes letterFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.keyboard-shortcut {
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
  align-items: center;
}

.keyboard-shortcut .letter {
  display: inline-block;
  opacity: 0;
  white-space: pre;
}

.keyboard-help-panel.show .letter {
  animation: letterFadeIn 0.025s ease-out forwards;
}

.keyboard-shortcut:last-child {
  margin-bottom: 0;
}

.shortcut-key {
  background: transparent;
  color: var(--heading-cyan);
  padding: 0;
  font-family:
    "Favourite Mono Medium", "SF Mono", "Monaco", "Inconsolata", "Roboto Mono",
    monospace;
  font-size: 0.55rem;
  text-align: left;
  border: none;
  font-weight: 400;
  flex-shrink: 0;
}

.shortcut-description {
  color: var(--title-white);
  font-size: 0.55rem;
  font-family:
    "Favourite Mono Medium", "SF Mono", "Monaco", "Inconsolata", "Roboto Mono",
    monospace;
  font-weight: 400;
  text-align: left;
}

.keyboard-help-close {
  display: none; /* Removed close button */
}

.loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loading-indicator.show {
  opacity: 1;
}

.loading-letters {
  fill: #b40096;
}

.loading-corners {
  stroke: #b40096;
  stroke-width: 5;
  fill: none;
  stroke-linejoin: miter;
  stroke-linecap: square;
}

.corner-1 {
  animation: cornerFade 2.1s infinite;
  animation-delay: 0s;
}

.corner-2 {
  animation: cornerFade 2.1s infinite;
  animation-delay: 0.525s;
}

.corner-3 {
  animation: cornerFade 2.1s infinite;
  animation-delay: 1.05s;
}

.corner-4 {
  animation: cornerFade 2.1s infinite;
  animation-delay: 1.575s;
}

@keyframes cornerFade {
  0% {
    opacity: 0.1;
  }
  3% {
    opacity: 0.2;
  }
  6% {
    opacity: 0.4;
  }
  9% {
    opacity: 0.7;
  }
  12.5% {
    opacity: 1;
  }
  16% {
    opacity: 0.7;
  }
  19% {
    opacity: 0.4;
  }
  22% {
    opacity: 0.2;
  }
  25% {
    opacity: 0.1;
  }
  100% {
    opacity: 0.1;
  }
}

.notification-container {
  position: absolute;
  top: 10px;
  bottom: 65px; /* Stop before reaching playbar */
  right: 10px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  overflow: hidden; /* Hide notifications that would extend beyond available space */
}

.notification {
  background: transparent;
  color: var(--title-white);
  padding: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.35rem;
  font-weight: 400;
  border: none;
  letter-spacing: 0.3px;
  opacity: 0.8;
  text-align: right;
}

/* Play/Pause Icon Styles */
.play-icon::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-left: 12px solid currentColor;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 2px;
}

.pause-icon::before {
  content: "";
  display: block;
  width: 10px;
  height: 16px;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 3px 16px no-repeat,
    linear-gradient(currentColor, currentColor) 7px 0 / 3px 16px no-repeat;
}

.stop-icon::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  background: currentColor;
}

.fullscreen-icon::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  position: relative;
  background:
    linear-gradient(currentColor, currentColor) 2px 2px / 6px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 2px 2px / 2px 6px no-repeat,
    linear-gradient(currentColor, currentColor) 8px 2px / 6px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 12px 2px / 2px 6px no-repeat,
    linear-gradient(currentColor, currentColor) 2px 12px / 6px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 2px 8px / 2px 6px no-repeat,
    linear-gradient(currentColor, currentColor) 8px 12px / 6px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 12px 8px / 2px 6px no-repeat;
}

.fullscreen-icon::after {
  display: none;
}

.progress-tooltip {
  position: absolute;
  bottom: 20px;
  background: rgba(0, 0, 0, 0.9);
  color: #fffedc;
  padding: 4px 8px;
  font-size: 10px;
  font-family: "SF Mono", monospace;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
  white-space: nowrap;
}

.progress-tooltip.show {
  opacity: 1;
}

/* Audio Mixer Module - appears below video player */
.audio-mixer-module {
  display: none;
  margin-top: 1rem;
}

.audio-mixer-module.show {
  display: block;
}

.audio-mixer-overlay {
  position: relative;
  background: transparent;
}

.audio-mixer-panel {
  background: var(--background-black);
  border: 1px solid var(--field-gray);
  border-radius: 0;
  padding: 1rem;
  overflow-x: auto;
  position: relative;
}

.audio-mixer-panel .mixer-header {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.mixer-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--heading-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mixer-channels {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  flex-wrap: nowrap;
}

.mixer-fader-channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.mixer-fader-track {
  width: 4px;
  height: 80px;
  background: var(--field-gray);
  position: relative;
  border-radius: 0;
}

.mixer-fader-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--heading-cyan);
  transition: height 0.05s ease-out;
  border-radius: 0;
}

.mixer-fader-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--film-gray-500);
  text-align: center;
}

.mixer-fader-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  color: var(--film-gray-700);
  text-align: center;
  min-width: 30px;
  transition: color 0.15s ease;
}

.mixer-fader-value.active {
  color: #fffedc; /* Film off-white when audio is active */
}

.mixer-channel-controls {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 0px;
}

.mixer-channel-number {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--film-gray-500);
  text-align: center;
  margin-bottom: 5px;
  margin-top: 1px;
}

.mixer-channel-btn {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 500;
  width: 100%;
  min-width: 20px;
  padding: 2px 4px;
  border: 1px solid var(--field-gray);
  background: transparent;
  color: var(--film-gray-500);
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.mixer-channel-btn:hover {
  border-color: var(--heading-cyan);
  color: var(--heading-cyan);
}

.mixer-channel-btn[data-type="mute"]:hover {
  border-color: var(--film-purple);
  color: var(--film-purple);
}

.mixer-channel-btn.solo-active {
  background: var(--heading-cyan);
  border-color: var(--heading-cyan);
  color: var(--background-black);
}

.mixer-channel-btn.mute-active {
  background: var(--film-purple);
  border-color: var(--film-purple);
  color: var(--title-white);
}

.mixer-separator {
  width: 1px;
  height: 120px;
  background: var(--field-gray);
  margin: 0 0.5rem;
  align-self: center;
}

.mixer-master .mixer-fader-fill {
  background: var(--film-purple);
}

.mixer-master .mixer-fader-label {
  color: var(--film-purple);
}

.mixer-close-btn {
  display: none; /* Removed close button */
}

.audio-mixer-panel .mixer-channels {
  padding: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  flex-wrap: nowrap;
}

.mixer-channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 32px;
}

.channel-label {
  font-family: "SF Mono", "Monaco", "Inconsolata", "Roboto Mono", monospace;
  font-size: 8px;
  color: #fffedc;
  font-weight: 500;
  text-align: center;
  margin-bottom: 2px;
  line-height: 1;
  max-width: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.mixer-button {
  width: 18px;
  height: 12px;
  background: #333333;
  border: 1px solid #666666;
  color: #fffedc;
  font-family: "SF Mono", "Monaco", "Inconsolata", "Roboto Mono", monospace;
  font-size: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  padding: 0;
}

.mixer-button:hover {
  background: #8000ff;
  border-color: #8000ff;
  color: #fffedc;
}

.mixer-button.active {
  background: #ff00ff;
  border-color: #ff00ff;
  color: #000000;
  font-weight: bold;
}

.mixer-button.mute.active {
  background: #333333;
  border-color: #ff1493;
  color: #ff1493;
}

.mixer-button.solo.active {
  background: #0080ff;
  border-color: #0080ff;
  color: #fffedc;
}

.fader-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.channel-meter {
  width: 4px;
  height: 60px;
  background: #333;
  position: relative;
  overflow: hidden;
}

.channel-meter::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--meter-height, 0%);
  background: linear-gradient(
    to top,
    #0080ff 0%,
    #0040ff 30%,
    #4000ff 60%,
    #8000ff 80%,
    #ff00ff 90%
  );
  transition: height 0.1s ease;
}

.fade-slider {
  width: 4px;
  height: 60px;
  -webkit-appearance: none;
  appearance: none;
  background: #333;
  outline: none;
  cursor: pointer;
  transform: rotate(180deg);
  border: 0;
  writing-mode: bt-lr;
}

.fade-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 4px;
  height: 6px;
  background: #fffedc;
  cursor: pointer;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.fade-slider::-moz-range-thumb {
  width: 4px;
  height: 6px;
  background: #fffedc;
  cursor: pointer;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.fade-slider::-webkit-slider-track {
  background: #333;
  border-radius: 0 !important;
}

.fade-slider::-moz-range-track {
  background: #333;
  border-radius: 0 !important;
}

.fade-value {
  font-family: "SF Mono", "Monaco", "Inconsolata", "Roboto Mono", monospace;
  font-size: 6px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  margin-top: 2px;
  min-height: 8px;
  line-height: 1;
}

/* Channel type color coding */
.mixer-channel[data-type="bed"] .channel-label {
  color: #00ff00;
}

.mixer-channel[data-type="object"] .channel-label {
  color: #ff6600;
}

.mixer-channel[data-type="height"] .channel-label {
  color: #00ffff;
}

@media (max-width: 768px) {
  .main-controls {
    gap: 4px;
  }

  .progress-container {
    margin: 0 8px;
  }

  .mixer-channel {
    min-width: 0;
  }

  .channel-label {
    font-size: 7px;
  }
}

/* Theatre Mode - fade everything except video to black */
body.theatre-mode .filmprocessor-header,
body.theatre-mode .page-title,
body.theatre-mode .page-subtitle,
body.theatre-mode .controls-overlay,
body.theatre-mode .audio-mixer-module,
body.theatre-mode .keyboard-help-panel,
body.theatre-mode .upload-drop-zone,
body.theatre-mode .notification-container,
body.theatre-mode .quality-indicator,
body.theatre-mode .loading-indicator {
  opacity: 0 !important;
  transition: opacity 1s ease;
}

body:not(.theatre-mode) .filmprocessor-header,
body:not(.theatre-mode) .page-title,
body:not(.theatre-mode) .page-subtitle,
body:not(.theatre-mode) .notification-container {
  transition: opacity 1s ease;
}

/* Fade out player container border */
body.theatre-mode .player-container {
  border-color: black;
  transition: border-color 1s ease;
}

body:not(.theatre-mode) .player-container {
  transition: border-color 1s ease;
}

/* Ensure video stays visible */
body.theatre-mode .video-wrapper {
  background: #000;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

body.theatre-mode #videoPlayer {
  opacity: 1 !important;
  border: none !important;
  outline: none !important;
}

/* ===== CODEC REFERENCE PANEL ===== */
.codec-ref-panel {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: rgba(0, 0, 0, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 9999;
  font-family:
    "Favourite Mono Medium", "SF Mono", "Monaco", "Inconsolata", "Roboto Mono",
    monospace;
}

.codec-ref-panel.show {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
}

.codec-ref-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1;
}

.codec-ref-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--heading-cyan);
  letter-spacing: 0.5px;
  font-family:
    "Favourite Mono Medium", "SF Mono", "Monaco", "Inconsolata", "Roboto Mono",
    monospace;
}

.codec-ref-close {
  background: transparent;
  border: none;
  color: var(--film-gray-500);
  font-size: 18px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
  line-height: 1;
}

.codec-ref-close:hover {
  color: var(--title-white);
}

.codec-ref-scroll {
  overflow-y: auto;
  padding: 0;
  flex: 1;
}

.codec-ref-scroll::-webkit-scrollbar {
  width: 6px;
}

.codec-ref-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

.codec-ref-scroll::-webkit-scrollbar-thumb {
  background: var(--film-gray-500);
  border-radius: 3px;
}

.codec-ref-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--film-gray-700);
}

/* Category Sections */
.codec-category {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.codec-category-header {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
  font-size: 10px;
  font-weight: 600;
  color: var(--film-purple);
  letter-spacing: 0.5px;
}

.codec-category-header:hover {
  background: rgba(180, 0, 150, 0.1);
}

.codec-toggle {
  font-size: 10px;
  color: var(--film-gray-500);
  transition: transform 0.2s ease;
}

.codec-category-content {
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.codec-category-content.collapsed {
  max-height: 0;
}

/* Codec Entries */
.codec-entry {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.codec-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--title-white);
  margin-bottom: 4px;
  font-family:
    "Favourite Mono Medium", "SF Mono", "Monaco", "Inconsolata", "Roboto Mono",
    monospace;
}

.codec-detail {
  font-size: 10px;
  padding: 2px 0;
  display: flex;
  line-height: 1.4;
}

.codec-label {
  color: var(--film-gray-500);
  margin-right: 6px;
  min-width: 80px;
  flex-shrink: 0;
}

.codec-value {
  color: var(--title-white);
  opacity: 0.9;
}

.codec-value.tier-1 {
  color: var(--dcp-success);
}

.codec-value.tier-3 {
  color: var(--film-purple);
}

/* Info Items (for simpler entries) */
.codec-info-item {
  padding: 4px 12px;
  font-size: 10px;
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.codec-info-item:last-child {
  border-bottom: none;
}

/* Subsections */
.codec-subsection {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.codec-subsection:last-child {
  border-bottom: none;
}

.codec-subsection-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--heading-cyan);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .codec-ref-panel {
    width: 95%;
    max-width: none;
    max-height: 85vh;
  }

  .codec-ref-header {
    padding: 6px 10px;
  }

  .codec-ref-title {
    font-size: 10px;
  }

  .codec-category-header {
    padding: 6px 10px;
    font-size: 9px;
  }

  .codec-entry,
  .codec-info-item,
  .codec-subsection {
    padding: 6px 10px;
  }

  .codec-name {
    font-size: 10px;
  }

  .codec-detail,
  .codec-info-item {
    font-size: 9px;
  }

  .codec-label {
    min-width: 70px;
  }
}
