/* =========================================================
   [1] BASE
   ========================================================= */
body {
  margin: 0;
  padding: 2px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #121212;
  color: #fff;
  overflow: hidden;
}

.container {
  max-width: 700px;
  margin: auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 80px);
  overflow: hidden;
}

/* =========================================================
   [2] BLOCCO CANZONE CORRENTE
   ========================================================= */
#currentTrackContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 5px 0 5px;
  background: #181818;
  padding: 10px;
  border-radius: 12px;
  position: relative;
  flex-shrink: 0;
  min-height: 280px;
  overflow: hidden;
}

/* Blurred background image filling container */
#currentTrackContainer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--cover-image);
  background-size: cover;
  background-position: center;
  filter: blur(30px) brightness(0.6);
  z-index: 0;
}

/* =========================================================
   [3.1] COVER + NAVIGATION BUTTONS
   ========================================================= */
.cover-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 260px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-inner {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.8));
}

.cover-wrapper img {
  display: block;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
  position: relative;
  z-index: 0;
}

/* =========================================================
   [3.2] ONDE ANIMATE
   ========================================================= */
.waves-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: screen;
  opacity: 0.65;
  border-radius: 12px;
  z-index: 2;
}

.waves {
  width: 150%;
  height: 150%;
  position: absolute;
  top: -25%;
  left: -25%;
  stroke: #e38b1f;         /* arancione */
  stroke-width: 12;
  fill: none;
  opacity: 0.7;
  animation: waveAnim 4s ease-in-out infinite;
}

@keyframes waveAnim {
  0%   { transform: translateX(0) scale(1); }
  50%  { transform: translateX(-10%) scale(1.05); }
  100% { transform: translateX(0) scale(1); }
}

/* =========================================================
   [3.2.1] PLAY BUTTON OVERLAY (for blocked autoplay)
   ========================================================= */
.play-button-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.play-button-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-overlay-btn {
  background: transparent;
  border: none;
  color: #e38b1f;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: playBtnPulse 2s ease-in-out infinite;
}

.play-overlay-btn:hover {
  transform: scale(1.1);
  color: #ffac42;
}

.play-overlay-btn:active {
  transform: scale(0.95);
}

@keyframes playBtnPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* =========================================================
   [3.3] TITOLO BRANO CORRENTE
   ========================================================= */
.title-wrapper {
  position: absolute;
  top: 1px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  z-index: 2;
}

#currentTitle {
  font-size: 1.8em;
  margin: 0;
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
  font-weight: 600;
}

.medal-btn {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 3;
  padding: 0;
}

.medal-btn svg {
  width: 24px;
  height: 24px;
  display: block;
}

.medal-btn:hover {
  background: rgba(227, 139, 31, 0.9);
  border-color: rgba(227, 139, 31, 0.5);
  transform: scale(1.1);
}

.medal-btn:active {
  transform: scale(0.95);
}

.medal-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e38b1f;
  color: #1a1a1a;
  font-size: 10px;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #1a1a1a;
}

.lyrics-toggle-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 3;
  padding: 0;
}

.lyrics-toggle-btn svg {
  width: 24px;
  height: 24px;
  display: block;
}

.lyrics-toggle-btn:hover {
  transform: scale(1.1);
}

.lyrics-toggle-btn:active {
  transform: scale(0.95);
}

.lyrics-toggle-btn.active {
  background: rgba(227, 139, 31, 0.9);
  border-color: rgba(227, 139, 31, 1);
}

/* =========================================================
   [3.4] LYRICS OVERLAY (CENTERED ON COVER)
   ========================================================= */
.lyrics-nav-container {
  position: absolute;
  bottom: 60px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: center;
  z-index: 2;
}

