
.donation-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.donation-modal-inner {
  background: white;
  padding: 30px;
  border-radius: 10px;
  color: black;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
}

.donation-amounts {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

#custom-amount,
#donation-note {
  width: 80%;
  padding: 8px;
  margin-bottom: 10px;
}

.donation-submit {
  background: #1DB954;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.donation-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.4em;
  cursor: pointer;
  color: #000;
}
/* Hide elements with .hidden utility class */
.hidden {
  display: none !important;
}


/* Header container */
.site-header {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center; /* centers the title */
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 1900; /* under the dev banner (2000) but above page content */
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
/* If the dev banner is present, push the header below it */
.dev-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  background: #000;
  color: #fff;
  font-size: 0.9em;
  padding: 8px 0;
  text-align: center;
  z-index: 2000;
  font-family: 'Futura', sans-serif;
  letter-spacing: 0.01em;
  margin: 0;
}
.dev-banner a,
.dev-banner a:visited,
.dev-banner a:hover,
.dev-banner a:active {
  color: inherit;
  text-decoration: underline;
  font-weight: normal;
}
body.has-dev-banner .site-header { top: var(--dev-banner-h, 40px); }

/* Site title uses the same font as the H1 on index (Michroma) */
.site-header .site-title {
  font-family: 'Michroma', sans-serif;
  font-size: 1.6em;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.35);
}

