@font-face {
  font-family: "Neue Machina";
  src: url(/font/PPNeueMachina-Light.otf),
    url(/font/PPNeueMachina-Regular.otf),
    url(/font/PPNeueMachina-Ultrabold.otf);
  font-weight: 100 900;
}

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, system-ui, sans-serif;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  grid-template-areas:
    "a b c"
    "d e f"
    "g h i";
  height: 100vh;
  background: black;

  /* HACK */
  width: 100vw;
  overflow: hidden;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

dialog {
  padding: 1.5rem;
  border: none;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 255);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0);
}

fieldset {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.75rem;
  padding: 1rem;
  margin: 0.5rem 0;
  background: white;
}

/* Make only the projects list scrollable */
fieldset[name="projects"] {
  max-height: 13vh;
  overflow-y: auto;
}

fieldset legend {
  padding: 0 0.5rem;
  font-weight: bold;
  color: #333;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Style for checkboxes and their labels */
form div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
}

form label {
  font-size: 0.9rem;
  color: #333;
}

/* Style for number inputs */
form input[type="number"] {
  width: 80px;
  padding: 0.25rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.25rem;
  font-size: 0.9rem;
}

form small {
  color: #666;
  font-size: 0.8rem;
  margin-left: 0.25rem;
}

.o-viewer {
  grid-area: 1 / 1 / 4 / 4;
  display: grid;
  grid-template-areas: "one";
  z-index: 1;
}

.o-details {
  z-index: 2;
  pointer-events: none;
  color: white;
  grid-area: 3 / 1 / 3 / 2;
  margin: 2em;
  align-self: end;
  display: flex !important; /* Show by default */
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.o-details.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

/* Hide host title/QR when the artwork already has its own interaction chrome (e.g. Flock) */
.o-details.host-chrome-suppressed {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

/* Hide details panel (QR codes, titles, artist names) on home page for desktop only */
@media (min-width: 769px) {
  body.home-page o-details {
    display: none !important;
    opacity: 0;
    visibility: hidden;
  }
}

/* Hide connect-info overlay */
.connect-info-overlay {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

o-details::part(name) {
  margin: 0;
  font-weight: 800;
}

o-details::part(creator) {
  margin: 0.1em 0;
  font-weight: bold;
  opacity: 0.7;
}

/* Connect artwork creator text - teal/gray color for better readability */
o-details[data-artwork-id="connect"]::part(creator),
o-details[data-artwork-id="Connect"]::part(creator) {
  color: #20b2aa; /* teal color */
  opacity: 1; /* full opacity for better readability */
}

o-details::part(description) {
  opacity: 0.7;
  margin-bottom: 0;
  white-space: pre-line;
}

o-details::part(flex) {
  display: flex;
  align-items: end;
  gap: 1rem;
  transform: scale(1);
}

o-details::part(qrcode) {
  border: solid;
  border-width: 10px;
}

/* Connect artwork: Move QR code to the right side of title and artist name */
o-details[data-artwork-id="connect"]::part(flex),
o-details[data-artwork-id="Connect"]::part(flex) {
  flex-direction: row;
}

o-details[data-artwork-id="connect"]::part(name),
o-details[data-artwork-id="Connect"]::part(name) {
  order: 1;
}

o-details[data-artwork-id="connect"]::part(creator),
o-details[data-artwork-id="Connect"]::part(creator) {
  order: 2;
}

o-details[data-artwork-id="connect"]::part(qrcode),
o-details[data-artwork-id="Connect"]::part(qrcode) {
  order: 3;
}

button {
  z-index: 2;
  height: 5rem;
  width: 5rem;
  border-radius: 100%;
  background: none;
  border: 2px solid white;
  color: white;
  margin: 2em;
  font-weight: bold;
  transition: all 200ms;
  opacity: 0.6;
}

button:hover {
  background: white;
  color: black;
  opacity: 1;
  cursor: url("./assets/cursor.png") 15 15, pointer;
}

button:disabled {
  opacity: 0.4;
}

.spin {
  animation: rotation infinite 1250ms linear;
}

@keyframes rotation {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(359deg);
  }
}

.previous {
  /* Remove grid positioning - now handled by top-left-nav */
}

.change {
  /* Remove grid positioning - now handled by top-left-nav */
}

.options {
  z-index: 100;
  margin-left: auto;
  margin-right: 2em;
  margin-top: 2em;
  margin-bottom: auto;
  max-width: 448px;
}

.options .button-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  justify-content: center;
}

.options button {
  color: black;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  font-size: 0.9rem;
  transition: all 200ms ease;
}

.options button:hover {
  background: black;
  color: white;
  border-color: black;
}

#loading {
  color: white;
  transform: translate(-100%, -100%);
  grid-area: e;
  justify-self: center;
  align-self: center;
  animation: rotation infinite 2500ms linear;
}

