:root {
  color-scheme: dark;
  --bg: #0c0c0c;             /* Matte Charcoal */
  --panel: #161616;          /* Charcoal Panel */
  --text: #eae5d9;           /* Warm Cream */
  --muted: #a09a8e;          /* Muted Cream */
  --soft: #5e584f;           /* Soft dark gray */
  --accent: #e65c00;          /* Matte Orange/Rust */
  --glow: rgba(230, 92, 0, 0.4); /* Amber glow */
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
  transition: background-color 0.5s ease;
}

button {
  min-height: 44px;
  border: 1px solid rgba(234, 229, 217, 0.14);
  border-radius: 8px;
  background: rgba(234, 229, 217, 0.06);
  color: var(--text);
  font: inherit;
  padding: 0 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background: rgba(234, 229, 217, 0.12);
  border-color: rgba(230, 92, 0, 0.5);
}

.screen {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 45vw) 1fr;
  gap: clamp(20px, 5vw, 64px);
  align-items: center;
  padding: clamp(16px, 5vh, 56px) clamp(20px, 6vw, 72px);
  transition: all 0.5s ease;
}

.cover-panel {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

/* Vinyl wrapper that holds cover and vinyl disc */
.vinyl-wrapper {
  position: relative;
  width: 90%;
  height: 90%;
  display: grid;
  place-items: center;
}

.cover-placeholder,
.cover-image {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: var(--panel);
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  position: relative;
  z-index: 5;
  border: 1px solid rgba(234, 229, 217, 0.05);
}

.cover-placeholder {
  display: grid;
  place-items: center;
  color: var(--soft);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* Vinyl disc sliding out and spinning */
.vinyl-disc {
  position: absolute;
  top: 2.5%;
  left: 2.5%;
  width: 95%;
  height: 95%;
  border-radius: 50%;
  z-index: 3;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  transform: translateX(0);
}

.vinyl-disc-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  /* Specular sheen (conic-gradient) + grooves (radial-gradient) */
  background: 
    conic-gradient(
      from 0deg,
      rgba(255, 255, 255, 0) 0deg,
      rgba(255, 255, 255, 0.08) 45deg,
      rgba(255, 255, 255, 0) 90deg,
      rgba(255, 255, 255, 0) 180deg,
      rgba(255, 255, 255, 0.08) 225deg,
      rgba(255, 255, 255, 0) 270deg,
      rgba(255, 255, 255, 0) 360deg
    ),
    radial-gradient(
      circle,
      #181818 0%,
      #0c0c0c 10%,
      #050505 15%,
      #161616 15.5%,
      #050505 16%,
      #050505 30%,
      #1a1a1a 30.5%,
      #050505 31%,
      #050505 50%,
      #1a1a1a 50.5%,
      #050505 51%,
      #050505 70%,
      #222222 70.5%,
      #050505 71%,
      #050505 85%,
      #2a2a2a 85.5%,
      #050505 86%,
      #000000 100%
    );
  border: 1px solid rgba(234, 229, 217, 0.18);
  box-shadow: 
    inset 0 0 24px rgba(0, 0, 0, 0.9), 
    0 12px 36px rgba(0, 0, 0, 0.65),
    0 0 25px rgba(234, 229, 217, 0.12); /* Soft cream outer glow */
  display: grid;
  place-items: center;
  position: relative;
}

/* Center paper label of the vinyl record */
.vinyl-label {
  width: 32%;
  height: 32%;
  border-radius: 50%;
  background-color: var(--accent);
  background-size: cover;
  background-position: center;
  border: 3px solid #000;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  position: relative;
}

/* Center spindle hole */
.vinyl-label::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14%;
  height: 14%;
  background-color: #0c0c0c;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* State: Playing - vinyl slides out and spins */
/* On landscape mode (deitado), we slide it to the left. On portrait, we slide it to the top */
@media (orientation: landscape) {
  .screen {
    /* Sized so the grid gap sits over the black vinyl grooves, allowing status-label to overlap */
    grid-template-columns: calc(clamp(240px, 64vh, 450px) * 1.28) 1fr;
    gap: 20px;
    padding: clamp(16px, 5vh, 48px) clamp(24px, 6vw, 72px) clamp(16px, 5vh, 48px) 16px;
  }
  .cover-panel {
    width: calc(100% / 1.28);
    justify-self: start;
  }
  .vinyl-wrapper.playing .vinyl-disc {
    /* Slide out 48% to expose exactly half of the vinyl label */
    transform: translateX(48%);
  }
  .now-playing {
    position: relative;
    z-index: 10;
    padding-left: 24px; /* Other text elements start exactly where the vinyl disc ends */
  }
  .status-label {
    margin-left: -24px; /* Pulls status label to overlap the black vinyl grooves */
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  h1 {
    font-size: 2.5rem;
  }
  .artist-name {
    font-size: 1.65rem;
    margin: 12px 0 0;
  }
  .album-line {
    font-size: 1.3rem;
    margin: 8px 0 0;
  }
  .status-label {
    margin: 0 0 10px;
    font-size: 0.95rem;
  }
  .progress-container {
    margin-top: 14px;
  }
  .next-track-container {
    margin-top: 10px;
  }
  .next-track-title {
    font-size: 1.2rem;
  }
  .btn-media-nav {
    width: 32px;
    height: 32px;
    min-height: 32px;
  }
  .top-controls {
    top: 16px;
    right: 16px;
  }
  .top-left-controls {
    top: 16px;
    left: 16px;
  }
  .btn-top-control {
    width: 32px;
    height: 32px;
    min-height: 32px;
  }
}

@media (orientation: portrait) {
  .vinyl-wrapper.playing .vinyl-disc {
    transform: translateY(-33%);
  }
}

.vinyl-wrapper.playing .vinyl-disc-inner {
  -webkit-animation: spin 15s linear infinite;
  animation: spin 15s linear infinite;
}

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

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

.now-playing {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.status-label {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-shadow: 0 0 10px var(--glow);
}

h1 {
  margin: 0;
  max-width: 100%;
  font-size: 3.2rem;
  line-height: 1.05;
  font-weight: 750;
  letter-spacing: 0;
  overflow-wrap: break-word;
  color: var(--text);
  text-shadow: 0 0 1px rgba(234, 229, 217, 0.1);
}

.artist-name {
  margin: 18px 0 0;
  color: var(--text);
  font-size: 1.8rem;
  font-weight: 400;
  opacity: 0.9;
}

.album-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.35rem;
  font-weight: 300;
}

.mic-debug {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, SF Pro Mono, Menlo, Monaco, Consolas, monospace;
  opacity: 0.75;
}

.next-track {
  margin: 0;
  display: block;
}

.next-track-label {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}

.next-track-title {
  display: block;
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--text);
  margin: 0;
}

.progress-container {
  width: 100%;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-bar-track {
  width: 100%;
  height: 3px;
  background: rgba(234, 229, 217, 0.08);
  position: relative;
  overflow: hidden;
  border-radius: 1.5px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 1.5px;
  transition: width 0.25s linear;
}

.progress-time-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, SF Pro Mono, Menlo, Monaco, Consolas, monospace;
  opacity: 0;
  transition: opacity 0.3s ease;
  line-height: 1;
}

.is-playing .progress-time-info {
  opacity: 0.8;
}

/* Container at the bottom of now-playing info */
.next-track-container {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.media-nav-buttons {
  display: flex;
  gap: 8px;
}

.btn-media-nav {
  width: 36px;
  height: 36px;
  min-height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(234, 229, 217, 0.12);
  background: rgba(234, 229, 217, 0.06);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-media-nav:hover:not(:disabled) {
  background: rgba(234, 229, 217, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 10px var(--glow);
}

.btn-media-nav:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  border-color: rgba(234, 229, 217, 0.05);
}

.btn-media-nav.recording,
.btn-top-control.recording {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(230, 92, 0, 0.15);
  box-shadow: 0 0 12px var(--glow);
  animation: pulse-recording 1.5s infinite;
}

@keyframes pulse-recording {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(230, 92, 0, 0.5);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 8px rgba(230, 92, 0, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(230, 92, 0, 0);
  }
}

/* Top-right discrete controls */
.top-controls {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  gap: 8px;
  z-index: 50;
}

/* Top-left discrete controls */
.top-left-controls {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  gap: 8px;
  z-index: 50;
}

.btn-top-control {
  width: 38px;
  height: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(234, 229, 217, 0.12);
  background: rgba(234, 229, 217, 0.05);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  opacity: 0.6;
}

.btn-top-control:hover {
  opacity: 1;
  background: rgba(234, 229, 217, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 10px var(--glow);
}

/* Portrait orientation settings */
@media (orientation: portrait) {
  .screen {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 50vh) 1fr;
    gap: 32px;
    padding: 32px 24px;
  }

  .cover-panel {
    max-height: 50vh;
    justify-self: center;
  }

  .vinyl-wrapper {
    width: 86%;
    height: 86%;
  }

  h1 {
    font-size: 2.6rem;
  }

  .artist-name {
    font-size: 1.5rem;
    margin: 12px 0 0;
  }

  .album-line {
    font-size: 1.15rem;
  }

}

/* Small screen adjustments */
@media (max-width: 480px) {
  .screen {
    padding: 20px 16px;
    gap: 24px;
  }

  h1 {
    font-size: 2.2rem;
  }

  .artist-name {
    font-size: 1.3rem;
  }

  .album-line {
    font-size: 1rem;
  }

}

/* Error Popup Dialog */
.error-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 100;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.error-popup.hidden {
  opacity: 0;
  pointer-events: none;
}

.error-popup-content {
  background: #181818;
  border: 1px solid rgba(230, 92, 0, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(230, 92, 0, 0.08);
  border-radius: 12px;
  width: min(400px, 90%);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: scale(1);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.error-popup.hidden .error-popup-content {
  transform: scale(0.9);
}

.error-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
}

.error-popup-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
}

#error-popup-message {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.btn-popup-close {
  align-self: flex-end;
  min-height: 38px;
  height: 38px;
  background: rgba(234, 229, 217, 0.08);
  border: 1px solid rgba(234, 229, 217, 0.14);
  border-radius: 6px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 20px;
}

.btn-popup-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px var(--glow);
}

/* Bottom-left controls */
.bottom-controls {
  position: absolute;
  bottom: 24px;
  left: 24px;
  display: flex;
  gap: 8px;
  z-index: 50;
}

@media (orientation: portrait) {
  .bottom-controls {
    bottom: 16px;
    left: 16px;
  }
}

/* Administrative Dashboard Layout */
.admin-body {
  overflow: hidden !important;
}

.admin-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
  background: var(--bg);
}