/* Left and right action zones (absolute so the title stays perfectly centered) */
.site-header .left-slot,
.site-header .right-slot {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-header .left-slot { left: 16px; }
.site-header .right-slot { right: 16px; }

/* Buttons */
.site-header .btn {
  display: inline-flex;
  align-items: center;
  background-color: #007bff;
  color: #fff !important;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.98em;
  font-family: 'Futura', sans-serif;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.site-header .btn:hover { background-color: #0069d9; }

/* User info (avatar + dropdown) */
.site-header .user-info {
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.45);
  padding: 6px 10px;
  border-radius: 10px;
}
.site-header .user-info img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.site-header .logout-btn {
  display: inline-flex;
  align-items: center;
  background-color: #dc3545;
  color: white !important;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.98em;
  font-family: 'Futura', sans-serif;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.site-header .logout-btn:hover {
  background-color: #c82333;
}

.site-header .avatar-dropdown { position: relative; cursor: pointer; }
.site-header .avatar-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 44px;
  right: auto;
  left: 0;
  transform: translateX(-100%);
  background: rgba(0,0,0,0.92);
  border-radius: 8px;
  padding: 8px;
  min-width: 160px;
  z-index: 2001;
  flex-direction: column;
  gap: 6px;
}
.site-header .avatar-dropdown .dropdown-menu a,
.site-header .avatar-dropdown .dropdown-menu button {
  display: block;
  background: none;
  border: none;
  color: white;
  text-align: left;
  padding: 8px;
  border-radius: 6px;
  text-decoration: none;
  font-family: 'Futura', sans-serif;
  font-size: 0.95em;
}
.site-header .avatar-dropdown .dropdown-menu a:hover,
.site-header .avatar-dropdown .dropdown-menu button:hover {
  background-color: rgba(255,255,255,0.1);
}
.site-header .avatar-dropdown.open .dropdown-menu { display: flex; }

/* ===== Auth Modal (header-owned) ===== */
.auth-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.32);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 3000; /* above dev banner (2000) and header (1900) */
}
.auth-overlay.show { display: flex; }
.auth-modal {
  width: min(92vw, 520px);
  background: rgba(18,18,18,0.94);
  border-radius: 18px;
  padding: 22px 22px 18px;
  color: #fff;
  z-index: 3001;
  border: 2px solid rgba(255,255,255,0.28); /* subtle white outline */
  box-shadow: 0 18px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.auth-modal * { box-sizing: border-box; }
.auth-section { display: none; }
.auth-section.show { display: block; }

.auth-title { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; text-align: center; font-family: 'Futura', sans-serif; }
.auth-header { display: flex; align-items: center; justify-content: center; margin-bottom: 12px; position: relative; }
.auth-close { position: absolute; right: 4px; top: 0; background: transparent; border: none; color: #fff; font-size: 22px; cursor: pointer; padding: 6px; border-radius: 8px; }
.auth-close:hover { background: rgba(255,255,255,0.10); }

/* Google button — clean, Google-ish */
.oauth-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 14px; border-radius: 12px; font-weight: 800; border: 1px solid #dadce0; background: #fff; color: #202124; cursor: pointer; text-decoration: none; font-family: 'Futura', sans-serif; }
.oauth-btn:hover { background: #f8f9fa; }

/* Inputs + primary action */
.auth-form { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 12px 0; }
.auth-form input { width: 100%; max-width: 100%; padding: 13px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.18); background: rgba(0,0,0,0.35); color: #fff; text-align: center; font-family: 'Futura', sans-serif; box-sizing: border-box; }
.auth-form button { padding: 13px; border-radius: 12px; border: none; background: #1f6fff; color: #fff; font-weight: 800; cursor: pointer; font-family: 'Futura', sans-serif; }
.auth-form button:hover { filter: brightness(1.06); }

.auth-hint { font-size: .92em; opacity: .9; text-align: center; }
.auth-error { color: #ff6b6b; font-weight: 800; }
.auth-ok { color: #2afadf; font-weight: 800; }

/* Link-style switch between login/signup */
.auth-switch { margin-top: 12px; text-align: center; }
.auth-link { color: #fff; text-decoration: underline; cursor: pointer; font-weight: 700; }
.auth-link:hover { opacity: .9; }


/* ==== DJ Set Analyzer main page styles (extracted from index.html) ==== */

.center-wrap {
  width: 80%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
}

.input-container {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  justify-content: center;
}

.dropzone {
  display: inline-block;
  width: 330px;
  padding: 6px 12px;
  border: 1px dashed rgba(255,255,255,0.5);
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(3px);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  margin-top: 6px;
  margin-left: auto;
  margin-right: auto;
}
.dropzone:hover {
  transform: translateY(-1px);
  border-color: #fff;
  background: rgba(0,0,0,0.28);
}
.dropzone.active {
  border-color: #2afadf;
  background: rgba(0,0,0,0.40);
}
.dropzone .icon {
  font-size: 28px;
  margin-bottom: 6px;
}
.dropzone .title {
  font-weight: 600;
  margin-bottom: 2px;
  font-size: 0.9em;
}
.dropzone .formats {
  font-size: 0.75em;
  opacity: 0.85;
}

.donate-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  background-color: #ffcb05;
  color: #222 !important;
  padding: 15px 25px;
  border-radius: 12px;
  font-size: 1.05em;
  font-family: 'Futura', sans-serif;
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: background 0.2s;
}
.donate-btn:hover {
  background-color: #ffe066;
}

.record-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  background-color: #ffcb05;
  color: #222 !important;
  padding: 15px 25px;
  border-radius: 12px;
  font-size: 1.05em;
  font-family: 'Futura', sans-serif;
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: background 0.2s;
}
.record-btn:hover {
  background-color: #ffe066;
}

.charts-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  background-color: #007bff;
  color: #fff !important;
  padding: 15px 25px;
  border-radius: 12px;
  font-size: 1.05em;
  font-family: 'Futura', sans-serif;
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: background 0.2s;
}
.charts-btn:hover {
  background-color: #0069d9;
}

/* --- HERO CONTAINER: Only use padding for spacing, no height logic --- */
.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

#progress-container {
  display: none;
  width: 80%;
  max-width: 500px;
  height: 35px;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.2);
  overflow: hidden;
  margin-top: 20px;
}
#progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2afadf, #ffcb05);
  transition: width 0.4s ease;
  border-radius: 20px;
}

#spotify {
  display: none;
  margin-top: 25px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
#spotify #spotify-link {
  font-size: 1.4em;
  background-color: #1DB954;
  color: white !important;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  transition: transform 0.2s ease;
}
#spotify #spotify-link:hover {
  transform: scale(1.1);
}
#new-analyze-link {
  background-color: white !important;
  color: #000 !important;
  font-size: 1.1em !important;
  padding: 8px 16px !important;
  border-radius: 25px !important;
  font-weight: bold !important;
  transition: transform 0.2s ease !important;
  font-family: 'Futura', sans-serif !important;
  text-align: center !important;
  border: none !important;
  text-decoration: none !important;
}

