/* =============================================
   Podcast4Deejays — Theme podcast4deejays
   ============================================= */

:root {
  --color-bg-from:    #1a0a2e;
  --color-bg-to:      #1a1a3e;
  --color-surface:    rgba(255,255,255,0.06);
  --color-surface-2:  rgba(255,255,255,0.10);
  --color-border:     rgba(255,255,255,0.12);
  --color-accent:     #bb71f3;
  --color-accent-2:   #7c6af7;
  --color-text:       #f0ecff;
  --color-muted:      rgba(240,236,255,0.55);
  --color-player-bg:  rgba(18,8,40,0.85);
  --player-height:    80px;
  --site-header-height: 0px;
  --radius:           12px;
  --radius-sm:        8px;
  --font:             system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: var(--font);
  background: linear-gradient(150deg, var(--color-bg-from) 0%, var(--color-bg-to) 100%);
  background-attachment: fixed;
  color: var(--color-text);
  min-height: 100vh;
  padding-bottom: calc(var(--player-height) + 16px);
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ----- Header ----- */
.site-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(10,4,24,0.5);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search {
  position: relative;
  width: min(360px, 42vw);
}

.header-search-input {
  width: 100%;
  height: 34px;
  border-radius: 18px;
  border: 1px solid var(--color-border);
  background: rgba(255,255,255,0.08);
  color: var(--color-text);
  padding: 0 12px;
  font-size: 0.82rem;
  outline: none;
}

.header-search-input::placeholder {
  color: var(--color-muted);
}

.header-search-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(187, 113, 243, 0.2);
}

.header-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(460px, 90vw);
  max-height: 62vh;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(18,8,40,0.98);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.38);
  padding: 8px;
  z-index: 30;
}

.header-search-empty {
  padding: 8px;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.header-search-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: inherit;
}

.header-search-cover {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
}

.header-search-cover-placeholder {
  display: block;
}

.header-search-body {
  min-width: 0;
}

.header-search-item:hover {
  text-decoration: none;
  border-color: var(--color-border);
  background: rgba(255,255,255,0.05);
}

.header-search-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
}

.header-search-subtitle {
  margin-top: 3px;
  font-size: 0.73rem;
  color: var(--color-accent);
  line-height: 1.35;
}

.header-search-excerpt {
  margin-top: 4px;
  font-size: 0.74rem;
  color: var(--color-muted);
  line-height: 1.35;
}

.header-search-excerpt mark {
  background: rgba(187, 113, 243, 0.2);
  color: #fff;
  border-radius: 4px;
  padding: 0 2px;
}

.header-socials {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(187, 113, 243, 0.1);
  color: var(--color-accent);
  transition: background 0.2s, transform 0.2s;
}

.social-link:hover {
  background: rgba(187, 113, 243, 0.2);
  transform: scale(1.1);
  text-decoration: none;
}

.social-link ion-icon {
  font-size: 1.2rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-accent);
}

.header-title h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-sub {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 2px;
}

.itunes-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--color-accent);
  border-radius: 20px;
  color: var(--color-accent);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.itunes-link:hover {
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
}

/* ----- Season sections ----- */
.mix-grid-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 20px 32px;
}

.mix-grid-main {
  min-width: 0;
}

.mix-grid-wrapper-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  grid-template-areas: "main sidebar";
  gap: 24px;
  align-items: start;
}

.mix-grid-wrapper-with-sidebar .mix-grid-main {
  grid-area: main;
}

.home-keywords-sidebar {
  grid-area: sidebar;
  position: sticky;
  top: calc(var(--site-header-height) + 14px);
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
}

.home-keywords-title {
  margin: 0;
  font-size: 1rem;
}

.home-keywords-meta {
  margin: 6px 0 12px;
  color: var(--color-muted);
  font-size: 0.8rem;
}

.home-keywords-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-keywords-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  width: 100%;
}

.home-keywords-count {
  margin-left: 8px;
  opacity: 0.8;
  font-size: 0.8em;
}

.home-keywords-all-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.82rem;
}

.season-section {
  margin-bottom: 40px;
}

.season-heading {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ----- Mix Grid ----- */
.mix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

/* ----- Mix Card ----- */
.mix-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.mix-card:hover,
.mix-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--color-accent);
  background: var(--color-surface-2);
  outline: none;
}

.mix-card.active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent);
}

.mix-card-artwork {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}

.mix-card-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.mix-card:hover .mix-card-artwork img {
  transform: scale(1.05);
}