/* Sidebar Styling */
.admin-sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--panel);
  border-right: 1px solid rgba(234, 229, 217, 0.08);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  height: 100%;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding: 0 8px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 500;
  padding: 12px 16px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  min-height: auto;
}

.menu-item svg {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.menu-item:hover {
  background: rgba(234, 229, 217, 0.04);
  color: var(--text);
}

.menu-item:hover svg {
  opacity: 1;
}

.menu-item.active {
  background: rgba(230, 92, 0, 0.15);
  border: 1px solid rgba(230, 92, 0, 0.3);
  color: var(--text);
  box-shadow: 0 0 12px rgba(230, 92, 0, 0.1);
}

.menu-item.active svg {
  color: var(--accent);
  opacity: 1;
}

.sidebar-footer {
  padding: 16px 8px 8px;
  border-top: 1px solid rgba(234, 229, 217, 0.06);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Main Area Layout */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 32px 48px;
}

/* Header & Title Toolbar */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.btn-back:hover {
  color: var(--accent);
}

.header-left h1 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 40px;
  box-shadow: 0 4px 12px var(--glow);
}

.btn-primary:hover {
  background: #ff6e0d;
  border-color: #ff6e0d;
  box-shadow: 0 4px 18px rgba(230, 92, 0, 0.6);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(234, 229, 217, 0.06);
  border: 1px solid rgba(234, 229, 217, 0.14);
  border-radius: 8px;
  color: var(--text);
  font-weight: 500;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 40px;
}