.gap-indicator {
  display: none;
  width: 80%;
  max-width: 720px;
  margin: 10px auto 0;
  text-align: center;
  font-size: 1.4em;
  font-weight: bold;
  background: linear-gradient(90deg, #ffffff, #ffcb05, #2afadf, #7928ca, #ff0080);
  background-size: 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: animatedGradient 8s ease infinite;
}
.gap-indicator.show {
  display: block;
}

.heartbeat {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-family: 'Futura', sans-serif;
  display: none;
  z-index: 1100;
}
.heartbeat.show {
  display: inline-flex;
  animation: pulseHint 2s ease-in-out infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes rainbowBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes bounceIn {
  0% { opacity: 0; transform: translateY(12px) scale(0.98); }
  60% { opacity: 1; transform: translateY(0) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes animatedGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes pulseHint {
  0% { opacity: 0.55; }
  50% { opacity: 1; }
  100% { opacity: 0.55; }
}
body {
  margin: 0;
  padding: 40px 0 140px;
  font-family: 'Futura', sans-serif;
  background: linear-gradient(270deg, #ff0080, #7928ca, #2ac2fa);
  background-size: 800% 800%;
  animation: rainbowBG 25s ease infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: white;
  min-height: 100vh;
  overflow-y: visible;
}
/* === Homepage input and button styling === */
input, button {
  padding: 10px;
  font-size: 1em;
  border: none;
  border-radius: 25px;
  outline: none;
  font-family: 'Futura', sans-serif;
}

input {
  width: 350px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.9);
  color: #000;
}

button {
  cursor: pointer;
  background-color: #000;
  color: white;
  transition: transform 0.2s ease;
}

.input-container button {
  padding: 10px 18px;
}

button:hover {
  transform: scale(1.1);
}

/* Restore original h1 style for index page */
h1 {
  font-family: 'Michroma', sans-serif;
  font-size: 3em;
  margin-bottom: 50px;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}
/* === Styles migrated from original <style> block in index.html === */

#status {
  font-size: 1.4em;
  margin-top: 15px;
  text-align: center;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, #ffffff, #ffcb05, #2afadf, #7928ca, #ff0080);
  background-size: 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: animatedGradient 8s ease infinite;
  min-height: 2.2em;
}

.center-wrap {
  width: 80%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
}


.input-container {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  justify-content: center;
}

.dropzone {
  display: inline-block;
  width: 330px;
  padding: 6px 12px;
  border: 1px dashed rgba(255,255,255,0.5);
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(3px);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  margin-top: 6px;
  margin-left: auto;
  margin-right: auto;
}
.dropzone:hover {
  transform: translateY(-1px);
  border-color: #fff;
  background: rgba(0,0,0,0.28);
}
.dropzone.active {
  border-color: #2afadf;
  background: rgba(0,0,0,0.40);
}
.dropzone .icon {
  font-size: 28px;
  margin-bottom: 6px;
}
.dropzone .title {
  font-weight: 600;
  margin-bottom: 2px;
  font-size: 0.9em;
}
.dropzone .formats {
  font-size: 0.75em;
  opacity: 0.85;
}

#file-name {
  margin-top: 8px;
  text-align: center;
  color: #fff;
  font-size: 1em;
  font-family: 'Futura', sans-serif;
  opacity: 0.86;
}

#progress-container {
  display: none;
  width: 80%;
  max-width: 500px;
  height: 35px;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.2);
  overflow: hidden;
  margin-top: 20px;
}
#progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2afadf, #ffcb05);
  transition: width 0.4s ease;
  border-radius: 20px;
}

#titles {
  list-style: none;
  padding: 0;
  margin: 40px auto 0;
  max-width: 720px;
  width: 90%;
  font-size: 1.12em;
}
#titles li {
  background: rgba(0,0,0,0.38);
  border-radius: 12px;
  margin-bottom: 18px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: bounceIn 0.5s;
}

.spotify-card {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none);
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  animation: bounceIn 0.5s;
}
.spotify-card iframe {
  width: 100%;
  height: 152px;
  border-radius: 12px;
}

