/* =============================
   Global Scrollbar Styling
   ============================= */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-elev);
}
/* WebKit browsers */
html::-webkit-scrollbar {
  width: 12px;
  background: var(--bg-elev);
}
html::-webkit-scrollbar-track {
  background: var(--bg-elev);
}
html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent) 0%, var(--primary) 100%);
  border-radius: 10px;
  border: 2px solid var(--bg-elev);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
html::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #a3d9ff 0%, #8ef3c5 100%);
}
html::-webkit-scrollbar-corner {
  background: var(--bg-elev);
}

@media (max-width: 700px) {
  html::-webkit-scrollbar {
    width: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html::-webkit-scrollbar-thumb {
    transition: none;
  }
}
/* Rap Reveal — Styles */
:root {
  --bg: #0b1020;
  --bg-elev: #11162a;
  --text: #e5e7eb;
  --muted: #9aa3b2;
  --primary: #6ee7b7;
  --primary-ink: #0b3b2a;
  --border: #2a3352;
  --card: #121a32;
  --accent: #93c5fd;
}
* {
  box-sizing: border-box;
  min-width: 0;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    Poppins,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Inter,
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  word-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
* {
  -webkit-tap-highlight-color: transparent;
}
button,
.btn,
a,
.song-card,
.artist-item {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}
img {
  max-width: 100%;
  height: auto;
}
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding: 1rem;
  overflow-x: hidden;
}
.site-header {
  position: sticky;
  top: 0;
  background: rgba(11, 16, 32, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 1000; /* elevate above content so dropdown can overlay */
  overflow: visible; /* allow search suggestions to render outside header height */
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
a.brand,
a.brand:link,
a.brand:visited {
  text-decoration: none;
  color: inherit;
}
a.brand:hover {
  filter: brightness(1.1);
}
.logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.brand h1 {
  font-family: "Bebas Neue", Poppins, sans-serif;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 1.25rem;
}

.brand h1::after {
  content: " — hip hop";
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  margin-left: 0.6rem;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0.5px;
}

.header-search {
  flex: 1;
  max-width: 500px;
}
.header-search input {
  width: 100%;
  padding: 0.6rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.header-search input::placeholder {
  color: var(--muted);
}
.header-search input:focus {
  outline: none;
  border-color: var(--primary);
}
.header-actions {
  display: flex;
  gap: 0.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.1);
}
a.btn,
a.btn:link,
a.btn:visited,
a.btn:hover,
a.btn:active {
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: transparent;
}
.btn-ghost {
  background: transparent;
}
.file-btn {
  position: relative;
  overflow: hidden;
}

.content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
}
.input-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.input-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.input-form input,
.input-form textarea {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  color: var(--text);
  padding: 0.75rem;
}
.lyrics-label textarea {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
.options {
  margin-top: 0.5rem;
}
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.hint {
  color: var(--muted);
  font-size: 0.9rem;
}
.tools {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.legal-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
@media (min-width: 800px) {
  .summary-cards {
    grid-template-columns: repeat(6, 1fr);
  }
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem;
}

.card .label {
  color: var(--muted);
  font-size: 0.8rem;
}
.card .value {
  font-size: 1.4rem;
  font-weight: 700;
}

.legend {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
  padding: 0.5rem;
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
}
.legend-title {
  color: var(--muted);
  font-size: 0.9rem;
}
.legend-items {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 0.85rem;
}
.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.muted {
  color: var(--muted);
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-elev), #0b1326);
  position: relative;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 1rem 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 1.1fr 0.8fr 0.7fr 1fr;
    align-items: start;
  }
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-brand .logo.small {
  width: 42px;
  height: 42px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-social {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.footer-social .social {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: var(--card);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.footer-social .social:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
}

/* Legal Pages Styling */
.legal-main {
  max-width: 700px;
  margin: 2.5rem auto 2.5rem auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  padding: 2.5rem 2rem;
}
.legal-main h1 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 1.2rem;
  text-align: center;
}
.legal-main h2 {
  font-size: 1.25rem;
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 0.7rem;
}
.legal-main p,
.legal-main ul {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 1.1rem;
  line-height: 1.7;
}
.legal-main ul {
  padding-left: 1.5rem;
}
.legal-main li {
  margin-bottom: 0.5rem;
}
.legal-main {
  animation: fadeInLegal 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeInLegal {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.footer-social img {
  width: 22px;
  height: 22px;
}
.footer-social svg {
  width: 22px;
  height: 22px;
  color: var(--text);
  transition: color 0.2s;
}
.footer-social .social:hover svg {
  color: var(--primary);
}
.footer-credit {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: flex-end;
}
.footer-credit a {
  color: var(--accent);
}

/* Contact Page */
.contact-container {
  max-width: 900px;
  margin: 2rem auto;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.contact-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary);
  margin-bottom: 0.5rem;
}
.contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.contact-card h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary);
}
.contact-card p {
  margin: 0;
}
.contact-socials {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.5rem;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
}
.social-link:hover {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.social-link img,
.social-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.social-link span {
  font-weight: 500;
}

@media (prefers-reduced-motion: no-preference) {
  .footer-social .social {
    transition:
      background 0.15s ease,
      transform 0.15s ease;
  }
  .footer-social .social:hover {
    transform: translateY(-2px);
  }
}

/* Utility */
.hidden {
  display: none !important;
}
.visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0;
  border: 0;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.modal-content {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 1.25rem;
  width: min(560px, 92vw);
}
.modal-content h3 {
  margin: 0 0 0.5rem;
}
.modal-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: var(--muted);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* Catalog */
.catalog-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.catalog-header input {
  flex: 1;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  color: var(--text);
  padding: 0.6rem;
}
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 800px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.card.song {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem;
}
.card.artist {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
}
.song-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.tag {
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--card);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.tag:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: #1f273d;
  display: block;
}
.avatar.small {
  width: 40px;
  height: 40px;
}
.artist-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.artist-meta strong {
  font-size: 1.05rem;
}
.focus-ring:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.card:hover {
  background: rgba(255, 255, 255, 0.03);
}
@media (prefers-reduced-motion: no-preference) {
  .card {
    transition:
      background 0.15s ease,
      transform 0.15s ease;
  }
  .card.artist:hover {
    transform: translateY(-2px);
  }
}
button.btn,
a.btn {
  position: relative;
}
button.btn:focus-visible,
a.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Base button styling for consistent sizing */
a.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.6rem 1rem;
  line-height: 1;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s,
    filter 0.2s;
  min-height: 40px;
}
a.btn:hover,
button.btn:hover {
  background: rgba(255, 255, 255, 0.06);
}
.btn.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}
.btn.btn-primary:hover {
  filter: brightness(1.05);
}

/* Make header buttons equal width on desktop, full-width on narrow screens */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pill {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1rem;
}

.breakdown-credit {
  margin-top: 1rem;
  padding: 0.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Song view */
.song-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.song-meta {
  flex: 1;
  min-width: 0;
}
.song-meta h2 {
  margin: 0 0 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* View counter styles */
.view-count,
.song-view-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: normal;
}
.view-count svg,
.song-view-count svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.song-view-count {
  font-size: 0.9rem;
  padding: 0.25rem 0.6rem;
  background: var(--bg-elev);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.song-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.view-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.view-controls .control-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.4rem 0.6rem;
}
.view-controls .control-item.size {
  padding-right: 0.8rem;
}
.view-controls input[type="range"] {
  width: 160px;
}
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 1000px) {
  .split {
    grid-template-columns: 1fr 1fr;
    position: relative;
  }
  .splitter {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6px;
    background: rgba(147, 197, 253, 0.2);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    cursor: col-resize;
    z-index: 2;
    border-radius: 3px;
  }
  .splitter:hover {
    background: rgba(147, 197, 253, 0.35);
  }
}
.col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
}
.prewrap {
  white-space: pre-wrap;
  word-break: break-word;
}

