@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500&family=Roboto:wght@400;700&display=swap');:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}


html, body {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overscroll-behavior: none;
  background: linear-gradient(135deg, #0f2027 0%, #2c5364 40%, #1a2980 100%);
}

#root {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  text-align: center;
  background: transparent;
  /* Remove max-width and margin auto for mobile */
}

@media (max-width: 1280px) {
  #root {
    max-width: 100vw;
  }
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}

.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}

.logo.react:hover {
  filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  a:nth-of-type(2) .logo {
    animation: logo-spin infinite 20s linear;
  }
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Orbitron', 'Roboto', Arial, sans-serif;
  background: linear-gradient(135deg, #0f2027 0%, #2c5364 40%, #1a2980 100%);
  min-height: 100vh;
}

.App {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 3vh;
  background: linear-gradient(135deg, #0f2027 0%, #2c5364 40%, #1a2980 100%);
}

.App.with-side-padding {
  padding-left: 180px;
  padding-right: 180px;
  padding-bottom: 180px; /* Add this for bottom controls */
}

@media (max-width: 1280px) {
  .App.with-side-padding {
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 180px; /* Add this for bottom controls */
  }
}

.searchtools-sticky {
  position: relative;
  display: flex;
  justify-content: center;
  height: 10vh;
  transition:
    background .3s .5s,
    transform 0.5s cubic-bezier(.4,2,.6,1) .5s,
    opacity 0.5s cubic-bezier(.4,2,.6,1) .5s,
    left 0.5s cubic-bezier(.4,2,.6,1) .5s,
    top 0.5s cubic-bezier(.4,2,.6,1) .5s;
  z-index: 20;
  will-change: transform, opacity, top, left, width, background, box-shadow;
  transform: none;
  opacity: 1;
}

/* Hide mobile search tools unless sticky */

@media (max-width: 600px) {
  .mobile-only .searchtools-sticky:not(.active):not(.force-sticky) {
    display: none !important;
  }
}

.searchtools-sticky.force-sticky,
.searchtools-sticky.active {
  position: fixed;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 15vh;
  max-width: 900px;
  background-color: rgb(28, 241, 209, 0.25);
  transform: translateX(-50%) translateY(0);
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  padding: 8px 0 4px 0; /* Remove the calc() padding */
  border-radius: 0 0 16px 16px;
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  user-select: none;
  transition:
    background .3s .5s,
    transform 0.5s cubic-bezier(.4,2,.6,1) .5s,
    opacity 0.5s cubic-bezier(.4,2,.6,1) .5s,
    left 0.5s cubic-bezier(.4,2,.6,1) .5s,
    top 0.5s cubic-bezier(.4,2,.6,1) .5s;
  z-index: 20;
  opacity: 1;
}

/* Add mobile-specific safe area padding */

@media (max-width: 600px) {
  .searchtools-sticky.force-sticky,
  .searchtools-sticky.active {
    padding-top: calc(env(safe-area-inset-top, 0px) + 8px);
  }
}

.searchtools-handle:hover,
.searchtools-handle:active {
  background: #1cf1d1;
}

h2 {
  font-family: 'Orbitron', 'Roboto', Arial, sans-serif;
  font-size: 2.5rem;
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 3rem;
  text-shadow: 0 2px 16px #1a2980, 0 1px 0 #fff;
}

video {
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(26,41,128,0.4), 0 1.5px 8px 0 #000;
  border: 2px solid #5f7fff;
  background: #000;
  margin-bottom: 2rem;
  transition: box-shadow 0.3s;
}

video:focus, video:hover {
  box-shadow: 0 12px 48px 0 rgba(26,41,128,0.7), 0 2px 12px 0 #000;
  outline: none;
}

/* App.css */

.recordings-list-floating {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  max-width: 900px;
  z-index: 1001;
  box-shadow: 0 2px 16px #1a2980, 0 1px 0 #fff1;
  border-radius: 18px 18px 0 0;
  background: rgba(20,30,60,0.97);
  transition:
    bottom 0.7s cubic-bezier(.4,2,.6,1),
    transform 0.7s cubic-bezier(.4,2,.6,1);
  will-change: bottom, transform;
  overflow: hidden;
  /* Remove margin and padding that would push it down */
  margin: 0 !important;
  padding-bottom: 0 !important;
}

.recordings-list-floating.closed {
  bottom: -60vh; /* Hide most of the list off-screen */
  /* Only the handle is visible (adjust as needed) */
}

.recordings-list-floating.open {
  bottom: 0;
}

/* App.css */

.recordings-list-handle-floating {
  /* Already styled inline, but you can add more here if needed */
  animation: handle-peek 0.7s cubic-bezier(.4,2,.6,1);
}

.recordings-list-handle-parent {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(20,30,60,0.97);
}

@keyframes handle-peek {
  from { opacity: 0; transform: translateX(-50%) translateY(32px);}
  to   { opacity: 1; transform: translateX(-50%) translateY(0);}
}

/* ...existing code... */

.recordings-list {
  margin: 2em auto;
  max-width: 900px;
  max-height: 60vh; /* Limit height for scrolling */
  width: 90vw;
  background: rgba(20,30,60,0.7);
  border-radius: 18px;
  overflow-y: auto;
  padding: 1.5em 1em;
  box-shadow: 0 2px 16px #1a2980, 0 1px 0 #fff1;
  transition:
    box-shadow 0.5s cubic-bezier(.4,2,.6,1),
    background 0.5s cubic-bezier(.4,2,.6,1),
    transform 0.7s cubic-bezier(.4,2,.6,1);
  /* Add translateY for unfocused state */
  transform: translateY(10vh);
}

.recordings-list:focus,
.recordings-list:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* ...existing code... */

.recordings-list h3 {
  color: #fff;
  font-family: 'Orbitron', 'Roboto', Arial, sans-serif;
  margin-bottom: 1em;
}

/* App.css */

.recordings-list-handle:focus,
.recordings-list-handle:hover {
  background: #1976d2; /* or any highlight color you want */
  box-shadow: 0 2px 8px #2196f388;
}

.recordings-list-handle-parent {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

@keyframes record-blink {
        0% { opacity: 1; }
        50% { opacity: 0.2; }
        100% { opacity: 1; }
      }

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.timestamp {
  font-family: 'Roboto Mono', monospace;
  color: #fff;
  font-size: 1em;
}

.new-badge {
  background: #ff5f5f;
  color: #fff;
  border-radius: 8px;
  padding: 0.2em 0.7em;
  margin-left: 1em;
  font-size: 0.9em;
  font-weight: bold;
  letter-spacing: 1px;
}

.recordings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%/2, max(180px, 100%/5)), 1fr));
  gap: 1.2em;
  margin-top: 1em;
}

