@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;
}

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: none !important; /* Hidden globally */
}

/* 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;
}

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;
}

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;
}

/* 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: 2;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  height: 3rem;
  width: 3rem;
  border-radius: 50%;
  background: none;
  border: 2px solid white;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.6;
  transition: all 200ms;
}

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

/* 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;
}

#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;
}

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

#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);
}

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

.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: #ff4b7d;
  margin: 0;
  padding: 0;
  transition: transform 0.15s cubic-bezier(.4, 2, .6, 1), color 0.15s;
  outline: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  width: 18px;
  height: 18px;
}

#heart-btn:hover,
#heart-btn:focus {
  color: #ff1a5c;
  transform: scale(1.1);
}

#heart-btn svg {
  width: 100%;
  height: 100%;
  transition: transform 0.2s cubic-bezier(.4, 2, .6, 1);
}

#heart-btn:hover svg,
#heart-btn:focus svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 4px rgba(255, 75, 125, 0.6));
}

.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,
#heart-btn svg {
  display: inline-block;
  vertical-align: middle;
}

#heart-btn svg {
  transition: transform 0.15s cubic-bezier(.4, 2, .6, 1), fill 0.15s;
}

#heart-btn:hover svg,
#heart-btn:focus svg {
  transform: scale(1.12);
  fill: #ff1a5c;
}

#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;
}

/* 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(.olta-artwork-iframe),
  iframe[src*="vercel.app"]:not([src*="olta-ao-app.vercel.app"]):not([src*="olta-ao-app-lyart.vercel.app"]):not(.olta-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;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(30, 30, 35, 0.98), rgba(20, 20, 25, 0.98));
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  display: none; /* Hidden by default, will be shown via JS when artwork plays */
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

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

.now-playing-bar:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, rgba(40, 40, 45, 0.98), rgba(30, 30, 35, 0.98));
}

.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;
}

.now-playing-title {
  font-size: 14px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.now-playing-artist {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-action {
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

/* 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-title {
    font-size: 13px;
  }
  
  .now-playing-artist {
    font-size: 11px;
  }
  
  .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;
  }
}