/* Comments Section */
.comments-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.comments-section h3 {
  margin: 0 0 1rem 0;
  color: var(--primary);
}

.comments-section h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
}

.comments-list {
  max-height: 600px;
  overflow-y: auto;
  margin-bottom: 2rem;
  padding-right: 0.5rem;
  scroll-behavior: smooth;
}

.comments-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.load-more-container {
  text-align: center;
  padding: 1rem 0;
  margin-top: 0.5rem;
}

.load-more-btn {
  background: var(--bg-elev) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 0.75rem 1.5rem !important;
}

.load-more-btn:hover {
  background: var(--card) !important;
  border-color: var(--primary) !important;
}

.comment {
  padding: 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment-author {
  color: var(--primary);
  font-size: 0.95rem;
}

.comment-time {
  font-size: 0.85rem;
}

.comment-text {
  margin: 0;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-form {
  padding: 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.comment-form textarea {
  resize: vertical;
  min-height: 100px;
}

.comment-form button {
  margin-bottom: 0.5rem;
}

/* 404 Not Found */
.not-found {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 600px;
  margin: 0 auto;
}
.not-found h2 {
  font-size: 5rem;
  margin: 0;
  color: var(--primary);
  font-weight: 900;
}
.not-found p {
  font-size: 1.25rem;
  margin: 1rem 0 2rem;
}
.not-found .actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.not-found button {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--primary-ink);
  border: none;
  border-radius: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s,
    filter 0.2s;
}
.not-found button:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.not-found button:active {
  transform: translateY(0);
}
.breakdown span[class^="rh-"],
.breakdown span[class*=" rh-"] {
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 2px solid currentColor;
  border-radius: 0.25rem;
  padding: 0 0.1rem;
}
.breakdown .note {
  color: #fcd34d;
}
.breakdown .emph {
  font-weight: 700;
}
.breakdown .bar {
  display: inline-block;
  min-width: 6px;
  height: 1em;
  background: var(--accent);
}

/* Artist Slideshow */
.artist-slideshow {
  margin-bottom: 2rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem 1rem;
  overflow: hidden;
}
.slideshow-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}
.slides-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 240px;
}
.slide {
  display: none;
  text-align: center;
  animation: fadeIn 0.5s ease-in-out;
}
.slide.active {
  display: block;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.slide-artist-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  margin: 0 auto 1rem;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.slide-artist-name {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.slide-artist-count {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1rem;
}
.slide-artist-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--primary);
  color: var(--primary-ink);
  border: none;
  border-radius: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.2s,
    filter 0.2s;
}
.slide-artist-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.slide-nav {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    transform 0.2s;
  flex-shrink: 0;
}
.slide-nav:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}
.slide-nav:active {
  transform: scale(0.95);
}
.slide-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition:
    background 0.3s,
    transform 0.2s;
}
.dot.active {
  background: var(--primary);
  transform: scale(1.3);
}
.dot:hover {
  background: var(--accent);
}