.recording-thumb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.recording-thumb-link {
  background: #232b4a;
  border: none;
  border-radius: 14px;
  padding: 0.5em;
  cursor: pointer;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.2s;
  box-shadow: 0 2px 8px #1a2980aa;
}

/* Prevent text selection on recording thumbs */

.recording-thumb-link,
.recording-thumb-link * {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Prevent image drag */

.recording-thumb img,
.recording-thumb-link img {
  pointer-events: none;
  -webkit-user-drag: none;
/*   user-drag: none; */
}

.recording-thumb-link:hover {
  background: #2c3e70;
}

.recording-thumb {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.5em;
  box-shadow: 0 1px 6px #0008;
}

.recording-actions {
  display: flex;
  flex-direction: row;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  h2 {
    font-size: 1.5rem;
  }
  video {
    width: 98vw !important;
    max-width: 100vw !important;
  }
  .with-side-padding {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

.recordings-list {
    width: 100vw;
    max-width: 100vw;
    margin: 1em 0 !important;
    border-radius: 0;
    padding-left: 0.5em;
    padding-right: 0.5em;
  }

@media (max-width: 1280px) {
  /* Hide fixed toggles on mobile */
  .fixed-toggle {
    display: none !important;
  }
  .floating-menu-btn {
    display: block !important;
  }
}

.stream-video-container {
  position: relative;
  width: 80vw;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  /* Optional: add top/bottom margin for spacing */
}

@media (max-width: 600px) {
  .stream-video-container {
    width: 98vw;
    max-width: 100vw;
  }
}

/* Nickname display */

.recording-nickname {
  font-family: 'Orbitron', 'Roboto', Arial, sans-serif;
  color: #8ef;
  font-weight: 700;
  font-size: 1.08em;
  margin-bottom: 2px;
  text-shadow: 0 1px 8px #1a2980;
}

/* Timestamp display */

.timestamp {
  font-size: 0.97em;
  color: #bcd;
  opacity: 0.7;
  margin-bottom: 2px;
  display: block;
}

/* Recording indicator */

.recording-indicator {
  position: fixed;
  top: 24px;
  right: 32px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 1.2em;
  pointer-events: none;
}

.recording-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: red;
  box-shadow: 0 0 8px 2px #f00;
  animation: record-blink 1s steps(1) infinite;
}

.recording-seconds {
  margin-left: 8px;
  color: #fff;
  background: #c00;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 0.95em;
}

/* Fixed toggles */

.fixed-toggle {
  position: fixed;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 1.1em;
  background: rgba(30,30,30,0.85);
  border-radius: 12px;
  padding: 6px 18px;
}

.fixed-toggle-bottom-80 {
  bottom: 80px;
  left: 32px;
}

.fixed-toggle-bottom-24 {
  bottom: 24px;
  left: 32px;
}

/* Ensure toggle labels are always white */

.fixed-toggle label,
.fixed-toggle label span,
.fixed-toggle label {
  color: #fff !important;
}

/* Also for floating toggles (if used) */

label[style*="align-items: center"] {
  color: #fff !important;
}

/* Reload button container */

.reload-btn-container {
  position: fixed;
  bottom: 24px;
  right: 32px;
  z-index: 2000;
  background: rgba(30,30,30,0.85);
  border-radius: 12px;
  padding: 6px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px #1a2980aa;
}

.reload-btn {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: 1.1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 4px #1a298055;
}

/* Floating menu button */

.floating-menu-btn {
  position: fixed;
  bottom: 24px;
  left: 32px;
  z-index: 2001;
  display: none; /* default hidden, shown via CSS on mobile */
}

.floating-menu-btn button {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  box-shadow: 0 2px 8px #1a2980aa;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

/* Floating menu popout */

.floating-menu-popout {
  position: fixed;
  bottom: 90px;
  left: 32px;
  z-index: 2000;
  background: rgba(30,30,30,0.97);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 4px 24px #1a2980cc;
  min-width: 220px;
  transition: transform 0.25s cubic-bezier(.4,2,.6,1), opacity 0.25s;
  transform: translateY(30px);
  opacity: 0;
  display: none;
}

.floating-menu-popout.open {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

.recording-select-checkbox {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 22px;
  height: 22px;
  accent-color: #1976d2;
  border: 2px solid #1976d2;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px #0003;
  cursor: pointer;
  display: block;
}

.recording-select-checkbox.visible {
  opacity: 1;
  pointer-events: auto;
}

.deselect-btn {
  position: absolute;
  top: 64px; /* Adjust top position based on delete button height */
  right: 16px;
  z-index: 11;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 8px #1a2980aa;
  cursor: pointer;
}

/* --- SearchTools popout menu styles --- */

.searchtools-popout {
  position: absolute;
  left: 10%;
  top: 100%;
  margin-top: 8px;
  z-index: 1000;
  background: rgba(30,30,30,0.97);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 4px 24px #1a2980cc;
  color: #fff;
  font-family: 'Orbitron', 'Roboto', Arial, sans-serif;
  font-size: 1.08em;
  transition: transform 0.25s cubic-bezier(.4,2,.6,1), opacity 0.25s;
  transform: translateY(0);
  opacity: 1;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  display: block;
}

.searchtools-popout-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.searchtools-popout label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 500;
}

/* Hide on mobile, show on desktop */

.desktop-only {
  display: flex;
}

.mobile-only {
  display: none;
}

@media (max-width: 600px) {
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: flex !important;
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 1280px) {
  .recordings-list .desktop-only {
    padding-right: 12px; /* Keep right padding for search tools */
    gap: 8px;
  }
  .recordings-list .desktop-only h3 {
    margin-left: 10px !important;   /* Add left margin for "Motion Recordings" */
  }
}

@media screen and (orientation: landscape) and (max-height: 500px) {
  .main-video-container {
    padding-top: calc(env(safe-area-inset-top, 0px) + 20px) !important;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
}

@media screen and (orientation: portrait) {
  .main-video-container {
    padding-top: calc(env(safe-area-inset-top, 0px) + 20px);
  }
}

/* Only apply absolute positioning when NOT inside the floating menu popout */

.floating-menu-popout .deselect-btn,
.floating-menu-popout .batch-delete-btn {
  position: static !important;
  top: unset !important;
  right: unset !important;
  width: auto !important;
  height: auto !important;
  border-radius: 8px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1em !important;
}

.desktop-action-buttons {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 80px; /* Adjust so it's just above the pause/notification toggles */
  z-index: 2100;
  display: flex !important;
  width: auto !important;
  flex-direction: row;
  gap: 16px;
  background: rgba(30,30,30,0.97);
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 4px 24px #1a2980cc;
}

/* Ensure desktop action buttons are side by side */

.desktop-action-buttons .deselect-btn,
.desktop-action-buttons .batch-delete-btn {
  position: static !important;
  width: auto !important;
  height: auto !important;
  border-radius: 8px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1em !important;
}

.desktop-action-buttons .deselect-btn {
  position: static !important;
  top: unset !important;
  right: unset !important;
}

@media (max-width: 1280px), (max-width: 900px) {
  .desktop-action-buttons {
    display: none !important;
  }
}

/* Stream Tiles Grid Styles */

.stream-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
  /* Ensure consistent layout during animations */
  position: relative;
}

@media (max-width: 600px) {
  .stream-tiles-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 0 0.5rem;
    max-width: 98vw;
  }
  .stream-tile,
  .stream-tile-button {
    max-width: 98vw;
    width: 98vw;
    min-width: 0;
  }
}

/* Individual tile */

.stream-tile {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px #1a298055;
  background: #232b4a;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  /* Prepare for parent animations */
  transform-origin: center;
}

.stream-tile-button {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  outline: none;
  box-sizing: border-box;
  /* Ensure smooth animations */
  will-change: transform;
  position: relative;
}

.stream-tile:hover, .stream-tile:focus-within {
  box-shadow: 0 4px 24px #1a2980cc;
  transform: translateY(-2px) scale(1.02);
}

.stream-tile-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) brightness(0.7);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.stream-tile-overlay {
  position: relative;
  z-index: 2;
  background: rgba(20,30,60,0.35);
  padding: 1.2em 1em 1em 1em;
  border-radius: 0 0 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stream-tile-title {
  font-family: 'Orbitron', 'Roboto', Arial, sans-serif;
  font-size: 1.1em;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2em;
  text-shadow: 0 1px 8px #1a2980;
}

.stream-tile-nickname-edit {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.5em;
}

.stream-tile-nickname-input {
  padding: 0.3em 0.7em;
  border-radius: 6px;
  border: 1.5px solid #1976d2;
  font-size: 1em;
  background: #fff;
  color: #232b4a;
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.stream-tile-btn {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  margin-right: 0.5em;
  margin-top: 0.5em;
  transition: background 0.15s;
}

.stream-tile-btn:last-child {
  margin-right: 0;
}

.stream-tile-btn:hover, .stream-tile-btn:focus {
  background: #1cf1d1;
  color: #232b4a;
}

.stream-tile-settings-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.3em;
  margin-left: auto;
  cursor: pointer;
  transition: color 0.15s;
}

.stream-tile-settings-btn:hover, .stream-tile-settings-btn:focus {
  color: #1cf1d1;
}

.stream-tile-add {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #1976d2;
  background: rgba(30,30,60,0.25);
  color: #1976d2;
  font-size: 2.2em;
  border-radius: 16px;
  min-height: 180px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.stream-tile-add:hover, .stream-tile-add:focus {
  background: #1cf1d1;
  color: #232b4a;
  border-color: #1cf1d1;
}

.stream-tile .text-lg {
  font-size: 1.1em;
}

.stream-tile .font-semibold {
  font-weight: 600;
}

.stream-tile .ml-2 {
  margin-left: 0.5em;
}

.stream-tile .mt-2 {
  margin-top: 0.5em;
}

.stream-tile .bg-yellow-500 {
  background: #fbbf24;
  color: #232b4a;
}

.stream-tile .bg-blue-500 {
  background: #1976d2;
  color: #fff;
}

.stream-tile .bg-gray-500 {
  background: #6b7280;
  color: #fff;
}

.stream-tile .px-2 {
  padding-left: 0.5em;
  padding-right: 0.5em;
}

.stream-tile .py-1 {
  padding-top: 0.25em;
  padding-bottom: 0.25em;
}

.stream-tile .rounded {
  border-radius: 8px;
}

.stream-tile .flex-grow {
  flex-grow: 1;
}

.stream-tile .items-center {
  align-items: center;
}

.stream-tile .flex {
  display: flex;
}

.stream-tile .group:hover .stream-tile-overlay {
  background: rgba(28, 241, 209, 0.18);
}

/* Utility classes for grid (if not using Tailwind) */

.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.sm\:grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.md\:grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.lg\:grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.gap-4 {
  gap: 1.5rem;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.bottom-0 {
  bottom: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.bg-black {
  background: #000;
}

.bg-opacity-50 {
  background: rgba(0,0,0,0.5);
}

.p-2 {
  padding: 0.5em;
}

.text-white {
  color: #fff;
}

.text-lg {
  font-size: 1.1em;
}

.font-semibold {
  font-weight: 600;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.mt-2 {
  margin-top: 0.5em;
}

.ml-2 {
  margin-left: 0.5em;
}

.bg-blue-500 {
  background: #1976d2;
  color: #fff;
}

.bg-yellow-500 {
  background: #fbbf24;
  color: #232b4a;
}

.bg-gray-500 {
  background: #6b7280;
  color: #fff;
}

.px-2 {
  padding-left: 0.5em;
  padding-right: 0.5em;
}

.py-1 {
  padding-top: 0.25em;
  padding-bottom: 0.25em;
}

.rounded {
  border-radius: 8px;
}

.flex-grow {
  flex-grow: 1;
}

.justify-center {
  justify-content: center;
}

.h-full {
  height: 100%;
}

.w-full {
  width: 100%;
}

.border-dashed {
  border-style: dashed;
}

.border-2 {
  border-width: 2px;
}

.border-gray-300 {
  border-color: #d1d5db;
}

.rounded-lg {
  border-radius: 16px;
}

.hover\:bg-gray-100:hover {
  background: #f3f4f6;
}

.transition-colors {
  transition: background 0.15s, color 0.15s;
}

.text-gray-500 {
  color: #6b7280;
}

/* App.css */

.recording-bar {
  /* Remove position: fixed, top, left, width, z-index */
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 24px;
  pointer-events: auto;
  transition: none;
  display: none; /* Hide by default */
}

.recording-bar-content {
  margin-top: 0;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 8px 32px #1a2980cc;
  background: #232b4a;
  position: relative;
  min-width: 320px;
  max-width: 98vw;
  width: min(900px, 98vw);
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(.4,2,.6,1);
  overflow: hidden;
  pointer-events: auto;
}

.recording-bar.open .recording-bar-content {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.recording-bar-collapse {
  overflow: hidden;
  transition:
    max-height 0.7s cubic-bezier(.4,2,.6,1),
    opacity 0.7s cubic-bezier(.4,2,.6,1);
  max-height: 2000px; /* Should be slightly larger than your bar's max height */
  opacity: 1;
}

.recording-bar-collapse.closed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.error-modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(20,30,60,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-modal {
  background: #232b4a;
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px #1a2980cc;
  padding: 2em 2.5em;
  min-width: 280px;
  max-width: 90vw;
  text-align: center;
}

.error-modal h3 {
  font-family: 'Orbitron', 'Roboto', Arial, sans-serif;
  font-size: 1.5em;
  margin-bottom: 1em;
  color: #ff5f5f;
}

.error-modal-btn {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7em 2em;
  font-weight: 700;
  font-size: 1.1em;
  cursor: pointer;
  margin-top: 1.5em;
  box-shadow: 0 1px 4px #1a298055;
  transition: background 0.2s;
}

.error-modal-btn:hover, .error-modal-btn:focus {
  background: #1cf1d1;
  color: #232b4a;
}