#qrcode {
  border: solid !important;
  border-width: 10px !important;
}

/* QR Code styling */
.qrcode-container {
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 8px;
  overflow: hidden;
}

.qrcode-container:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.qrcode {
  display: block;
  border-radius: 8px;
  overflow: hidden;
}

/* Connect artwork QR code - 25% smaller */
.qrcode-container.qrcode-connect {
  transform: scale(0.9); /* 115px / 128px = 0.898, rounded to 0.9 */
  transform-origin: center;
  margin-top: 15px; /* Move down 15px to align with text baseline */
}

.qrcode-container.qrcode-connect:hover {
  transform: scale(0.945); /* 0.9 * 1.05 = 0.945 for hover effect */
}

/* Add a subtle glow effect to indicate it's clickable */
.qrcode-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  transition: box-shadow 0.3s ease;
  pointer-events: none;
}

.qrcode-container:hover::after {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.fullscreen {
  z-index: 20;
  position: fixed;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  right: max(1.5rem, env(safe-area-inset-right));
  height: 2.75rem;
  width: 2.75rem;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 1;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.fullscreen__icon {
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.fullscreen__icon[hidden] {
  display: none;
}

.fullscreen:hover,
.fullscreen:focus-visible {
  background: rgba(10, 10, 10, 0.62);
  border-color: rgba(123, 231, 184, 0.55);
  color: #7be7b8;
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(123, 231, 184, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.fullscreen:active {
  transform: translateY(0) scale(0.96);
  color: #9ff0cb;
}

.fullscreen.is-active {
  border-color: rgba(123, 231, 184, 0.4);
  color: #7be7b8;
}

@media (max-width: 768px) {
  .fullscreen {
    display: none;
  }
}

/* Flock Immerse (experiences fullscreen only) — hide host chrome */
body.immersive-artwork #top-status-bar,
body.immersive-artwork #top-left-status-bar,
body.immersive-artwork .fullscreen {
  display: none !important;
}

body.immersive-artwork .olta-menu-bar {
  display: none !important;
}

/* Top Status Bars - Left and Right aligned */
#top-left-status-bar {
  position: fixed;
  top: 2rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(10, 10, 10, 0.18);
  border-radius: 1.1rem;
  padding: 0.2rem 0.5rem;
  box-shadow: none;
  backdrop-filter: blur(6px);
  z-index: 20;
  font-size: 0.5rem;
  min-height: 0.2rem;
}

/* Show top-left-status-bar on desktop - playlist menu is now visible */
@media (min-width: 769px) {
  #top-left-status-bar {
    display: flex; /* Show the playlist menu on desktop */
    font-size: 0.5rem; /* Match top-status-bar font-size for same height */
    padding: 0.2rem 0.5rem; /* Match top-status-bar padding */
    gap: 0.8rem; /* Slightly more gap between icon and dropdown */
    min-height: 0.2rem; /* Match top-status-bar min-height */
    line-height: 1; /* Match top-status-bar line-height */
  }
}

#top-left-status-bar,
#top-left-status-bar * {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

#playlist-dropdown {
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  outline: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Desktop styling for playlist dropdown */
@media (min-width: 769px) {
  #playlist-dropdown {
    font-size: 1rem; /* Match viewer-counter/heart-count font-size for readability */
    line-height: 1; /* Match top-status-bar line-height for consistent height */
    min-width: 180px; /* Give it enough width to show full playlist names */
  }
}

#playlist-dropdown:focus {
  outline: none;
}

/* Home Button Styling */
.home-button {
  background: none;
  border: none;
  color: #7be7b8;
  cursor: pointer;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.home-button:hover {
  opacity: 0.7;
}

.home-button:active {
  opacity: 0.5;
}

.home-button svg {
  display: block;
}

/* Mobile Home Button */
.home-btn-mobile {
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(123, 231, 184, 0.3);
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: #7be7b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.home-btn-mobile:hover {
  background: rgba(10, 10, 10, 0.8);
  border-color: rgba(123, 231, 184, 0.5);
}

.home-btn-mobile:active {
  opacity: 0.7;
  transform: scale(0.95);
}

.home-btn-mobile svg {
  display: block;
}

/* Ensure olta-menu-bar can accommodate home button */
.olta-menu-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

/* Spotify-style design for olta-menu-bar when at bottom - High specificity */
#level-2-artwork-gallery .olta-menu-bar,
#level-1-playlists .olta-menu-bar,
.olta-menu-bar[style*="bottom"]:not([style*="top"]) {
  display: flex !important;
  justify-content: space-around !important;
  align-items: flex-start !important;
  background: rgba(0, 0, 0, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 6px 0 2px 0 !important;
  min-height: 54px !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4) !important;
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  z-index: 99 !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateY(-5%) !important;
  pointer-events: auto !important;
}

.olta-menu-bar .home-btn-mobile {
  margin-right: auto;
}

.olta-menu-bar .back-btn {
  margin-left: 0.5rem;
}

/* Hide old elements when using Spotify-style nav in bottom position */
#level-2-artwork-gallery .olta-menu-bar .home-btn-mobile,
#level-2-artwork-gallery .olta-menu-bar .back-btn,
#level-2-artwork-gallery .olta-menu-bar .playlist-name,
#level-2-artwork-gallery .olta-menu-bar .olta-logo,
#level-1-playlists .olta-menu-bar .home-btn-mobile,
#level-1-playlists .olta-menu-bar .back-btn,
#level-1-playlists .olta-menu-bar .playlist-name,
#level-1-playlists .olta-menu-bar .olta-logo {
  display: none !important;
}

/* Ensure olta-menu-bar is always visible on mobile */
@media (max-width: 768px) {
  #level-1-playlists .olta-menu-bar,
  #level-2-artwork-gallery .olta-menu-bar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    -webkit-tap-highlight-color: transparent !important;
    tap-highlight-color: transparent !important;
  }
}