.play-button {
  margin-left: 10px;
  border: none;
  background: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #1DB954;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3em;
  transition: background 0.16s, color 0.16s, border 0.16s;
}
.play-button.playing {
  background: #1DB954;
  color: #fff;
  border: 2px solid #fff;
}

#spotify {
  display: none;
  margin-top: 25px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
#spotify #spotify-link {
  font-size: 1.4em;
  background-color: #1DB954;
  color: white !important;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  transition: transform 0.2s ease;
}
#spotify #spotify-link:hover {
  transform: scale(1.1);
}
#new-analyze-link {
  background-color: white !important;
  color: #000 !important;
  font-size: 1.1em !important;
  padding: 8px 16px !important;
  border-radius: 25px !important;
  font-weight: bold !important;
  transition: transform 0.2s ease !important;
  font-family: 'Futura', sans-serif !important;
  text-align: center !important;
  border: none !important;
  text-decoration: none !important;
}

.donate-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: auto;
  transform: none;
  display: inline-flex;
  align-items: center;
  background-color: #ffcb05;
  color: #222 !important;
  padding: 15px 25px;
  border-radius: 12px;
  font-size: 1.05em;
  font-family: 'Futura', sans-serif;
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: background 0.2s;
}
.donate-btn:hover {
  background-color: #ffe066;
}

.charts-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  background-color: #007bff;
  color: #fff !important;
  padding: 15px 25px;
  border-radius: 12px;
  font-size: 1.05em;
  font-family: 'Futura', sans-serif;
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: background 0.2s;
}
.charts-btn:hover {
  background-color: #0069d9;
}