.mix-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.mix-card:hover .mix-card-overlay,
.mix-card.active .mix-card-overlay {
  opacity: 1;
}

.play-icon {
  font-size: 2.4rem;
  color: #fff;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.8));
  pointer-events: none;
}

.mix-card-duration {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

.mix-card-info {
  padding: 10px 12px 12px;
}

.mix-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.mix-card-subtitle {
  font-size: 0.75rem;
  font-weight: 400;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 4px;
}

.mix-card-meta {
  font-size: 0.7rem;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mix-card-keywords {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  margin: 6px 0 4px;
  max-height: 44px;
  overflow: hidden;
}

/* ----- Player Bar ----- */
.player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-height);
  background: var(--color-player-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 64px 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  z-index: 100;
}

.player[hidden] { display: none; }

.player-artwork {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.player-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-info {
  min-width: 0;
  overflow: hidden;
}

.player-title {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-subtitle {
  font-size: 0.7rem;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Current chapter indicator (clickable toggle) */
.player-chapter-current {
  display: block;
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0;
  margin-top: 3px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.3;
}
.player-chapter-current[hidden] { display: none; }
.player-chapter-current::after {
  content: " ▾";
  color: var(--color-muted);
}
.player-chapter-current[aria-expanded="true"]::after {
  content: " ▴";
}

/* Chapters dropdown */
.player-chapters {
  position: absolute;
  bottom: calc(var(--player-height) + 4px);
  left: 80px;
  width: 320px;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(18,8,40,0.97);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) transparent;
}

.player-chapters[hidden] { display: none; }

.chapter-item {
  display: flex;
  gap: 10px;
  padding: 7px 14px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
  align-items: baseline;
}

.chapter-item:hover,
.chapter-item.active {
  background: rgba(187,113,243,0.15);
  color: var(--color-accent);
}

.chapter-time {
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--color-accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.chapter-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Player controls */
.player-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-controls button {
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}

.player-controls button:hover { color: var(--color-accent); background: rgba(187,113,243,0.1); }
#btn-play { font-size: 1.5rem; }

/* Progress */
.player-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  max-width: 360px;
  flex: 1;
}

#player-current, #player-duration {
  font-size: 0.68rem;
  color: var(--color-muted);
  font-family: monospace;
  white-space: nowrap;
}

.player-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.player-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s linear;
  pointer-events: none;
}

.player-progress-bar:hover .player-progress-fill {
  height: 6px;
  margin-top: -1px;
}

/* Volume */
.player-volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.volume-icon { font-size: 0.9rem; }

#volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.2);
  outline: none;
  cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
}

/* ----- Info button on card ----- */
.mix-card-info-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  line-height: 1;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.8));
  transition: color 0.15s;
}
.mix-card-info-btn:hover {
  color: var(--color-accent);
}

/* ----- Open link on card ----- */
.mix-card-link-btn {
  position: absolute;
  top: 6px;
  right: 34px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  line-height: 1;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.8));
  transition: color 0.15s;
  text-decoration: none;
}
.mix-card-link-btn:hover {
  color: var(--color-accent);
}

/* ----- YouTube badge on card ----- */
.mix-card-youtube-btn {
  position: absolute;
  top: 6px;
  left: 6px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  line-height: 1;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.8));
  transition: transform 0.15s, color 0.15s;
  text-decoration: none;
}

.mix-card-youtube-btn:hover {
  transform: scale(1.1);
  color: #ffffff;
}

/* ----- Info modal ----- */
.mix-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mix-modal[hidden] { display: none; }

.mix-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}