/* Global tap highlight removal for olta-menu-bar and all children */
#level-1-playlists .olta-menu-bar *,
#level-2-artwork-gallery .olta-menu-bar *,
.olta-menu-bar * {
  -webkit-tap-highlight-color: transparent !important;
  tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* Ensure buttons are clickable */
#level-1-playlists .olta-menu-bar .bottom-nav-btn,
#level-2-artwork-gallery .olta-menu-bar .bottom-nav-btn,
.olta-menu-bar .bottom-nav-btn {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 1;
  -webkit-tap-highlight-color: transparent !important;
  tap-highlight-color: transparent !important;
  background: transparent !important;
  background-color: transparent !important;
}

/* Remove all active/focus/hover backgrounds that might create white ovals */
#level-1-playlists .olta-menu-bar .bottom-nav-btn:active,
#level-2-artwork-gallery .olta-menu-bar .bottom-nav-btn:active,
.olta-menu-bar .bottom-nav-btn:active,
#level-1-playlists .olta-menu-bar .bottom-nav-btn:focus,
#level-2-artwork-gallery .olta-menu-bar .bottom-nav-btn:focus,
.olta-menu-bar .bottom-nav-btn:focus,
#level-1-playlists .olta-menu-bar .bottom-nav-btn:hover,
#level-2-artwork-gallery .olta-menu-bar .bottom-nav-btn:hover,
.olta-menu-bar .bottom-nav-btn:hover {
  background: transparent !important;
  background-color: transparent !important;
  -webkit-tap-highlight-color: transparent !important;
  tap-highlight-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Prevent white circles on click/tap */
#level-1-playlists .olta-menu-bar button::before,
#level-2-artwork-gallery .olta-menu-bar button::before,
.olta-menu-bar button::before,
#level-1-playlists .olta-menu-bar button::after,
#level-2-artwork-gallery .olta-menu-bar button::after,
.olta-menu-bar button::after {
  display: none !important;
  content: none !important;
}

/* Fixed Bottom Navigation Bar for Mobile - Spotify-style design */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 0 4px 0;
  display: none; /* Hidden by default, controlled by JavaScript */
  z-index: 10000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
  justify-content: space-around;
  align-items: flex-start;
  min-height: 60px;
  box-sizing: border-box;
}

/* Show bottom nav when mobile-visible class is added (controlled by JavaScript) */
.mobile-bottom-nav.mobile-visible {
  display: flex !important;
}

/* Hide bottom nav on desktop - additional safety */
@media (min-width: 769px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

.bottom-nav-btn {
  background: none !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px 12px 2px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  flex: 1;
  min-width: 0;
  transition: color 0.2s ease;
  position: relative;
  outline: none !important;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
  -webkit-tap-highlight-color: transparent !important;
  tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  transform: translateY(-10%);
  pointer-events: auto !important;
  z-index: 1;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.bottom-nav-btn:focus,
.bottom-nav-btn:focus-visible,
.bottom-nav-btn:focus-within {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.bottom-nav-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

.bottom-nav-btn:active {
  opacity: 0.8;
  transform: translateY(-10%) scale(0.96);
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  tap-highlight-color: transparent !important;
  background: transparent !important;
  background-color: transparent !important;
  -webkit-touch-callout: none !important;
}

.bottom-nav-btn.active {
  color: rgba(255, 255, 255, 1);
}

.bottom-nav-icon,
.bottom-nav-btn svg {
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  tap-highlight-color: transparent !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  pointer-events: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

.bottom-nav-icon:focus,
.bottom-nav-btn svg:focus,
.bottom-nav-icon:active,
.bottom-nav-btn svg:active,
.bottom-nav-icon:focus-visible,
.bottom-nav-btn svg:focus-visible {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  background: transparent !important;
}

/* Remove all tap highlights and focus rings from olta-menu-bar buttons */
#level-1-playlists .olta-menu-bar button,
#level-2-artwork-gallery .olta-menu-bar button,
.olta-menu-bar .bottom-nav-btn,
.olta-menu-bar .bottom-nav-btn * {
  -webkit-tap-highlight-color: transparent !important;
  tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

#level-1-playlists .olta-menu-bar button:active,
#level-2-artwork-gallery .olta-menu-bar button:active,
.olta-menu-bar .bottom-nav-btn:active,
.olta-menu-bar .bottom-nav-btn:active * {
  -webkit-tap-highlight-color: transparent !important;
  tap-highlight-color: transparent !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

.bottom-nav-icon {
  display: block;
  width: 20px;
  height: 20px;
  stroke-width: 2;
  flex-shrink: 0;
}

.bottom-nav-btn svg {
  display: block;
  width: 20px;
  height: 20px;
}

.bottom-nav-label {
  display: none !important;
  font-size: 10px;
  font-weight: 500;
  color: inherit;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.home-btn-bottom {
  /* Specific styling for home button in bottom nav - now uses base .bottom-nav-btn styles */
}

#playlist-dropdown option {
  background: rgba(10, 10, 10, 0.95);
  color: #fff;
  padding: 0.5rem;
}

/* Update playlist header to be positioned better */
.playlist-header {
  position: fixed;
  top: 6rem;
  left: 2rem;
  z-index: 15;
  color: white;
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem 1.5rem;
  border-radius: 0.8rem;
  max-width: 400px;
  backdrop-filter: blur(4px);
}

/* Move playlist-header down on desktop */
@media (min-width: 769px) {
  .playlist-header {
    top: 8.28rem; /* 15% more than 7.2rem (7.2rem * 1.15 = 8.28rem) */
  }
}

.playlist-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #7be7b8;
  line-height: 1.2;
}

/* Hide playlist-title on desktop */
@media (min-width: 769px) {
  .playlist-title {
    display: none;
  }
}

.playlist-description {
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.4;
  font-weight: 400;
}

#top-status-bar {
  position: fixed;
  top: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(10, 10, 10, 0.18);
  border-radius: 1.1rem;
  padding: 0.2rem 0.5rem;
  box-shadow: none;
  backdrop-filter: blur(6px);
  z-index: 20;
  font-size: 0.5rem;
  min-height: 0.2rem;
}

#top-status-bar,
#top-status-bar * {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* Mobile responsive adjustments for top status bars */
@media (max-width: 768px) {

  #top-left-status-bar,
  #top-status-bar {
    top: 0.5rem;
    padding: 0.15rem 0.4rem;
    gap: 0.5rem;
  }

  #top-left-status-bar {
    left: 0.5rem;
  }

  #top-status-bar {
    right: 0.5rem;
  }

  .playlist-header {
    top: 4rem;
    left: 0.5rem;
    right: 0.5rem;
    max-width: none;
    padding: 0.8rem 1rem;
  }
}

@media (max-width: 480px) {

  #top-left-status-bar,
  #top-status-bar {
    top: 0.3rem;
    padding: 0.1rem 0.3rem;
  }

  #top-left-status-bar {
    left: 0.3rem;
  }

  #top-status-bar {
    right: 0.3rem;
  }

  .playlist-header {
    top: 3rem;
    left: 0.3rem;
    right: 0.3rem;
    padding: 0.6rem 0.8rem;
  }

  .playlist-title {
    font-size: 1rem;
  }

  .playlist-description {
    font-size: 0.75rem;
  }
}