.btn-secondary:hover {
  background: rgba(234, 229, 217, 0.12);
}

/* Filters and Search Bar Section */
.filters-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel);
  border: 1px solid rgba(234, 229, 217, 0.06);
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 32px;
  gap: 16px;
}

.filter-count {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--soft);
  pointer-events: none;
}

.search-box input {
  background: rgba(12, 12, 12, 0.6);
  border: 1px solid rgba(234, 229, 217, 0.12);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 8px 12px 8px 36px;
  width: 260px;
  transition: all 0.2s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--glow);
  background: rgba(12, 12, 12, 0.9);
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.sort-box select {
  background: rgba(12, 12, 12, 0.6);
  border: 1px solid rgba(234, 229, 217, 0.12);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-box select:focus {
  outline: none;
  border-color: var(--accent);
}

.sort-box select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* View Panels switching */
.view-panel {
  display: none;
  width: 100%;
}

.view-panel.active {
  display: block;
}

/* Album Grid and Cards */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  width: 100%;
}

.empty-grid-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
  padding: 48px 0;
}

.album-card {
  background: var(--panel);
  border: 1px solid rgba(234, 229, 217, 0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.album-card:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 92, 0, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(230, 92, 0, 0.08);
}

.card-cover-wrapper {
  width: 100%;
  aspect-ratio: 1;
  background: #111;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid rgba(234, 229, 217, 0.04);
}

.card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.album-card:hover .card-cover {
  transform: scale(1.04);
}

.card-details {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.card-artist {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(234, 229, 217, 0.05);
}

.card-year {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--soft);
}

.stars-container {
  display: flex;
  gap: 2px;
}

.star-icon {
  font-size: 1.15rem;
  color: var(--soft);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.star-icon:hover {
  transform: scale(1.2);
  color: var(--accent);
}

.star-icon.filled {
  color: var(--accent);
  text-shadow: 0 0 4px rgba(230, 92, 0, 0.4);
}

.card-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
}

.listen-count {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.headphone-icon {
  color: var(--soft);
}

.btn-listen {
  background: rgba(230, 92, 0, 0.1);
  border: 1px solid rgba(230, 92, 0, 0.2);
  border-radius: 6px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 28px;
  height: 28px;
}

.btn-listen:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 8px var(--glow);
}

/* Statistics Tab Styling */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  width: 100%;
}