.mix-modal-card {
  position: relative;
  background: rgba(18,8,40,0.97);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  width: min(880px, 95vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mix-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s;
  z-index: 1;
}
.mix-modal-close:hover { color: var(--color-text); }

/* ----- Modal container with sidebar ----- */
.mix-modal-container {
  display: flex;
  height: 100%;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.mix-modal-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mix-modal-header {
  display: flex;
  gap: 16px;
  padding: 20px 20px 16px;
  align-items: flex-start;
  flex-shrink: 0;
}

.mix-modal-cover-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

.mix-modal-cover {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: block;
}

.mix-modal-cover-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.mix-modal-cover-wrapper:hover .mix-modal-cover-play {
  opacity: 1;
}

.mix-modal-meta {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.mix-modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.mix-modal-episode {
  font-size: 0.75rem;
  color: var(--color-accent);
  margin-bottom: 3px;
}

.mix-modal-duration {
  font-size: 0.75rem;
  color: var(--color-muted);
  font-family: monospace;
  margin-bottom: 3px;
}

.mix-modal-subtitle {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-bottom: 4px;
  font-style: italic;
}

.mix-modal-keywords {
  font-size: 0.7rem;
  color: var(--color-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.keyword-badge {
  display: inline-block;
  font-size: 0.65rem;
  line-height: 1.25;
  font-weight: 500;
  background: rgba(187, 113, 243, 0.15);
  color: var(--color-accent);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(187, 113, 243, 0.3);
  white-space: nowrap;
}

.keyword-badge-link {
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.keyword-badge-link:hover {
  transform: translateY(-1px);
  background: rgba(187, 113, 243, 0.24);
  border-color: rgba(187, 113, 243, 0.55);
}

.keyword-badge-active {
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-2) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset;
}

.mix-card-keywords .keyword-badge {
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 10px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taxonomy-header {
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
}

.taxonomy-header-list {
  margin-top: 12px;
}

.taxonomy-subtitle {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.taxonomy-title {
  margin: 0;
  font-size: 1.5rem;
}

.taxonomy-meta {
  margin: 8px 0 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.taxonomy-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.taxonomy-cloud-item {
  font-size: 0.75rem;
  padding: 7px 10px;
}

.taxonomy-cloud-count {
  margin-left: 6px;
  opacity: 0.8;
  font-size: 0.75em;
}

.mix-modal-sep {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0 20px;
  flex-shrink: 0;
}

.mix-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 20px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--color-text);
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) transparent;
}

.mix-modal-body p { margin-bottom: 10px; }
.mix-modal-body ol,
.mix-modal-body ul {
  padding-left: 1.4em;
  margin-bottom: 10px;
}
.mix-modal-body li { margin-bottom: 3px; }

.mix-modal-authors {
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-border);
}

.mix-modal-authors-label {
  font-size: 0.7rem;
  color: var(--color-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.mix-modal-authors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.mix-modal-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex-shrink: 0;
}

.mix-modal-author-cover {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--color-accent);
  margin-bottom: 6px;
}

.mix-modal-author-info {
  flex: 1;
  min-width: 0;
}

.mix-modal-author-label {
  font-size: 0.7rem;
  color: var(--color-muted);
  text-transform: uppercase;
}

.mix-modal-author-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 2px;
  color: var(--color-text);
}

.mix-modal-sidebar {
  width: 160px;
  flex-shrink: 0;
  border-left: 1px solid var(--color-border);
  padding: 16px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) transparent;
}

.mix-modal-sidebar h3 {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-accent);
}

.mix-modal-related {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mix-modal-related-item {
  padding: 8px 10px;
  background: rgba(187,113,243,0.08);
  border: 1px solid rgba(187,113,243,0.2);
  border-radius: 6px;
  font-size: 0.7rem;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.mix-modal-related-item:hover {
  background: rgba(187,113,243,0.15);
  border-color: rgba(187,113,243,0.4);
}

.mix-modal-related-item.active {
  background: rgba(187,113,243,0.25);
  border: 2px solid var(--color-accent);
  padding: 7px 9px;
  box-shadow: 0 0 8px rgba(187,113,243,0.3);
}

/* ----- Responsive ----- */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .header-search {
    order: -1;
    width: 100%;
  }
  .header-search-results {
    left: 0;
    right: auto;
    width: 100%;
  }
  .mix-grid-wrapper-with-sidebar {
    display: block;
  }
  .home-keywords-sidebar {
    position: static;
    margin-bottom: 16px;
    padding: 12px;
  }
  .home-keywords-list {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 8px;
  }
  .home-keywords-item {
    width: auto;
  }
  .mix-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 12px; }
  .player { grid-template-columns: 52px 1fr auto auto; gap: 8px; padding: 0 10px; }
  .player-progress-wrap { display: none; }
  .player-volume-wrap { display: none; }
  .header-sub { display: none; }
}

@media (max-width: 400px) {
  .mix-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----- Author Image Popup ----- */
.author-image-trigger {
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.author-image-trigger:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.author-image-trigger:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 50%;
}

.author-image-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.author-image-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.author-image-popup-modal {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.author-image-popup-image {
  max-width: 80vw;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.author-image-popup-author-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
}

.author-image-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--color-accent);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  transition: background 0.2s ease;
}

.author-image-popup-close:hover {
  background: var(--color-accent-2);
}

.author-image-popup-close:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}