#viewer-counter,
#heart-count {
  font-size: 1rem;
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.01em;
}

#viewer-count {
  color: #7be7b8;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

#heart-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #888; /* Grey by default (not hearted) */
  margin: 0;
  padding: 0;
  transition: transform 0.2s cubic-bezier(.4, 2, .6, 1), color 0.2s;
  outline: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  width: 18px;
  height: 18px;
}

/* Red on hover (preview state) */
#heart-btn:hover,
#heart-btn:focus {
  color: #ff1a5c;
  transform: scale(1.1);
}

/* Red when hearted (after click) */
#heart-btn.hearted {
  color: #ff1a5c;
}

/* Scale animation on click */
#heart-btn.clicking {
  animation: heartPulse 0.3s ease;
}

@keyframes heartPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

#heart-btn svg {
  width: 100%;
  height: 100%;
  transition: transform 0.2s cubic-bezier(.4, 2, .6, 1), fill 0.2s;
  fill: #888; /* Grey by default (not hearted) */
}

/* Red on hover (preview) */
#heart-btn:hover svg,
#heart-btn:focus svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 4px rgba(255, 26, 92, 0.6));
  fill: #ff1a5c; /* Red on hover */
}

/* Red when hearted (after click) */
#heart-btn.hearted svg {
  fill: #ff1a5c !important; /* Force red when hearted */
}