.stats-card {
  background: var(--panel);
  border: 1px solid rgba(234, 229, 217, 0.06);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.stats-card h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muted);
}

.stat-value {
  margin: 0 0 4px;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  text-shadow: 0 0 10px rgba(230, 92, 0, 0.2);
}

.stat-desc {
  font-size: 0.85rem;
  color: var(--soft);
  font-weight: 500;
}

.highlight-card {
  border-color: rgba(230, 92, 0, 0.15);
}

.stat-album-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(234, 229, 217, 0.05);
}

.meta-placeholder {
  color: var(--soft);
  font-style: italic;
  font-size: 0.95rem;
  margin: 12px 0 0;
}

.stat-cover-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: #111;
  border: 1px solid rgba(234, 229, 217, 0.08);
}

.stat-info-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.stat-info-right strong {
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-info-right span {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-info-right .highlight-stat-lbl {
  color: var(--accent);
  font-weight: 600;
  margin-top: 2px;
}

/* Suggestion Tab Showcase */
.suggestion-container {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.suggestion-container h2 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 8px;
}

.suggestion-intro {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 32px;
  max-width: 480px;
}

.suggestion-showcase {
  background: var(--panel);
  border: 1px solid rgba(230, 92, 0, 0.25);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  gap: 32px;
  align-items: center;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 24px rgba(230, 92, 0, 0.08);
  width: 100%;
}

.suggestion-cover {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(234, 229, 217, 0.1);
  background: #111;
}

.suggestion-details {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.suggestion-details h3 {
  margin: 0 0 4px;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}

.sug-artist {
  margin: 0 0 20px;
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 600;
}

.sug-meta, .sug-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

.sug-meta strong, .sug-stats strong {
  color: var(--text);
}

.sug-rating-stars {
  color: var(--accent);
  font-size: 1.05rem;
}

.btn-sug-listen {
  align-self: flex-start;
  margin-top: 16px;
}

/* Modal Overlay Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: var(--panel);
  border: 1px solid rgba(234, 229, 217, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScaleUp {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(234, 229, 217, 0.06);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all 0.2s ease;
  min-height: auto;
}

.btn-close-modal:hover {
  background: rgba(234, 229, 217, 0.08);
  color: var(--text);
}

.modal-form {
  padding: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.form-group input {
  background: rgba(12, 12, 12, 0.8);
  border: 1px solid rgba(234, 229, 217, 0.12);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  width: 100%;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--glow);
}

.form-tip {
  font-size: 0.8rem;
  color: var(--soft);
  margin-top: 2px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
}

/* Toast Feedback */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  border: 1px solid rgba(234, 229, 217, 0.14);
  border-radius: 8px;
  color: var(--text);
  padding: 12px 24px;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 200;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  animation: toastFadeInUp 0.3s ease;
}

.toast.error {
  border-color: rgba(220, 50, 50, 0.5);
  box-shadow: 0 8px 24px rgba(220, 50, 50, 0.2);
}

.toast.hidden {
  opacity: 0;
  transform: translate(-50%, 20px);
}

@keyframes toastFadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Media Query Adaptations for Admin Dashboard */
@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }
  
  .admin-sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(234, 229, 217, 0.08);
    padding: 16px;
  }

  .sidebar-brand {
    margin-bottom: 16px;
  }

  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .menu-item {
    padding: 8px 12px;
    white-space: nowrap;
    width: auto;
  }

  .sidebar-footer {
    display: none;
  }

  .admin-main {
    padding: 24px 20px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .header-right {
    width: 100%;
  }

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

  .filters-panel {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .filter-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .search-box input {
    width: 100%;
  }

  .sort-box {
    justify-content: space-between;
  }

  .suggestion-showcase {
    flex-direction: column;
    padding: 24px;
    align-items: stretch;
  }

  .suggestion-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .btn-sug-listen {
    width: 100%;
    justify-content: center;
  }
}

/* Advanced Statistics Dashboard & List Layouts */
.stats-top-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
  width: 100%;
}