.gap-indicator {
  display: none;
  width: 80%;
  max-width: 720px;
  margin: 10px auto 0;
  text-align: center;
  font-size: 1.4em;
  font-weight: bold;
  background: linear-gradient(90deg, #ffffff, #ffcb05, #2afadf, #7928ca, #ff0080);
  background-size: 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: animatedGradient 8s ease infinite;
}
.gap-indicator.show {
  display: block;
}

.heartbeat {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-family: 'Futura', sans-serif;
  display: none;
  z-index: 1100;
}
.heartbeat.show {
  display: inline-flex;
  animation: pulseHint 2s ease-in-out infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes rainbowBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes bounceIn {
  0% { opacity: 0; transform: translateY(12px) scale(0.98); }
  60% { opacity: 1; transform: translateY(0) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes animatedGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes pulseHint {
  0% { opacity: 0.55; }
  50% { opacity: 1; }
  100% { opacity: 0.55; }
}

/* === Styles migrated from original <style> block in charts.html === */


    :root { --gap: 14px; --radius: 14px; }
    * { box-sizing: border-box; }
   
    .wrap { width: 92%; max-width: 1100px; margin: 0 auto; }
    header.charts { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); background: rgba(0,0,0,.25); border-bottom: 1px solid rgba(255,255,255,.15); width: 100%;   padding-bottom: 25px;}
    .head-inner {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 16px;
      padding-top: 100px;
    }

    .btn { display:inline-flex; align-items:center; gap:8px; padding: 10px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.35); color: #fff; text-decoration: none; font-weight: 700; cursor: pointer; }
    .btn:hover { transform: translateY(-1px); }

    .tabs {
      display: flex;
      gap: var(--gap);
      flex-wrap: wrap;
      margin-bottom: 25px;
    }
    .tab { appearance:none; border: 1px solid rgba(255,255,255,.6); background: rgba(0,0,0,.35); color:#fff; padding:10px 14px; border-radius: 999px; cursor:pointer; font-weight:700; }
    .tab[aria-selected="true"] { background:#000; border-color:#fff; }

    .subtabs { margin-top: 10px; margin-bottom: 30px;}
    .subtabs select { padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.6); background: rgba(0,0,0,.35); color: #fff; font-weight: 700; }

    main { padding-top: 20px; }
    .toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin: 8px 0 18px; }
    .toolbar .info { opacity:.9; }
    .toolbar .reload { border:1px solid rgba(255,255,255,.6); background: transparent; color:#fff; padding:8px 12px; border-radius:12px; cursor:pointer; font-weight:700; }

    .grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
    /* ---- Library card style: restored dark card ---- */
    .library-card {
      background: rgba(24, 24, 24, 0.9);
      border-radius: 12px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.5);
      padding: 14px 16px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    /* ---- End library card style ---- */
    .card { background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); padding: 14px; display:flex; gap:12px; align-items:flex-start; box-shadow: 0 2px 6px rgba(0,0,0,.25); animation: fadeIn 220ms ease-out; }
    @keyframes fadeIn { from {opacity:0; transform: translateY(6px);} to {opacity:1; transform: translateY(0);} }
    .rank { padding: 10px 10px !important; border-radius: 10px; background: rgba(0,0,0,.5); display:grid; place-items:center; font-weight: 900; }
    .title { margin: 0; font-size: 16px; }
    .meta { opacity:.9; font-size: 13px; margin-top: 4px; }
    .badges { display:flex; gap:6px; margin-top: 8px; flex-wrap: wrap; }
    .badge { font-size: 12px; padding: 4px 8px; border-radius: 999px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.25); }

    .state { text-align:center; opacity:.95; padding: 24px 8px; }
    a { color: inherit; text-decoration: none; }
    .likes { display:inline-flex; align-items:center; gap:4px; font-size:0.88rem; color:#ff9800; }


        .main {
      max-width: 960px;
      margin: 180px auto 40px;
      background: rgba(12,12,14,0.95);
      border-radius: 16px;
      padding: 32px 28px 40px;
      box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    }
    .faq {
      max-width: 800px;
      margin: auto;
    }
    .faq h3 {
      margin-top: 25px;
      font-size: 1.3em;
      color: #ffffff;
    }
    .faq p {
      margin-top: 8px;
      font-size: 1em;
      line-height: 1.5;
      opacity: 0.95;
    }

    .faq-btn {
  background-color: #007bff;
  color: #fff !important;
  padding: 15px 25px;
  border-radius: 12px;
  font-size: 1.05em;
  font-family: 'Futura', sans-serif;
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: background 0.2s;
}
.faq-btn:hover {
  background-color: #0069d9;
}

/* === Styles migrated from original <style> block in library.html === */

    ul.playlists { list-style:none; margin:0; padding:0; display:grid; gap:12px; }


    .title { color:#fff; font-weight:700; text-decoration:none; font-size:1.05rem; }
    .title:hover { text-decoration:underline; }
.meta {
  color:#cfd3d8;
  font-size:.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
    .meta a { color:#9ecbff; text-decoration:none; }
    .meta a:hover { text-decoration:underline; }
    .spotify-btn {
      display: inline-flex;
      align-items: center;
      background-color: #1DB954;
      color: #fff !important;
      padding: 2px 8px;
      border-radius: 12px;
      font-size: 0.8rem;
      text-decoration: none;
      font-weight: 600;
    }
    .spotify-btn:hover {
      background-color: #17a84b;
    }
    .source-btn {
      display: inline-flex;
      align-items: center;
      background-color: #007bff;
      color: #fff !important;
      padding: 2px 8px;
      border-radius: 12px;
      font-size: 0.8rem;
      text-decoration: none;
      font-weight: 600;
    }
    .source-btn:hover {
      background-color: #0069d9;
    }
    .chips { display:flex; gap:6px; flex-wrap:wrap; }
    .chip { background:#111; border:1px solid #2a2a2a; color:#cfd3d8; padding:2px 8px; border-radius:999px; font-size:.78rem; }
    .empty { opacity:.9; background:rgba(24,24,24,.6); padding:14px 16px; border-radius:10px; }
    .open-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background-color: #ff0080;
      color: #fff !important;
      padding: 6px 14px;
      border-radius: 12px;
      font-size: 0.85rem;
      text-decoration: none;
      font-weight: 600;
    }
    .open-btn:hover {
      background-color: #e60073;
    }
    .searchbar {
      flex: 0 0 320px;
      margin-left: auto;
      height: 38px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.2);
      background: rgba(0,0,0,0.75);
      color: #fff;
      padding: 0 12px;
      font-size: 0.98rem;
      outline: none;
    }
    .searchbar::placeholder { color: #cfd3d8; opacity: .9; }
    .searchbar:focus {
      border-color: #9ecbff;
      box-shadow: 0 0 0 3px rgba(158,203,255,0.2);
      background: rgba(0,0,0,0.9);
    }
    @media (max-width: 640px) {
      .searchbar { flex-basis: 100%; margin-left: 0; }
      .toolbar { flex-wrap: wrap; }
    }
    .likes {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 0.88rem;
      color: #ff9800;
    }
    .pagination {
      margin-top: 24px;
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 6px;
    }
    .page-btn {
      display: inline-block;
      padding: 6px 10px;
      border-radius: 6px;
      background: rgba(0,0,0,0.6);
      color: #fff;
      font-size: 0.9rem;
      text-decoration: none;
      min-width: 32px;
      text-align: center;
    }
    .page-btn:hover {
      background: rgba(255,255,255,0.2);
    }
    .page-btn.current {
      background: #ff9800;
      color: #000;
      font-weight: 700;
    }
    .page-btn.dots {
      background: transparent;
      color: #ccc;
      cursor: default;
    }

.inline-like-btn {
  background: white;
  border: none;
  padding: 2px 6px;
  color: #000000;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

.inline-like-btn svg {
  width: 16px;
  height: 16px;
  fill: red;
}

.inline-like-btn.liked {
  opacity: 1;
}
.custom-dropdown {
  position: relative;
  display: inline-block;
  font-family: 'Futura', sans-serif;
}

.dropdown-trigger {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-family: 'Futura', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.5);
  text-align: center;
  text-shadow: 0 0 6px rgba(255,255,255,0.25);
  box-shadow: 0 0 3px rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  cursor: pointer;
  min-width: 180px;
  margin: 0;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  margin-top: 2px;
  left: 0;
  width: 100%;
  max-width: none;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 4px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.dropdown-menu li {
  padding: 8px 12px;
  color: #fff;
  cursor: pointer;
  font-family: 'Futura', sans-serif;
  font-size: 0.92rem;
  transition: background 0.2s;
  text-align: center;
}

.dropdown-menu li:hover {
  background-color: #007bff;
}

.custom-dropdown-wrapper {
  position: relative;
  display: inline-block;
}
.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-anchor {
  position: relative;
  display: inline-block;
}
.dropdown-trigger.default {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.6);
  color: #fff;
}

.clear-subgenre {
  background: #007bff;
  color: white;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  font-size: 0.75rem;
  font-weight: 900;
  width: 18px;
  height: 18px;
  line-height: 1;
  cursor: pointer;
}



    .spotify-btn:hover { background-color: #17a84b; }
    .source-btn {
      display: inline-flex;
      align-items: center;
      background-color: #007bff;
      color: #fff !important;
      padding: 2px 8px;
      border-radius: 12px;
      font-size: 0.8rem;
      text-decoration: none;
      font-weight: 600;
    }
    .source-btn:hover { background-color: #0069d9; }
    .wrap { width: 100%; max-width: 900px; padding: 0 16px; }
    .toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom: 12px; }
    .toolbar a.btn { text-decoration:none; color:#fff; background:#000; border-radius:20px; padding:10px 14px; font-weight:600; }
    .toolbar a.btn:hover { opacity:.9; }
    .meta { color:#cfd3d8; font-size:.9rem; display:flex; flex-wrap:wrap; gap:10px; margin-bottom: 10px; }
/* CARD VARIANTS */
.library-card {
  background: rgba(24,24,24,0.9);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  padding: 14px 16px;
}

.profile-card {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.playlist-card {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.playlist-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
    .track-list { display: grid; gap: 12px; }
    .track-item { display:flex; gap:12px; align-items:flex-start; background: rgba(24,24,24,0.9); border-radius: 12px; padding: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.5); }
    .cover { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
    .track-info { display:flex; flex-direction:column; gap:6px; }
    .track-title { font-weight:700; }
    iframe { border-radius: 12px; width: 100%; height: 80px; }
    .empty { opacity:.9; background:rgba(24,24,24,.6); padding:14px 16px; border-radius:10px; }
    /* —— Inline wide player between meta and tracks —— */
    .player-embed { width: 100%; margin: 12px 0; display: flex; justify-content: center; }
    .player-embed .player-inner {
      background: rgba(24,24,24,0.9);
      border-radius: 12px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.5);
      padding: 0;
      width: 100%;
      max-width: 900px;
    }
    .player-embed .video-wrapper { width: 100%; }
    .player-embed .video-wrapper iframe {
      width: 100%;
      height: 100%;
      min-height: 0;
      border: 0;
      border-radius: 12px;
      display: block;
    }
    /* 16:9 for YouTube; height explicitly for SC */
    .player-embed .video-wrapper.ratio-16x9 {
      aspect-ratio: 16 / 9;
      height: auto;
      display: flex;
    }
    .like-section {
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    .like-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: #fff;
      border: 2px solid #fff;
      border-radius: 20px;
      padding: 0px 12px;
      font-size: 1.2rem;
      cursor: pointer;
      color: #000;
      font-weight: 600;
      transition: background 0.2s ease;
    }
    .like-btn svg {
      fill: red;
    }
    .like-btn:hover:not(.liked) {
      background: #f0f0f0;
    }
    .like-btn.liked {
      border: 2px solid #000;
      cursor: default;
    }

    .genre-tags { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
    .badge { display:inline-block; padding:2px 8px; border-radius:12px; font-size:.80rem; font-weight:700; background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.25); color:#fff; }
    .badge-main { background:#111; border-color:#fff; }
    .vinyl-spin {
      margin-top: 40px;
      perspective: 800px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .spotify-embed {
      width: 100%;
      display: block;
    }



/* === Styles migrated from original <style> block in profil_public.html === */
body.profil-public .hdr { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
body.profil-public .hdr-inn { display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 12px 16px; background: transparent; border-bottom: none; }
body.profil-public .brand { font-family: 'Michroma', sans-serif; font-weight: 400; letter-spacing: 0.5px; font-size: 3em; text-align: center; text-transform: uppercase; }
body.profil-public .btn { display: inline-block; padding: 10px 14px; border-radius: 12px; border: 1px solid #007bff; background: #007bff; color: #fff; cursor: pointer; font-weight: 700; }
body.profil-public .btn:hover { background: #0069d9; border-color: #0069d9; }
body.profil-public .pill { padding: 8px 12px; border-radius: 999px; border: 1px solid #007bff; background: #007bff; color: #fff; font-size: 0.95rem; font-weight: 700; }
body.profil-public .flex-spacer { flex: 1; }

body.profil-public .wrap { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
body.profil-public .footsp { height: 40px; }

body.profil-public .grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (max-width: 840px){ body.profil-public .grid { } }

body.profil-public .card { background: rgba(255,255,255,0.9); border: 1px solid rgba(0,0,0,0.08); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
body.profil-public .card-bd { padding: 16px; }

body.profil-public .avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(0,0,0,0.06); background: #fff; display: block; }
body.profil-public .profile-title { font-size: 1.4rem; font-weight: 900; }
body.profil-public .muted { color: #4b5563; }

body.profil-public .kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  align-items: start;
}
body.profil-public .kv b { color: #111827; font-weight: 700; }

body.profil-public .section-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
body.profil-public .section-hd h2 { margin: 0; font-size: 1.1rem; letter-spacing: 0.2px; display: inline-block; padding: 8px 14px; border-radius: 12px; background: #007bff; color: #fff; border: 1px solid #007bff; }

body.profil-public .pl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px){ body.profil-public .pl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px){ body.profil-public .pl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px){ body.profil-public .pl-grid { grid-template-columns: 1fr; } }
body.profil-public .pl {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  max-width: 100%;
  height: auto;
}
body.profil-public .pl:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.08); }
body.profil-public .pl img { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; display: block; }
body.profil-public .cover-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; }
body.profil-public .cover-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.profil-public .pl-bd { padding: 8px 10px; }
body.profil-public .ttl { font-weight: 800; font-size: 0.90rem; line-height: 1.2; }
body.profil-public .meta { color: #6b7280; font-size: 0.9rem; margin-top: 2px; }

body.profil-public .empty { color: #374151; background: rgba(255,255,255,0.7); border: 1px dashed rgba(0,0,0,0.15); padding: 16px; border-radius: 12px; text-align: center; }


body.profil-public .d-flex { display: flex; }
body.profil-public .align-center { align-items: center; }
body.profil-public .gap-16 { gap: 16px; }


body.profil-public #uBio[contenteditable="true"]{ outline: none; background: rgba(255,255,255,0.9); border: 1px dashed rgba(0,0,0,0.2); padding: 6px; border-radius: 8px; }

body.profil-public .modal{ position: fixed; inset: 0; z-index: 50; }
body.profil-public .modal-ovl{ position:absolute; inset:0; background: rgba(0,0,0,0.45); }
body.profil-public .modal-card{ position: relative; max-width: 520px; margin: 8vh auto; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); overflow: hidden; }
body.profil-public .modal-hd{ display:flex; align-items:center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(0,0,0,0.06); background: rgba(255,255,255,0.85); }
body.profil-public .modal-bd{ padding: 16px; }
body.profil-public .modal-ft{ display:flex; gap:8px; justify-content:flex-end; padding: 12px 16px; border-top: 1px solid rgba(0,0,0,0.06); }
body.profil-public .lbl{ display:block; font-weight:700; margin-bottom:6px; }
body.profil-public .inp{ width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.12); background: rgba(255,255,255,0.9); font-size: 0.98rem; }
body.profil-public .hint{ margin-top:6px; font-size:0.85rem; }
body.profil-public .hint.ok{ color: #065f46; }
body.profil-public .hint.err{ color: #991b1b; }
body.profil-public #toast{ position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; background: #111827; color:#fff; padding:10px 14px; border-radius: 10px; font-weight:700; display:none; box-shadow: 0 6px 20px rgba(0,0,0,0.3); }

body.profil-public .public-handle { font-size: 1.6rem; font-weight: 900; }
body.profil-public .public-sub { color:#4b5563; font-size: 0.95rem; }

body.profil-public .card-bd {
  min-width: 0;
}
/* body.profil-public .card-bd > .d-flex.flex-column {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  width: 100%;
  gap: 16px;
} */

body.profil-public .card-bd .d-flex.align-center {
  width: 100%;
  flex-wrap: wrap;
}
/* body.profil-public .profil-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

body.profil-public .profil-stack > div:first-child {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

body.profil-public .profil-stack > .kv {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
} */

body.profil-public .card {
  flex-direction: column;
}

body.profil-public .grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 20px;
  align-items: start;
}
body.profil-public .card-bd.d-flex {
  flex-wrap: wrap;
}

body.profil-public .card-bd.d-flex > div:last-child {
  flex: 1 1 auto;
  min-width: 0;
}


body.profil-public .profile-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: #111827;
}

/* === Unified profile view for both private and public profiles === */
body.unified-profile .pl {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.unified-profile .pl:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

body.unified-profile .pl img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  display: block;
}

body.unified-profile .pl .pl-bd .ttl {
  font-weight: 800;
  font-size: 0.90rem;
  line-height: 1.2;
  color: #111827;
  display: block;
  margin-top: 6px;
  text-align: left;
}

body.unified-profile .pl .pl-bd {
  display: block;
  padding: 8px 10px;
}

body.unified-profile .meta {
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: 2px;
}
/* Global .ttl style for playlist titles */
.ttl {
  font-weight: 800;
  font-size: 0.90rem;
  line-height: 1.2;
  color: #111827;
}
/* === Popular Playlist Strip (horizontal scrollable) === */
.popular-strip-wrap {
  width: 100%;
  overflow-x: auto;
  padding: 16px 0;
  margin: 40px 0 20px;
  position: relative;
}
.popular-strip {
  display: flex;
  gap: 14px;
  padding: 0 4px;
  min-height: 200px;
}
.popular-strip .pl {
  flex: 0 0 auto;
  width: 160px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}
.popular-strip .pl:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.popular-strip .pl img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
}
.popular-strip .pl-bd {
  padding: 8px 10px;
}
.popular-strip .ttl {
  font-weight: 800;
  font-size: 0.90rem;
  line-height: 1.2;
  color: #111827;
  margin-bottom: 4px;
}
.popular-strip .meta {
  color: #6b7280;
  font-size: 0.9rem;
}
.popular-strip .like-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  background: #fff;
  color: #000000;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 900;
  font-family: 'Futura', sans-serif;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.popular-strip .pl {
  position: relative;
}

.donation-input {
  width: 80%;
  padding: 8px;
  margin: 10px auto;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  text-align: center;
  background-color: #fff;
  color: #000;
  display: block;
}