/* Ensure non-hearted state is grey by default */
#heart-btn:not(.hearted) {
  color: #888; /* Grey when not hearted */
}

#heart-btn:not(.hearted) svg {
  fill: #888; /* Grey when not hearted */
}

/* Red preview on hover when not hearted */
#heart-btn:not(.hearted):hover,
#heart-btn:not(.hearted):focus {
  color: #ff1a5c; /* Red on hover (preview) */
}

#heart-btn:not(.hearted):hover svg,
#heart-btn:not(.hearted):focus svg {
  fill: #ff1a5c; /* Red on hover only if not hearted */
}

.status-divider {
  display: inline-block;
  width: 1px;
  height: 1.2em;
  background: rgba(255, 255, 255, 0.33);
  margin: 0;
  border-radius: 1px;
  align-self: center;
}

.status-icon svg {
  display: inline-block;
  vertical-align: middle;
}

#viewer-counter {
  color: #fff !important;
}

#share-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  color: inherit;
  font-family: inherit;
  height: 18px;
}

#share-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

dialog.options {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 500px;
  width: 90vw;
  padding: 0.75rem;
  margin: 0;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 255);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0);
  z-index: 100;
}

/* Hide options form on desktop to prevent blocking cast functionality */
body:not(.mobile) dialog.options {
  display: none !important;
}

body:not(.mobile) .options {
  display: none !important;
}



/* Carousel Navigation buttons - Minimal, Modern Style */
.carousel-nav-btn {
  position: fixed !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: rgba(30, 30, 30, 0.7) !important;
  border: none !important;
  cursor: pointer !important;
  color: #fff !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 54px !important;
  height: 54px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.2rem !important;
  z-index: 20 !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12) !important;
  transition: background 0.2s, transform 0.15s, color 0.2s;
  opacity: 0.92 !important;
}

.carousel-nav-btn svg {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  stroke-width: 2.5;
  transition: transform 0.15s, stroke 0.2s;
}

.carousel-nav-btn:hover,
.carousel-nav-btn:focus {
  background: #7be7b8 !important;
  color: #111 !important;
  transform: translateY(-50%) scale(1.08) !important;
  opacity: 1 !important;
}

.carousel-nav-btn:active {
  background: #222 !important;
  color: #fff !important;
  transform: translateY(-50%) scale(0.97) !important;
}

.carousel-nav-left {
  left: 1.2rem !important;
}

.carousel-nav-right {
  right: 1.2rem !important;
}

.carousel-nav-btn:disabled {
  opacity: 0.3 !important;
  pointer-events: none !important;
}

/* Hide navigation buttons on home page for desktop */
@media (min-width: 769px) {
  body.home-page #nav-prev-btn,
  body.home-page #nav-next-btn {
    display: none !important;
  }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .carousel-nav-btn {
    width: 44px !important;
    height: 44px !important;
  }

  .carousel-nav-btn svg {
    width: 24px;
    height: 24px;
  }

  .carousel-nav-left {
    left: 0.5rem !important;
  }

  .carousel-nav-right {
    right: 0.5rem !important;
  }
}

/* Click feedback animation */
.carousel-nav-btn.clicked {
  animation: buttonClickFeedback 0.6s cubic-bezier(.4, 2, .6, 1) !important;
}

@keyframes buttonClickFeedback {
  0% {
    transform: translateY(-50%) scale(1);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.9);
  }

  15% {
    transform: translateY(-50%) scale(0.85);
    background: rgba(123, 231, 184, 0.8);
    border-color: rgba(123, 231, 184, 1);
    box-shadow: 0 8px 25px rgba(123, 231, 184, 0.6), 0 0 0 2px rgba(123, 231, 184, 0.3);
  }

  30% {
    transform: translateY(-50%) scale(1.1);
    background: rgba(123, 231, 184, 0.6);
    border-color: rgba(123, 231, 184, 0.8);
  }

  100% {
    transform: translateY(-50%) scale(1);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.9);
  }
}

