/* styles.css - Modern, Premium Glassmorphism Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #080c14;
  --panel-bg: rgba(15, 23, 42, 0.65);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-glow: rgba(6, 182, 212, 0.15);
  
  --primary: #06b6d4;      /* Neon Cyan */
  --primary-hover: #22d3ee;
  --primary-glow: rgba(6, 182, 212, 0.4);
  
  --secondary: #10b981;    /* Neon Emerald */
  --secondary-glow: rgba(16, 185, 129, 0.3);
  
  --warning: #f59e0b;      /* Amber */
  --error: #ef4444;        /* Rose Red */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #475569;
  
  --font-family: 'Outfit', sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-lg: 16px;
  --radius-md: 10px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-image: 
    radial-gradient(at 10% 20%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
}

/* Header */
header {
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  background-color: rgba(8, 12, 20, 0.5);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #080c14;
  font-weight: 800;
  font-size: 1.1rem;
}

.privacy-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-weight: 500;
}

.privacy-badge::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
  transition: var(--transition);
}

/* App Layout */
.app-container {
  display: grid;
  grid-template-columns: 350px 1fr;
  flex: 1;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem;
  gap: 1.5rem;
  height: calc(100vh - 72px);
  overflow: hidden;
}

/* Sidebar Controls with Custom Premium Scrollbar */
.controls-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: 100%;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.controls-sidebar::-webkit-scrollbar {
  width: 6px;
}

.controls-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.controls-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.controls-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title i {
  color: var(--primary);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.value-display {
  color: var(--primary);
  font-weight: 600;
}

/* Switches and Toggles */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.toggle-label {
  font-weight: 500;
  font-size: 0.95rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--text-dark);
  transition: var(--transition);
  border-radius: 24px;
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-main);
  transition: var(--transition);
  border-radius: 50%;
}

input:checked + .slider-switch {
  background-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

input:checked + .slider-switch:before {
  transform: translateX(24px);
}

/* Sliders */
.slider-input {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--text-dark);
  border-radius: 3px;
  outline: none;
  transition: var(--transition);
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 8px var(--primary-glow);
  transition: var(--transition);
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Button Groups (Mask Styles) */
.style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.style-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.style-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.style-btn.active {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 12px var(--panel-glow);
}

.style-btn i {
  font-size: 1.25rem;
}

/* Emoji Selector */
#emoji-selector-wrapper {
  display: none;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  max-height: 120px;
  overflow-y: auto;
  padding: 0.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
}

.emoji-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  padding: 0.25rem;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
}

.emoji-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.15);
}

.emoji-btn.active {
  background: rgba(6, 182, 212, 0.15);
  box-shadow: inset 0 0 0 1px var(--primary);
}

/* Brush Tools */
.brush-controls {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.brush-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.6rem;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.brush-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.brush-btn.active {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--secondary);
  color: var(--secondary);
  box-shadow: 0 0 8px var(--secondary-glow);
}

.brush-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Main Workspace */
.workspace-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
  overflow: hidden;
}

/* Camera and Output Display Frame */
.video-display-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  background: #04060b;
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
  min-height: 250px;
}

.video-element-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.canvas-output {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: calc(100vh - 250px);
  object-fit: contain;
  transform: scaleX(-1); /* Mirror by default for webcam */
}

/* When processing uploaded files, do not mirror */
.canvas-output.no-mirror {
  transform: scaleX(1);
}

.canvas-output.brush-drawing {
  cursor: crosshair;
}

/* Floating HUD / Overlay */
.status-hud {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(8, 12, 20, 0.8);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  backdrop-filter: blur(8px);
  display: flex;
  gap: 1.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  pointer-events: none;
  z-index: 5;
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hud-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-dark);
}

.hud-indicator.active {
  background-color: var(--secondary);
  box-shadow: 0 0 6px var(--secondary-glow);
}

.hud-indicator.loading {
  background-color: var(--warning);
  box-shadow: 0 0 6px var(--warning);
  animation: pulse 1.2s infinite alternate;
}