.lyrics-container {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  padding: 12px 20px;
  text-align: center;
  max-width: 100%;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lyrics-nav-container.hidden .lyrics-container {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* =========================================================
   [3.5] STATS POPUP
   ========================================================= */
.stats-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.stats-popup.hidden {
  display: none;
}

.stats-content {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(40, 40, 40, 0.95) 100%);
  padding: 30px 40px;
  border-radius: 16px;
  border: 2px solid rgba(227, 139, 31, 0.5);
  text-align: center;
  position: relative;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.stats-content h3 {
  margin: 0 0 20px 0;
  color: #e38b1f;
  font-size: 24px;
}

.badge-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
  gap: 10px;
}

.badge-icon {
  font-size: 64px;
  line-height: 1;
}

.badge-name {
  font-size: 20px;
  font-weight: bold;
  color: #e38b1f;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.stats-plays {
  margin: 20px 0 10px 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.6;
}

.stats-plays strong {
  color: #e38b1f;
  font-size: 32px;
}

.stats-progress {
  margin: 10px 0 0 0;
  color: #cfcfcf;
  font-size: 16px;
  font-style: italic;
}

.close-stats-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.close-stats-btn:hover {
  color: #e38b1f;
  transform: scale(1.2);
}

/* Info popup specific styles */
.info-content {
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.info-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.info-header h3 {
  flex: 1;
  margin: 0;
}

.lang-toggle-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid rgba(227, 139, 31, 0.4);
  border-radius: 6px;
  color: #cfcfcf;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lang-toggle-btn:hover {
  background: rgba(227, 139, 31, 0.1);
  border-color: #e38b1f;
}

.lang-toggle-btn span {
  transition: all 0.2s ease;
}

.info-image {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.info-image img {
  max-width: 200px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.info-text {
  text-align: left;
  line-height: 1.6;
}

.info-text p {
  margin: 15px 0;
  color: #cfcfcf;
  font-size: 15px;
}

.info-text p strong {
  color: #e38b1f;
}

.info-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.rankings-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 16px;
  background: #2a2a2a;
  color: #fff;
  border: 2px solid rgba(227, 139, 31, 0.6);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rankings-btn:hover {
  background: #3a2a12;
  border-color: #e38b1f;
  transform: translateY(-2px);
}

.rankings-btn:active {
  transform: translateY(0);
}

.close-info-btn-bottom {
  flex: 1;
  min-width: 140px;
  margin-top: 0;
  padding: 12px 24px;
  background: #e38b1f;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.close-info-btn-bottom:hover {
  background: #ff9d2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(227, 139, 31, 0.4);
}

.close-info-btn-bottom:active {
  transform: translateY(0);
}

.info-text p strong {
  color: #e38b1f;
}

/* Rankings popup */
.rankings-content {
  max-width: 520px;
}

.ranking-section {
  text-align: left;
  margin: 12px 0;
}

.ranking-section h4 {
  margin: 0 0 6px 0;
  color: #ffac42;
  font-size: 16px;
}

.ranking-status {
  font-size: 13px;
  color: #cfcfcf;
  margin: 2px 0 6px 0;
}

.ranking-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ranking-list li.ranking-item {
  list-style: none !important;
  color: #fff;
  font-size: 13px;
  line-height: 1.1;
  padding: 1px 0 !important;
  margin: 0 !important;
  min-height: auto !important;
  background: transparent !important;
  border-radius: 0 !important;
  cursor: default !important;
  display: block !important;
  gap: 0 !important;
}

.ranking-item-pos {
  display: inline-block;
  min-width: 38px;
  font-weight: 700;
  color: #ffac42;
}

.ranking-item-title {
  font-weight: 600;
  color: #fff;
}

.ranking-item-count {
  color: #ffac42;
  margin-left: 6px;
  font-weight: 600;
}

.status-overlay {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85em;
  color: #ddd;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  transition: opacity 0.3s;
  z-index: 10;
}

.status-overlay.ok { color: #cfcfcf; }
.status-overlay.loading { color: #ffac42; }
.status-overlay.buffering { color: #ffac42; }
.status-overlay.error { color: #ff6b6b; }
.status-overlay.hidden { 
  opacity: 0;
  pointer-events: none;
}

.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-btn {
  width: 36px;
  height: 36px;
  background: #181818;
  color: #fff;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s, border 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.nav-btn:hover {
  background: #2a2a2a;
  border-color: #e38b1f;
  transform: scale(1.05);
}

.nav-btn:active {
  transform: scale(0.95);
}

.lyric-line {
  margin: 2px 0;
  line-height: 1.3;
}

/* riga corrente */
.lyric-current {
  color: #f5f5f5;
  font-size: 0.9em;
}

/* riga precedente / successiva in grigio */
.lyric-prev,
.lyric-next {
  color: #888;
  font-size: 0.8em;
}

/* =========================================================
   [4] PLAYER AUDIO
   ========================================================= */
audio {
  width: 100%;
  margin: 5px 0 5px;
  height: 48px;
}

/* Make play button larger */
audio::-webkit-media-controls-play-button {
  transform: scale(1.4);
}

audio::-webkit-media-controls-panel {
  height: 48px;
}

.spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #e38b1f; 
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
  flex-shrink: 0;
}

.spinner.show {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================================
   [5] PLAYLIST HEADER
   ========================================================= */
.playlist-header {
  margin-bottom: 8px;
  flex-shrink: 0;
}

.playlist-header h3 {
  margin: 0;
  font-size: 1.1em;
  line-height: 1;
}



/* Draft cruet button */
.draft-cruet-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.draft-cruet-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #e38b1f;
  stroke-width: 1.5;
  transition: all 0.3s ease;
}

.draft-cruet-btn svg .flask-fill {
  fill: none;
  transition: fill 0.3s ease;
}

.draft-cruet-btn:hover svg {
  transform: scale(1.1);
}

.draft-cruet-btn.active svg .flask-fill {
  fill: #e38b1f;
}

.draft-cruet-btn:active {
  transform: scale(0.9);
}

/* Info button */
.info-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.info-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #e38b1f;
  stroke-width: 2;
  transition: all 0.3s ease;
}

.info-btn:hover svg {
  transform: scale(1.1);
}

.info-btn:active {
  transform: scale(0.9);
}

/* Favs heart button */
.favs-heart-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.favs-heart-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #e38b1f;
  stroke-width: 2;
  transition: all 0.3s ease;
}

.favs-heart-btn:hover svg {
  transform: scale(1.1);
}

.favs-heart-btn.active svg {
  fill: #e38b1f;
  stroke: #e38b1f;
}

.favs-heart-btn:active {
  transform: scale(0.9);
}

/* =========================================================
   [6] LISTA BRANI
   ========================================================= */
ul {
  list-style: none;
  padding: 0 0 120px 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
}

li {
  background: #181818;
  padding: 6px 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  margin-bottom: 2px;
  cursor: pointer;
  transition: background .2s;
  gap: 8px;
  min-height: 44px;
}

li .track-title {
  flex: 1;
  cursor: pointer;
}

li:hover {
  background: #2a2a2a;
}

li.active {
  background: #e38b1f;
  color: #000;
}

li.active .heart-btn svg {
  stroke: #000000;
}

li.active .heart-btn.liked svg {
  fill: #ff0000;
  stroke: #ff0000;
}

.heart-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.heart-btn svg {
  fill: none;
  stroke: #e38b1f;
  stroke-width: 2;
  transition: all 0.3s ease;
}

.heart-btn:hover svg {
  stroke: #e38b1f;
  transform: scale(1.1);
}

.heart-btn.liked svg {
  fill: #ff0000;
  stroke: #ff0000;
}

.heart-btn:active {
  transform: scale(0.9);
}

/* Share button */
.share-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.share-btn svg {
  fill: none;
  stroke: #e38b1f;
  stroke-width: 2;
  transition: all 0.3s ease;
}

li.active .share-btn svg {
  stroke: #000000;
}

.share-btn:hover svg {
  stroke: #e38b1f;
  transform: scale(1.1);
}

.share-btn:active {
  transform: scale(0.9);
}

/* =========================================================
   [6.1] THUMB COVER IN LISTA
   ========================================================= */
.thumb {
  position: relative;
  width: 48px;
  height: 48px;
  margin-right: 8px;
  flex: 0 0 auto;
}

.thumb img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

/* =========================================================
   [6.2] DRAFT: TINTA BLUASTRA + MASCHERA
   ========================================================= */
li.draft .thumb img {
  filter: hue-rotate(200deg) saturate(1.25) brightness(0.9);
}

.draft-mask {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: rgba(80, 140, 255, 0.35);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* =========================================================
   [7] UPDATE BANNER
   ========================================================= */
.update-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #e38b1f 0%, #ffac42 100%);
  color: #000;
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  animation: slideDown 0.3s ease-out;
}

.update-banner.hidden {
  display: none;
}

.update-btn {
  padding: 6px 16px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9em;
  transition: background 0.2s, transform 0.1s;
}

.update-btn:hover {
  background: #2a2a2a;
  transform: scale(1.05);
}

.update-btn:active {
  transform: scale(0.98);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* =========================================================
   [7.5] INSTALL PWA BANNER
   ========================================================= */
.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #e38b1f 0%, #c77519 100%);
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  z-index: 9999;
  animation: slideUp 0.3s ease-out;
}

.install-banner.hidden {
  display: none;
}

.install-banner span {
  flex: 1;
  font-size: 0.9em;
}

.install-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.install-btn {
  background: white;
  color: #e38b1f;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9em;
  transition: transform 0.2s;
}

.install-btn:hover {
  transform: scale(1.05);
  background: #f5f5f5;
}

.dismiss-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.5);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1em;
  line-height: 1;
  transition: background 0.2s;
}

.dismiss-btn:hover {
  background: rgba(255,255,255,0.2);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* =========================================================
   [8] SECRET MODE
   ========================================================= */
.secret-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.secret-popup.hidden {
  display: none;
}

.secret-popup-content {
  background: linear-gradient(135deg, #6a0dad 0%, #9b30ff 100%);
  padding: 30px 40px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(138, 43, 226, 0.5);
  animation: scaleIn 0.3s ease-out;
}

.secret-icon {
  font-size: 3em;
  margin-bottom: 10px;
}

.secret-popup-content h3 {
  margin: 0 0 10px 0;
  font-size: 1.5em;
  color: #fff;
}

.secret-popup-content p {
  margin: 0;
  color: #e0e0e0;
  font-size: 1em;
}

.secret-indicator {
  margin-left: 8px;
  font-size: 1.1em;
  animation: glow 2s ease-in-out infinite;
}

.secret-indicator.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Secret track styling */
li.secret .thumb img {
  filter: hue-rotate(270deg) saturate(1.4) brightness(0.85);
}

.secret-mask {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: rgba(138, 43, 226, 0.4);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* =========================================================
   [10] SECRET CODE BUTTON & PANEL
   ========================================================= */
.secret-code-btn {
  background: transparent;
  border: 2px solid var(--text-dark);
  color: var(--text-dark);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.secret-code-btn:hover {
  background: var(--text-dark);
  color: var(--bg-light);
  transform: scale(1.1);
}

.secret-code-btn svg {
  stroke: currentColor;
}

/* Code Panel */
.code-panel-content {
  max-width: 400px;
  width: 90%;
}

.code-instruction {
  font-size: 0.9rem;
  color: var(--text-medium);
  margin: 10px 0 20px;
}

.code-input-wrapper {
  margin-bottom: 20px;
}

.code-input {
  width: 100%;
  padding: 12px;
  font-size: 1.5rem;
  text-align: center;
  border: 2px solid var(--text-dark);
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-family: monospace;
  font-weight: bold;
  background: #1a1a1a;
  color: #fff;
}

.code-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(227, 139, 31, 0.1);
}

.code-error {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 8px;
  text-align: center;
}

.code-success {
  color: #27ae60;
  font-size: 0.9rem;
  margin-top: 15px;
  padding: 10px;
  background: rgba(39, 174, 96, 0.1);
  border-radius: 6px;
  text-align: center;
}

.code-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.confirm-code-btn {
  background: var(--accent);
  color: var(--bg-light);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.confirm-code-btn:hover {
  background: #c77419;
  transform: translateY(-2px);
}

.confirm-code-btn:active {
  transform: translateY(0);
}

.clear-codes-btn {
  background: transparent;
  color: var(--text-medium);
  border: 2px solid var(--text-medium);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-codes-btn:hover {
  background: #e74c3c;
  border-color: #e74c3c;
  color: white;
}

/* =========================================================
   [9] NAVIGATION FOOTER
   ========================================================= */
.navigation-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(26, 26, 26, 0.5);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
  padding: 8px 12px;
}

.footer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 4px;
}

.footer-left,
.footer-center,
.footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-center {
  flex: 1;
  justify-content: center;
}

.footer-nav-btn {
  background: linear-gradient(135deg, #e38b1f, #ff6b35);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.footer-nav-btn svg {
  width: 24px;
  height: 24px;
}

.footer-nav-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(227, 139, 31, 0.4);
}

.footer-nav-btn:active {
  transform: scale(0.95);
}

.navigation-footer audio {
  width: 100%;
  margin: 0;
  height: 48px;
}

.version-info {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75em;
  padding: 0;
  margin: 0;
}