.stats-top-cards .stats-card {
  text-align: left;
}

.stats-top-cards .stats-card h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stats-top-cards .stats-card .stat-value {
  margin: 0;
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 0 10px rgba(230, 92, 0, 0.2);
}

.stats-sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
  margin-bottom: 40px;
}

@media (max-width: 900px) {
  .stats-sections-grid {
    grid-template-columns: 1fr;
  }
}

.stats-section-box {
  background: var(--panel);
  border: 1px solid rgba(234, 229, 217, 0.06);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stats-section-box h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.stats-list-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* Progress bar list rows */
.stats-list-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.list-row-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.list-row-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-row-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.list-row-bar-wrapper {
  width: 100%;
  height: 6px;
  background: rgba(234, 229, 217, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.list-row-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #ff2a6d 100%);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Most Collected Artists badge list rows */
.artist-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(234, 229, 217, 0.02);
  border: 1px solid rgba(234, 229, 217, 0.05);
  border-radius: 8px;
  width: 100%;
}

.artist-rank-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-count-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #ff2a6d 100%);
  padding: 4px 10px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(230, 92, 0, 0.2);
}

/* Recently Added list rows */
.recent-addition-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 0;
  border-bottom: 1px solid rgba(234, 229, 217, 0.04);
}

.recent-addition-row:last-child {
  border-bottom: none;
}

.recent-cover {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: #111;
  border: 1px solid rgba(234, 229, 217, 0.08);
  flex-shrink: 0;
}

.recent-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
}

.recent-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-artist {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-date {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--soft);
  flex-shrink: 0;
}

/* Visual Podium for Ranking Tab */
.podium-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 32px;
  margin: 40px auto;
  width: 100%;
  max-width: 700px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(234, 229, 217, 0.08);
}

.podium-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  flex: 1;
}

.podium-spot.gold {
  z-index: 10;
}

.podium-spot.silver, .podium-spot.bronze {
  z-index: 5;
}

.podium-circle-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 6px;
  background: var(--panel);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  margin-bottom: 16px;
  transition: transform 0.3s ease;
}

.podium-spot.gold .podium-circle-wrapper {
  width: 140px;
  height: 140px;
  border: 3px solid #ffb300;
  box-shadow: 0 0 20px rgba(255, 179, 0, 0.3), 0 12px 36px rgba(0, 0, 0, 0.7);
}

.podium-spot.silver .podium-circle-wrapper {
  border: 3px solid #b0bec5;
  box-shadow: 0 0 16px rgba(176, 190, 197, 0.2), 0 10px 30px rgba(0, 0, 0, 0.6);
}

.podium-spot.bronze .podium-circle-wrapper {
  border: 3px solid #a1887f;
  box-shadow: 0 0 16px rgba(161, 136, 127, 0.2), 0 10px 30px rgba(0, 0, 0, 0.6);
}

.podium-circle-wrapper:hover {
  transform: scale(1.05);
}

.podium-cover {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #000;
}

.position-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  border: 2px solid currentColor;
}

.podium-spot.gold .position-badge {
  color: #ffb300;
}

.podium-spot.silver .position-badge {
  color: #b0bec5;
}