/* Control Action Bar */
.action-bar {
  display: flex;
  gap: 1rem;
  justify-content: center;
  width: 100%;
  padding: 1rem 1.5rem;
  background: rgba(8, 12, 20, 0.5);
  border-top: 1px solid var(--panel-border);
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  color: var(--text-main);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.action-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.action-btn:active {
  transform: translateY(0);
}

.action-btn.btn-primary {
  background: var(--primary);
  color: #080c14;
  border-color: var(--primary);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.action-btn.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.action-btn.btn-secondary {
  background: var(--secondary);
  color: #080c14;
  border-color: var(--secondary);
  box-shadow: 0 4px 14px var(--secondary-glow);
}

.action-btn.btn-secondary:hover:not(:disabled) {
  background: #34d399;
  box-shadow: 0 6px 18px var(--secondary-glow);
}

.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* Upload Dropzone Drop Area */
.upload-dropzone {
  background: var(--panel-bg);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(6, 182, 212, 0.05);
  color: var(--text-main);
}

.upload-icon {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.file-input {
  display: none;
}

.upload-dropzone p {
  font-size: 0.95rem;
}

.upload-dropzone span {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Processing Overlay / Modal */
.processing-overlay {
  display: none; /* Controlled by JS */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 20, 0.9);
  z-index: 50;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  backdrop-filter: blur(10px);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 15px var(--panel-glow);
}

.progress-container {
  width: 80%;
  max-width: 400px;
  background: var(--text-dark);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.1s ease;
  box-shadow: 0 0 10px var(--primary-glow);
}

.progress-text {
  font-weight: 500;
  font-size: 1rem;
}

.progress-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Utility Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Mobile Bottom Sheet & Native App Layout */
.bottom-sheet-handle {
  display: none; /* Hidden on desktop */
}

.bottom-sheet-backdrop {
  display: none; /* Hidden on desktop */
}

.sidebar-scroll-content {
  /* In desktop, behave as a simple container */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  /* Lock page scroll */
  body {
    height: 100vh;
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  .app-container {
    height: calc(100vh - 60px); /* Fill space below header */
    grid-template-columns: 1fr;
    grid-template-rows: 1fr; /* Video panel takes entire container */
    position: relative;
    overflow: hidden;
  }

  /* Overlay header at top of camera stream */
  header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 200;
    background: rgba(8, 12, 20, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .privacy-badge {
    display: none; /* Hide default badge to save header space */
  }

  /* Expand video panel to full screen */
  .video-display-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100% !important;
    max-height: 100% !important;
    padding: 0;
    margin: 0;
    background: #000;
    z-index: 10;
    border-radius: 0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .canvas-output {
    width: 100%;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0;
    border: none;
  }

  /* Floating mobile action bar */
  .action-bar {
    position: absolute;
    bottom: 75px; /* Sits cleanly above the closed bottom sheet handle */
    left: 0;
    width: 100%;
    background: transparent;
    border-top: none;
    backdrop-filter: none;
    z-index: 130;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 0 1rem;
    pointer-events: auto;
  }

  .action-btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
    border-radius: 50px; /* Rounded pill buttons for mobile */
  }

  /* Slide-up Bottom Sheet */
  .controls-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70vh;
    z-index: 150;
    background: rgba(13, 20, 32, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px 24px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(calc(100% - 60px)); /* Hide everything except the 60px handle */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .controls-sidebar.sheet-open {
    transform: translateY(0);
  }

  /* Scrollable inner content for bottom sheet */
  .sidebar-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    padding-bottom: 3rem; /* Extra space at bottom to scroll past content */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  /* Native Handle Tab styling */
  .bottom-sheet-handle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60px;
    min-height: 60px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    user-select: none;
    z-index: 160;
  }

  .bottom-sheet-handle .handle-bar {
    width: 40px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.25);
    margin-bottom: 6px;
    transition: background 0.3s;
  }

  .bottom-sheet-handle:hover .handle-bar {
    background: rgba(255, 255, 255, 0.45);
  }

  .bottom-sheet-handle span {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  /* Blur Backdrop overlay when sheet is expanded */
  .bottom-sheet-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 140;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .bottom-sheet-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Adjust dropzone and HUD overlays for mobile screens */
  .upload-dropzone {
    padding: 1.5rem;
    gap: 0.5rem;
  }

  .upload-icon {
    font-size: 2.2rem;
  }

  .status-hud {
    top: 75px; /* Position below header */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    justify-content: space-around;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 968px) and (min-width: 769px) {
  .app-container {
    grid-template-columns: 1fr;
  }
  
  .canvas-output {
    max-height: 480px;
  }
  
  .video-display-panel {
    min-height: 480px;
  }
}

/* Floating Camera Flip button */
.floating-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 50;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(13, 20, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

.floating-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.floating-btn:active {
  transform: translateY(0) scale(0.95);
}

@media (max-width: 768px) {
  .floating-btn {
    top: 135px; /* Sits cleanly below header overlay and HUD overlay */
    right: 1.25rem;
  }
}

/* Floating Recording Timer Badge */
.recording-timer {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 50px;
  padding: 0.4rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ef4444;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.recording-timer .red-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse 1s infinite alternate;
}

/* Floating Download Confirmation Banner */
.download-banner {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  background: rgba(13, 20, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 0.5rem 1rem 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.close-banner-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  padding: 0 0.2rem;
}
.close-banner-btn:hover {
  color: #f87171;
}

@media (max-width: 768px) {
  .recording-timer {
    top: 135px; /* Sits below header overlay and HUD */
  }
  .download-banner {
    top: 135px;
    width: 90%;
    justify-content: space-between;
    border-radius: var(--radius-lg);
    padding: 0.6rem 1rem;
  }
}