/* Stats Overview */
.stats-overview {
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.3s;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
  opacity: 0;
  animation: fadeInScale 0.5s ease forwards;
}

.stat-card:nth-child(1) {
  animation-delay: 0.4s;
}
.stat-card:nth-child(2) {
  animation-delay: 0.5s;
}
.stat-card:nth-child(3) {
  animation-delay: 0.6s;
}
.stat-card:nth-child(4) {
  animation-delay: 0.7s;
}
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.stat-card:hover {
  transform: translateY(-4px);
  background: rgba(110, 231, 183, 0.1);
  box-shadow: 0 8px 24px rgba(110, 231, 183, 0.2);
}
.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}
.stat-card:hover .stat-icon {
  animation: none;
  transform: scale(1.2);
  transition: transform 0.3s ease;
}
.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
  transition: color 0.3s ease;
}
.stat-card:hover .stat-value {
  color: var(--accent);
}
.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Responsive header */
@media (max-width: 768px) {
  /* Song view bar stacks neatly on mobile */
  .song-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .song-meta h2 {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .song-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .song-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
  }
  .header-actions {
    flex-wrap: wrap;
  }
  .not-found h2 {
    font-size: 3.5rem;
  }

  /* Mobile responsive adjustments */
  .container {
    padding: 0.75rem;
  }

  /* Cards and grids */
  .summary-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .card {
    padding: 0.6rem;
  }

  .card .value {
    font-size: 1.2rem;
  }

  /* Stats overview */
  .stats-overview {
    padding: 1rem 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.8rem;
  }

  /* Artist list */
  .artist-list {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .card.artist {
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .card.artist .avatar {
    width: 60px;
    height: 60px;
  }

  .card.artist .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .artist-meta strong {
    word-break: break-word;
    font-size: 0.95rem;
  }

  /* Catalog */
  .catalog-list {
    gap: 0.75rem;
  }

  /* Song cards - prevent button overflow */
  .card.song {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .card.song .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .song-head {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }

  .song-head strong {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Song view */
  .split {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .splitter {
    display: none !important;
  }

  .col {
    padding: 0.75rem;
  }

  .view-controls {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .view-controls input[type="range"] {
    width: 100%;
  }

  /* Artist slideshow */
  .artist-slideshow {
    padding: 1rem 0.75rem;
    margin-bottom: 1.5rem;
  }

  .slideshow-container {
    flex-direction: column;
    gap: 1rem;
  }

  .slides-wrapper {
    min-height: auto;
    width: 100%;
  }

  .slide-artist-avatar {
    width: 80px;
    height: 80px;
    margin-bottom: 0.75rem;
  }

  .slide-artist-name {
    font-size: 1.3rem;
    line-height: 1.2;
    word-break: break-word;
  }

  .slide-artist-count {
    font-size: 0.9rem;
  }

  .slide-artist-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    width: 100%;
    max-width: 200px;
  }

  .slide-nav {
    position: static;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  .slideshow-container .slide-nav:first-child,
  .slideshow-container .slide-nav:last-child {
    flex-shrink: 0;
  }

  /* Tags */
  .tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
  }

  /* Buttons */
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .header-actions .btn {
    padding: 0.5rem 0.6rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1rem 1.5rem;
  }

  /* Legend */
  .legend {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Song builder */
  .options-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0.875rem;
  }

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

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

  .split {
    grid-template-columns: 1fr;
  }

  .splitter {
    display: none !important;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .header-inner {
    gap: 0.5rem;
  }

  .brand h1 {
    font-size: 1.1rem;
  }

  .logo {
    width: 24px;
    height: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 0.875rem;
  }

  .slide-artist-avatar {
    width: 70px;
    height: 70px;
  }

  .slide-artist-name {
    font-size: 1.15rem;
  }

  .slide-artist-count {
    font-size: 0.85rem;
  }

  .slide-artist-btn {
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
  }

  .not-found h2 {
    font-size: 2.5rem;
  }

  .card.artist .avatar {
    width: 50px;
    height: 50px;
  }

  .card.artist .btn,
  .card.song .btn {
    font-size: 0.8rem;
    padding: 0.45rem 0.65rem;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .artist-slideshow {
    padding: 0.75rem;
  }

  .slide-artist-avatar {
    width: 60px;
    height: 60px;
  }

  .slide-artist-name {
    font-size: 1.15rem;
  }

  .slideshow-container {
    flex-direction: row;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
    min-width: 44px;
  }

  .header-actions .btn {
    min-height: 40px;
    min-width: 40px;
  }

  input[type="text"],
  input[type="search"],
  textarea {
    font-size: 16px; /* Prevent iOS zoom on focus */
  }
}

/* Floating Notification Bell */
.floating-notification-bell {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(110, 231, 183, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
  animation: bellPulse 2s ease-in-out infinite;
}

.floating-notification-bell:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(110, 231, 183, 0.6);
}

.floating-notification-bell svg {
  width: 28px;
  height: 28px;
  color: var(--primary-ink);
}

@keyframes bellPulse {
  0%,
  100% {
    box-shadow: 0 4px 16px rgba(110, 231, 183, 0.4);
  }
  50% {
    box-shadow: 0 4px 24px rgba(110, 231, 183, 0.7);
  }
}

@media (max-width: 768px) {
  .floating-notification-bell {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
  }

  .floating-notification-bell svg {
    width: 24px;
    height: 24px;
  }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(17, 22, 42, 0.95),
    rgba(11, 16, 32, 0.98)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 2000;
  animation: overlayFadeIn 0.4s ease;
}
.loading-inner {
  text-align: center;
  padding: 2rem 2.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.loading-spinner {
  width: 64px;
  height: 64px;
  border: 6px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-inline: auto;
}
.loading-text {
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0;
}
.loading-dots::after {
  content: "";
  display: inline-block;
  width: 1ch;
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes dots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75% {
    content: "...";
  }
  100% {
    content: "";
  }
}
@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.loading-overlay.fade-out {
  animation: overlayFadeOut 0.4s ease forwards;
}
@keyframes overlayFadeOut {
  to {
    opacity: 0;
    transform: scale(0.98);
  }
}

@media (max-width: 600px) {
  .loading-inner {
    padding: 1.5rem 1.75rem;
  }
  .loading-spinner {
    width: 56px;
    height: 56px;
    border-width: 5px;
  }
}

/* Global Search Suggestions Portal */
.search-suggestions.portal {
  position: absolute;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.65);
  padding: 0.7rem 0.85rem; /* enlarged */
  max-height: 380px; /* a bit taller */
  overflow-y: auto;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.search-suggestions.portal.hidden {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}
.search-suggestions.portal.scrolling {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
  opacity: 0.96; /* subtle feedback during scroll */
}
.search-suggestions.portal::-webkit-scrollbar {
  width: 8px;
}
.search-suggestions.portal::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}
.search-suggestions.portal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.3);
}
.search-suggestions.portal::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}
.search-suggestions.portal section + section {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}
.search-suggestions.portal h5 {
  margin: 0.3rem 0 0.5rem;
  font-size: 0.7rem; /* slightly larger */
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.search-suggestions.portal .suggestion-item {
  display: grid;
  grid-template-columns: 64px 1fr; /* slightly wider type column */
  grid-template-rows: auto auto;
  gap: 0.3rem 0.6rem;
  padding: 0.55rem 0.6rem; /* enlarged padding */
  border-radius: 0.7rem;
  cursor: pointer;
  font-size: 0.87rem; /* larger text */
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.035);
  transition:
    background 0.16s ease,
    outline-color 0.16s ease,
    transform 0.16s ease;
}
.search-suggestions.portal .suggestion-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.search-suggestions.portal .suggestion-item:active {
  transform: scale(0.97);
}
.search-suggestions.portal .suggestion-item.active {
  outline: 2px solid var(--accent);
  background: rgba(255, 255, 255, 0.12);
}
.search-suggestions.portal .suggestion-type {
  grid-row: 1/3;
  align-self: center;
  justify-self: start;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}
.search-suggestions.portal .suggestion-main {
  font-weight: 600;
}
.search-suggestions.portal .suggestion-sub {
  font-size: 0.62rem;
  color: var(--muted);
}
.search-highlight {
  background: var(--accent);
  color: #000;
  padding: 0 0.15em;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}
@media (prefers-reduced-motion: reduce) {
  .search-suggestions.portal {
    transition: none;
  }
  .search-suggestions.portal .suggestion-item {
    transition: none;
  }
}

/* Skeleton shimmer styles for global search portal */
.skeleton-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.skeleton-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: auto auto;
  gap: 0.25rem 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.6rem;
}
.skeleton-type,
.skeleton-main,
.skeleton-sub {
  position: relative;
  overflow: hidden;
  background: #1e2535;
  border-radius: 4px;
}
.skeleton-type {
  height: 0.55rem;
  width: 50px;
  margin-top: 0.2rem;
}
.skeleton-main {
  height: 0.8rem;
  width: 100%;
}
.skeleton-sub {
  height: 0.6rem;
  width: 60%;
}
.skeleton-shimmer:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0)
  );
  animation: skShimmer 1.15s ease-in-out infinite;
  transform: translateX(-100%);
}
@keyframes skShimmer {
  100% {
    transform: translateX(100%);
  }
}