/* Navigation feedback indicator */
.nav-feedback {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: rgba(123, 231, 184, 0.9) !important;
  color: #000 !important;
  padding: 1rem 2rem !important;
  border-radius: 2rem !important;
  font-weight: bold !important;
  font-size: 1.2rem !important;
  z-index: 2147483648 !important;
  pointer-events: none !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

.nav-feedback.show {
  opacity: 1 !important;
  animation: navFeedbackPulse 1.5s ease-out !important;
}

@keyframes navFeedbackPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }

  20% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }

  80% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
  }
}

/* More specific hover selectors */
button.carousel-nav-btn:hover,
button.carousel-nav-btn:focus,
#nav-prev-btn:hover,
#nav-prev-btn:focus,
#nav-next-btn:hover,
#nav-next-btn:focus {
  background: #ff0000 !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  transform: translateY(-50%) scale(1.1) !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 0 3px rgba(255, 255, 255, 0.5) !important;
  opacity: 1 !important;
}

.carousel-nav-btn:active {
  transform: translateY(-50%) scale(0.98) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

.carousel-nav-btn:disabled {
  color: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  cursor: not-allowed !important;
  transform: translateY(-50%) scale(0.9) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.carousel-nav-btn svg {
  width: 28px;
  height: 28px;
  transition: all 0.3s cubic-bezier(.4, 2, .6, 1);
  stroke: currentColor;
  stroke-width: 3;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.carousel-nav-btn:hover svg,
.carousel-nav-btn:focus svg {
  transform: scale(1.1);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
  stroke: #000000 !important;
}

.carousel-nav-btn:active svg {
  transform: scale(0.95);
}

.carousel-nav-left {
  left: 2rem !important;
}

.carousel-nav-right {
  right: 2rem !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .carousel-nav-btn {
    width: 60px !important;
    height: 60px !important;
    padding: 0.8rem !important;
    border-width: 2px !important;
  }

  .carousel-nav-btn svg {
    width: 24px;
    height: 24px;
  }

  .carousel-nav-left {
    left: 1rem;
  }

  .carousel-nav-right {
    right: 1rem;
  }

  @media (max-width: 480px) {
    .carousel-nav-btn {
      width: 55px !important;
      height: 55px !important;
      padding: 0.7rem !important;
      border-width: 2px !important;
    }
  }

  .carousel-nav-btn svg {
    width: 22px;
    height: 22px;
  }

  .carousel-nav-left {
    left: 0.5rem;
  }

  .carousel-nav-right {
    right: 0.5rem;
  }
}

/* Playlist buttons styling */
.playlist-buttons {
  position: fixed;
  top: 0.8rem;
  left: 1rem;
  z-index: 1100;
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
}

.playlist-btn {
  background: rgba(0, 0, 0, 0.7);
  color: #7be7b8;
  border: 1px solid #7be7b8;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border-radius: 0.3rem;
  padding: 0.4rem 0.8rem;
}

.playlist-btn.active,
.playlist-btn:hover {
  background: #7be7b8;
  color: #000;
}

/* Mobile responsive adjustments for playlist buttons */
@media (max-width: 768px) {
  .playlist-buttons {
    top: 0.5rem;
    left: 0.5rem;
    gap: 0.4rem;
  }

  .playlist-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }
}

@media (max-width: 480px) {
  .playlist-buttons {
    top: 0.3rem;
    left: 0.3rem;
    gap: 0.3rem;
  }

  .playlist-btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }
}

/* Hide Vercel Toolbar on Mobile Devices */
@media (max-width: 768px) {

  /* Ensure OLTA artwork iframes are always visible */
  .olta-artwork-iframe {
    display: block !important;
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Hide Vercel toolbar completely on mobile */
  iframe[src*="vercel.com"]:not([src*="olta-ao-app.vercel.app"]):not([src*="olta-ao-app-lyart.vercel.app"]):not([src*="olta-artist-dashboard.vercel.app"]):not([src*="flock-topaz-three.vercel.app"]):not(.mp-frame):not([src*="lifes-emerging.vercel.app"]):not(.olta-artwork-iframe):not(.featured-artwork-iframe):not([id*="featured-artwork-iframe"]):not([id*="artwork-iframe"]):not([id*="np-artwork-iframe"]),
  iframe[src*="vercel.app"]:not([src*="olta-ao-app.vercel.app"]):not([src*="olta-ao-app-lyart.vercel.app"]):not([src*="olta-artist-dashboard.vercel.app"]):not([src*="flock-topaz-three.vercel.app"]):not(.mp-frame):not([src*="lifes-emerging.vercel.app"]):not(.olta-artwork-iframe):not(.featured-artwork-iframe):not([id*="featured-artwork-iframe"]):not([id*="artwork-iframe"]):not([id*="np-artwork-iframe"]),
  iframe[src*="vercel-insights"]:not(.olta-artwork-iframe),
  div[data-vercel-toolbar],
  [data-vercel-toolbar],
  #vercel-toolbar,
  .vercel-toolbar,
  [class*="vercel"]:not(.olta-artwork-iframe),
  [id*="vercel"]:not(#art-remembers-iframe):not(#level-3-artwork-iframe) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  /* Hide any Vercel-related elements */
  [data-vercel],
  [class*="vercel-insights"],
  [id*="vercel-insights"] {
    display: none !important;
  }

  /* Ensure no Vercel elements take up space */
  body[data-vercel] {
    padding-bottom: 0 !important;
  }
}

/* Now Playing Bar (Bottom of Level 2) - Mobile Only */
.now-playing-bar {
  position: fixed !important;
  bottom: 0;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  margin: 0 !important;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.98), rgba(25, 25, 25, 0.98));
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 16px;
  display: none; /* Hidden by default, will be shown via JS when artwork plays */
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.5);
  box-sizing: border-box !important;
  /* Subtle texture overlay inspired by design reference */
  position: relative;
}