.podium-spot.bronze .position-badge {
  color: #a1887f;
}

.crown-icon {
  font-size: 1.8rem;
  margin-bottom: -10px;
  z-index: 15;
  filter: drop-shadow(0 2px 4px rgba(255, 179, 0, 0.4));
}

.podium-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  width: 100%;
}

.podium-info h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.podium-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.podium-plays {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Other Listens Section under Podium */
.other-listens-section {
  max-width: 700px;
  margin: 40px auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.other-listens-section h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.other-listens-list {
  background: var(--panel);
  border: 1px solid rgba(234, 229, 217, 0.06);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 500px) {
  .podium-container {
    gap: 12px;
  }
  .podium-circle-wrapper {
    width: 80px;
    height: 80px;
  }
  .podium-spot.gold .podium-circle-wrapper {
    width: 96px;
    height: 96px;
  }
  .podium-info h3 {
    max-width: 100px;
    font-size: 0.9rem;
  }
  .podium-info p {
    max-width: 100px;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   LYRICS OVERLAY SYSTEM (V2.0.0)
   ========================================================================== */

/* Button state for lyrics in top-controls */
.btn-top-control#lyrics-button.active {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--glow);
  background: rgba(230, 92, 0, 0.15);
}

#album-cover {
  cursor: default;
}

.cover-panel.has-lyrics #album-cover {
  cursor: pointer;
}

/* Glassmorphic Lyrics Overlay */
.lyrics-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: rgba(12, 12, 12, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(234, 229, 217, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  z-index: 25;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 1;
  transform: scale(1);
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
              transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
              visibility 0.4s;
  cursor: pointer;
}

.lyrics-overlay.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  visibility: hidden;
}

/* Container and Scroll area */
.lyrics-container {
  flex: 1;
  overflow-y: auto;
  padding: 45% 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  mask-image: linear-gradient(to bottom, transparent, white 20%, white 80%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, white 20%, white 80%, transparent);
  position: relative;
}

.lyrics-container::-webkit-scrollbar {
  display: none;
}

.lyrics-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

/* Lyric Lines styling */
.lyrics-line {
  font-size: max(1.05rem, min(2.4vh, 1.35rem));
  font-weight: 600;
  color: var(--muted);
  opacity: 0.45;
  padding: 4px 0;
  margin: 0;
  line-height: 1.4;
  width: 100%;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-origin: center center;
}

.lyrics-line:hover {
  opacity: 0.85;
  color: var(--text);
}

.lyrics-line.active {
  color: var(--text);
  opacity: 1;
  font-size: max(1.2rem, min(2.7vh, 1.55rem));
  text-shadow: 0 0 16px var(--glow);
  transform: scale(1.05);
}

.lyrics-empty {
  font-size: 1.1rem;
  color: var(--muted);
  text-align: center;
  margin: auto;
  padding: 0 20px;
  line-height: 1.6;
}

/* Plain Lyrics Mode overrides */
.plain-lyrics-mode .lyrics-container {
  padding: 24px;
  mask-image: none;
  -webkit-mask-image: none;
}

.plain-lyrics-mode .lyrics-scroll {
  align-items: flex-start;
  text-align: left;
  gap: 12px;
}

.plain-lyrics-mode .lyrics-line {
  opacity: 0.85;
  cursor: default;
  font-size: max(0.95rem, min(2.1vh, 1.15rem));
  font-weight: 500;
  transform: none;
}

.plain-lyrics-mode .lyrics-line:hover {
  opacity: 0.85;
  color: var(--muted);
}

/* Tablet Responsive overrides */
@media (min-width: 600px) {
  .lyrics-line {
    font-size: max(1.15rem, min(2.6vh, 1.45rem));
  }
  .lyrics-line.active {
    font-size: max(1.35rem, min(3vh, 1.7rem));
  }
  .lyrics-scroll {
    gap: 22px;
  }
}

@media (min-width: 768px) {
  .lyrics-line {
    font-size: max(1.25rem, min(2.8vh, 1.6rem));
  }
  .lyrics-line.active {
    font-size: max(1.45rem, min(3.2vh, 1.85rem));
  }
  .lyrics-scroll {
    gap: 24px;
  }
  .plain-lyrics-mode .lyrics-line {
    font-size: max(1.1rem, min(2.4vh, 1.35rem));
  }
}