.now-playing-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 20px 20px;
  pointer-events: none;
  opacity: 0.6;
}

/* Hide on desktop */
@media (min-width: 769px) {
  .now-playing-bar {
    display: none !important;
  }
}

.now-playing-bar:active {
  transform: scale(0.99);
  background: linear-gradient(135deg, rgba(35, 35, 35, 0.98), rgba(30, 30, 30, 0.98));
  border-top-color: rgba(255, 255, 255, 0.12);
}

.now-playing-artwork-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.now-playing-pulse {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  animation: pulse 2s ease-in-out infinite;
}

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

.now-playing-icon {
  font-size: 20px;
  color: white;
  z-index: 1;
}

.now-playing-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.now-playing-label {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  opacity: 0.8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.now-playing-title {
  font-size: 15px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  line-height: 1.2;
  letter-spacing: -0.2px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.now-playing-artist {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
  letter-spacing: 0.1px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.now-playing-action {
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
  opacity: 0.8;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.now-playing-bar:hover .now-playing-action,
.now-playing-bar:active .now-playing-action {
  opacity: 1;
  color: rgba(255, 255, 255, 0.9);
}

/* Level 3: Now Playing / Artwork Control Center - Mobile Only */
#level-3-now-playing {
  background: linear-gradient(180deg, #0a0a0f 0%, #1a1a20 100%);
  min-height: 100vh;
  padding-bottom: 20px;
}

/* Hide Level 3 on desktop */
@media (min-width: 769px) {
  #level-3-now-playing {
    display: none !important;
  }
}

.now-playing-artwork-preview {
  padding: 20px 20px 10px;
}

.artwork-preview-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.artwork-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artwork-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 16px;
  background: #000;
}

.artwork-preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  pointer-events: none; /* CRITICAL: Allow touches to pass through to iframe */
}

.artwork-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto; /* Re-enable pointer events for the badge itself */
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.status-icon {
  font-size: 14px;
}

/* Now Playing Details */
.now-playing-details {
  padding: 20px 20px 10px;
  text-align: center;
}

.np-artwork-name {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin: 0 0 8px;
  line-height: 1.2;
}

.np-artwork-creator {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 12px;
}

.np-playlist-context {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.context-label {
  opacity: 0.7;
}

#np-playlist-name {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* Control Panel */
.now-playing-controls {
  padding: 10px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-item:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.08);
}

.control-item-primary {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.control-item-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.control-icon {
  font-size: 24px;
  line-height: 1;
}

.control-text {
  flex: 1;
}

.control-title {
  font-size: 15px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.control-description {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.control-indicator {
  color: #4ade80;
  font-size: 18px;
  margin-left: 8px;
}

.control-action {
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  margin-left: 8px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
}

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

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  transition: all 0.3s ease;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

/* Time Extension Buttons */
.time-extension-buttons {
  display: flex;
  gap: 8px;
  width: 100%;
}

.time-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 0;
}

.time-btn:active {
  transform: scale(0.95);
}

.time-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(123, 231, 184, 0.5);
}

.time-value {
  font-size: 18px;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.time-unit {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: lowercase;
  line-height: 1;
}

.time-btn-custom {
  background: rgba(123, 231, 184, 0.1);
  border-color: rgba(123, 231, 184, 0.3);
}

.time-btn-custom:hover {
  background: rgba(123, 231, 184, 0.15);
  border-color: rgba(123, 231, 184, 0.5);
}

.time-btn-infinite {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border-color: rgba(102, 126, 234, 0.4);
}

.time-btn-infinite:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
  border-color: rgba(102, 126, 234, 0.6);
}

.time-btn-infinite.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
  border-color: rgba(102, 126, 234, 0.8);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* Timer Countdown Display */
.timer-countdown {
  margin-top: 12px;
  padding: 12px;
  background: rgba(123, 231, 184, 0.1);
  border: 1px solid rgba(123, 231, 184, 0.3);
  border-radius: 10px;
  text-align: center;
}

.countdown-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.countdown-text strong {
  font-size: 20px;
  color: #7be7b8;
  font-weight: 700;
  font-family: 'PP Neue Machina', monospace;
}

.resume-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 16px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.resume-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.resume-btn:active {
  transform: scale(0.98);
}

/* Loop Mode Active Banner */
.loop-mode-banner {
  margin: 0 20px 20px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border: 1px solid rgba(102, 126, 234, 0.4);
  border-radius: 12px;
  animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.banner-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.banner-icon {
  font-size: 24px;
  flex-shrink: 0;
  animation: rotate 2s linear infinite;
}

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

.banner-text {
  flex: 1;
}

.banner-text strong {
  display: block;
  font-size: 15px;
  color: white;
  margin-bottom: 4px;
}

.banner-text p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Iframe Loading Overlay */
.iframe-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(10, 10, 15, 0.95), rgba(20, 20, 30, 0.95));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .now-playing-bar {
    padding: 10px 12px;
  }
  
  .now-playing-artwork-thumb {
    width: 42px;
    height: 42px;
  }
  
  .now-playing-label {
    font-size: 9px;
  }
  
  .now-playing-title {
    font-size: 13px;
  }
  
  .now-playing-artist {
    font-size: 11px;
  }
  
  /* Bottom navigation bar responsive adjustments */
  .mobile-bottom-nav {
    padding: 5px 0 2px 0;
    min-height: 50px;
  }
  
  .bottom-nav-btn {
    padding: 3px 8px 2px 8px;
    gap: 2px;
  }
  
  .bottom-nav-icon {
    width: 18px;
    height: 18px;
  }
  
  .bottom-nav-label {
    font-size: 9px;
  }
  
  /* Adjust olta-menu-bar on small screens */
  #level-1-playlists .olta-menu-bar,
  #level-2-artwork-gallery .olta-menu-bar {
    padding: 5px 0 2px 0 !important;
    min-height: 50px !important;
  }
  
  #level-1-playlists .olta-menu-bar .bottom-nav-icon,
  #level-2-artwork-gallery .olta-menu-bar .bottom-nav-icon,
  #level-1-playlists .olta-menu-bar .bottom-nav-btn svg,
  #level-2-artwork-gallery .olta-menu-bar .bottom-nav-btn svg {
    width: 18px !important;
    height: 18px !important;
  }
  
  #level-1-playlists .olta-menu-bar .bottom-nav-label,
  #level-2-artwork-gallery .olta-menu-bar .bottom-nav-label {
    font-size: 9px !important;
  }
  
  .np-artwork-name {
    font-size: 20px;
  }
  
  .np-artwork-creator {
    font-size: 14px;
  }
  
  .control-item {
    padding: 14px;
  }
  
  .control-title {
    font-size: 14px;
  }
  
  .control-description {
    font-size: 12px;
  }
  
  .loading-spinner {
    width: 32px;
    height: 32px;
  }
  
  .loading-text {
    font-size: 12px;
  }
}

/* Full-Screen Hero Video on Mobile Welcome */
.hero-video-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.1) 20%, transparent 50%);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 100%;
  padding-bottom: 20vh; /* Compact positioning for landscape responsiveness */
}

.hero-title {
  font-family: 'PPNeueMachina-Ultrabold', -apple-system, sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 1rem 0;
  line-height: 1.3;
  max-width: 300px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-subtitle strong {
  color: #7be7b8;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 280px;
}

/* Mobile responsive adjustments for hero video */
@media (max-width: 480px) {
  .hero-video-wrapper {
    width: 100vw;
    height: 100vh;
  }
  
  .hero-title {
    font-size: 1.6rem;
  }
  
  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-overlay {
    padding: 1.5rem 1rem;
    padding-bottom: 45vh; /* Move content up by 45% total on mobile too */
  }
}

@media (max-height: 600px) {
  .hero-video-wrapper {
    width: 100vw;
    height: 100vh;
  }
  
  .hero-title {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
  }
  
  .hero-subtitle {
    font-size: 0.7rem;
    margin-bottom: 0.8rem;
    max-width: 250px;
  }
  
  .hero-overlay {
    padding-bottom: 15vh; /* Even more compact in landscape */
  }
}

/* Landscape orientation optimizations */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-title {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
  }
  
  .hero-subtitle {
    font-size: 0.65rem;
    margin-bottom: 0.6rem;
    max-width: 220px;
  }
  
  .hero-overlay {
    padding-bottom: 12vh; /* Ultra-compact for landscape */
  }
  
  .hero-actions {
    max-width: 200px;
  }
}