
/* =========================================================
   MR. SHEYHAKI — RESOURCES LIBRARY
   Shared styles for /resources/ and everything nested under
   it (coursebooks, units, games/worksheets/audio listings).
   Follows the same header/card/footer system as Learning
   Arcade, using the site's purple accent throughout.
========================================================= */

* { box-sizing: border-box; }

:root {
  --purple: #6937d8;
  --purple-light: #f1edff;
  --purple-border: #e6ddfa;
  --text: #202636;
  --muted: #687184;
  --border: #e7e9ef;
  --container: 1180px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- HEADER ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 78px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #eef0f4;
}

.header-inner {
  width: min(calc(100% - 48px), var(--container));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-text strong { font-size: 14px; line-height: 1.15; font-weight: 800; }
.brand-text small { color: #7d8595; font-size: 10px; line-height: 1.15; }

.main-nav { display: flex; align-items: center; gap: 27px; }
.main-nav a {
  color: #6d7587;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  transition: color .2s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--purple); }

/* ---------- INTRO / HERO ---------- */

.arcade-intro {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
  padding: 60px 0 30px;
}

.eyebrow {
  color: var(--purple);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.7px;
}

.arcade-intro h1 {
  margin: 9px 0 9px;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1;
  letter-spacing: -2px;
}

.arcade-intro p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 17px;
  color: #697285;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}
.back-link:hover { color: var(--purple); }

/* ---------- UNIT HERO (big unit number) ---------- */

.unit-hero {
  width: min(calc(100% - 48px), var(--container));
  min-height: 200px;
  margin: 0 auto 25px;
  padding: 38px 40px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-radius: 25px;
  border: 1px solid var(--purple-border);
  background: var(--purple-light);
  overflow: hidden;
}

.unit-hero .unit-index {
  flex: 0 0 auto;
  color: var(--purple);
  font-size: clamp(56px, 9vw, 96px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
}

.unit-hero .unit-details h1 {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--text);
}

.unit-hero .unit-name-placeholder {
  font-style: italic;
  color: #8a92a5;
}

.unit-hero .unit-details p {
  max-width: 560px;
  margin: 0;
  color: #475063;
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- SECTION HEADING ---------- */

.section-heading {
  width: min(calc(100% - 48px), var(--container));
  margin: 42px auto 17px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.section-heading h2 { margin: 0 0 5px; font-size: 22px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }

/* ---------- CARD GRIDS (books / units) ---------- */

.resource-grid,
.unit-grid {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto 70px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}

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

.resource-card,
.unit-card {
  min-height: 150px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(32,38,54,.04);
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.resource-card:hover,
.unit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 34px rgba(32,38,54,.08);
  border-color: var(--purple-border);
}

.resource-card { min-height: 190px; flex-direction: row; align-items: flex-start; gap: 18px; }

.resource-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--purple-light);
  font-size: 24px;
}

.resource-card h3 { margin: 0 0 8px; font-size: 18px; }
.resource-card p { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.65; }

.unit-card .unit-card-index {
  align-self: flex-start;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--purple-light);
  color: var(--purple);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.unit-card h3 { margin: 14px 0 0; font-size: 19px; }
.unit-card .unit-card-name {
  margin: 4px 0 0;
  font-style: italic;
  color: #8a92a5;
  font-size: 12px;
}

.card-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--purple-light);
  color: var(--purple);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .7px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.card-link {
  margin-top: auto;
  padding-top: 14px;
  color: var(--purple);
  font-size: 10px;
  font-weight: 900;
}

/* ---------- LEVEL GRID (Starter / 1 / 2 / 3 / 4 / 5) ---------- */

.level-grid {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto 70px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}

.level-card {
  min-height: 120px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(32,38,54,.04);
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.level-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 34px rgba(32,38,54,.08);
  border-color: var(--purple-border);
}
.level-card h3 { margin: 0 0 6px; font-size: 19px; }
.level-card p { margin: 0; color: var(--muted); font-size: 11px; }

.level-card.level-locked {
  cursor: default;
  background: #fbfbfd;
  border-style: dashed;
  color: #9199a9;
}
.level-card.level-locked:hover {
  transform: none;
  box-shadow: 0 8px 25px rgba(32,38,54,.04);
  border-color: var(--border);
}
.level-card.level-locked h3 { color: #9199a9; display: flex; align-items: center; gap: 7px; }
.level-card .lock-tag {
  align-self: flex-start;
  margin-top: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #eef0f4;
  color: #838ba0;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
}

/* ---------- ITEM GRID (units + Practical English on a level page) ---------- */

.item-grid {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto 70px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.item-card {
  min-height: 130px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(32,38,54,.04);
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 34px rgba(32,38,54,.08);
  border-color: var(--purple-border);
}
.item-card .item-index {
  align-self: flex-start;
  margin-bottom: 12px;
  color: var(--purple-border);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}
.item-card h3 { margin: 0; font-size: 16px; }
.item-card .item-name-placeholder {
  margin: 3px 0 0;
  font-style: italic;
  color: #8a92a5;
  font-size: 11px;
}

.item-card.item-card--pe {
  background: var(--purple-light);
  border-color: var(--purple-border);
}
.item-card.item-card--pe .item-index { color: #d5c7f7; }

/* ---------- A/B PICKER PAGE ---------- */

.ab-grid {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto 70px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 17px;
}

.ab-card {
  min-height: 160px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(32,38,54,.04);
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ab-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 34px rgba(32,38,54,.08);
  border-color: var(--purple-border);
}
.ab-card .ab-letter {
  color: var(--purple);
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 10px;
}
.ab-card p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }

/* ---------- CONTENT TYPE SECTIONS (games / worksheets / audio) ---------- */

.content-grid {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto 50px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}

.content-card {
  min-height: 150px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(32,38,54,.04);
}
.content-card h3 { margin: 14px 0 7px; font-size: 16px; }
.content-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.content-meta { margin-top: auto; padding-top: 17px; color: #8a92a2; font-size: 10px; }

.empty-state {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto 50px;
  padding: 34px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1.5px dashed var(--border);
  border-radius: 17px;
  background: #fbfbfd;
}
.empty-state .empty-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--purple-light);
  color: var(--purple);
  font-size: 19px;
}
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.empty-state strong { display: block; color: var(--text); font-size: 13px; margin-bottom: 3px; }

/* ---------- FOOTER ---------- */

.site-footer {
  border-top: 1px solid #edf0f4;
  text-align: center;
  padding: 25px;
  color: #8991a1;
  font-size: 10px;
}

/* ---------- MOBILE MENU TOGGLE ---------- */

.menu-toggle{display:none;width:38px;height:38px;padding:0;border:none;background:transparent;cursor:pointer;flex-direction:column;align-items:center;justify-content:center;gap:5px}
.menu-toggle span{display:block;width:22px;height:2px;background:var(--text);border-radius:2px;transition:transform .2s ease,opacity .2s ease}
.menu-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.menu-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.menu-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
@media(max-width:700px){
  .menu-toggle{display:flex}
  .main-nav{display:flex;flex-direction:column;align-items:flex-start;gap:4px;position:absolute;top:78px;left:0;right:0;background:#fff;border-bottom:1px solid #eef0f4;padding:14px 24px 20px;max-height:0;overflow:hidden;opacity:0;pointer-events:none;transition:max-height .25s ease,opacity .2s ease}
  .main-nav.open{max-height:400px;opacity:1;pointer-events:auto}
  .main-nav a{padding:8px 0;width:100%}
}

/* ---------- DARK MODE (new components not covered by the global theme.css) ---------- */

html[data-theme="dark"] .level-card,
html[data-theme="dark"] .item-card,
html[data-theme="dark"] .ab-card,
html[data-theme="dark"] .unit-hero,
html[data-theme="dark"] .empty-state{
  background:var(--site-surface)!important;
  color:var(--site-text)!important;
  border-color:var(--site-border)!important;
}
html[data-theme="dark"] .level-card.level-locked{
  background:var(--site-surface-2)!important;
}
html[data-theme="dark"] .level-card p,
html[data-theme="dark"] .item-card .item-name-placeholder,
html[data-theme="dark"] .ab-card p,
html[data-theme="dark"] .unit-hero p,
html[data-theme="dark"] .unit-details p,
html[data-theme="dark"] .empty-state p,
html[data-theme="dark"] .content-card p{
  color:var(--site-muted)!important;
}
html[data-theme="dark"] .item-card--pe{
  background:#241c3a!important;
  border-color:#3a2c5c!important;
}
html[data-theme="dark"] .resource-icon,
html[data-theme="dark"] .empty-state .empty-icon{
  background:#241c3a!important;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  .content-grid,
  .unit-grid,
  .level-grid,
  .item-grid { grid-template-columns: repeat(2, 1fr); }
  .unit-hero { padding: 30px; }
}

@media (max-width: 700px) {
  .main-nav { display: none; }
  .header-inner,
  .arcade-intro,
  .unit-hero,
  .section-heading,
  .resource-grid,
  .unit-grid,
  .content-grid,
  .level-grid,
  .item-grid,
  .ab-grid,
  .empty-state {
    width: min(calc(100% - 28px), var(--container));
  }
  .unit-hero { flex-direction: column; align-items: flex-start; text-align: left; }
  .resource-grid { grid-template-columns: 1fr; }
  .ab-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .content-grid,
  .unit-grid,
  .item-grid { grid-template-columns: 1fr; }
}
/* =========================================
   UNIT RESOURCE CARDS
   ========================================= */

.unit-resource-grid {
  margin-top: 25px;
}

.resource-card {
  text-decoration: none;
  display: block;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:hover {
  transform: translateY(-5px);
}

.resource-icon {
  font-size: 42px;
  margin-bottom: 15px;
}

.resource-card h3 {
  margin-bottom: 8px;
}

.resource-card p {
  margin-bottom: 20px;
}

.resource-button {
  display: inline-block;
  font-weight: 700;
}


/* =========================================
   AUDIO CARDS
   ========================================= */

.audio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.audio-player {
  margin: 0.75rem 0;
}

.audio-player audio {
  width: 100%;
}

.audio-card {
  position: relative;
}

.audio-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.audio-card-header h3 {
  margin: 3px 0 0;
  font-size: 1.5rem;
}

.audio-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0.65;
}

.audio-icon {
  font-size: 30px;
}

.audio-card audio {
  width: 100%;
  margin-top: 12px;
}

.audio-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.audio-play-btn,
.audio-download-btn {
  flex: 1;
  min-height: 44px;
  border-radius: 10px;
  padding: 10px 15px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.audio-play-btn:hover,
.audio-download-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.audio-play-btn {
  border: none;
  background: var(--accent, #6c63ff);
  color: white;
}

.audio-download-btn {
  border: 1px solid currentColor;
  color: inherit;
  background: transparent;
}


@media (max-width: 600px) {

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

}

/* =========================================================
   UNIT-STYLE CARDS (match Multiple Choice unit cards)
========================================================= */

.item-grid {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto 70px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

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

.item-card.unit-style-card {
  position: relative;
  min-height: 155px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(105, 55, 216, 0.12);
  background: linear-gradient(145deg, #ffffff, #f8f6ff);
  color: #171c30;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(30, 40, 70, 0.06);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.item-card.unit-style-card::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -35px;
  bottom: -35px;
  border-radius: 50%;
  background: rgba(108, 99, 255, 0.12);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.item-card.unit-style-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 124, 255, 0.45);
  box-shadow: 0 18px 40px rgba(80, 60, 160, 0.14);
}

.item-card.unit-style-card:hover::after {
  transform: scale(1.6);
}

.item-card.unit-style-card .unit-number {
  display: block;
  color: #6937d8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 13px;
}

.item-card.unit-style-card h3 {
  font-size: 21px;
  margin: 0 0 7px;
  font-weight: 800;
}

.item-card.unit-style-card .item-name-placeholder,
.item-card.unit-style-card p {
  color: #747b90;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.item-card.unit-style-card .unit-arrow {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(105, 55, 216, 0.1);
  color: #6937d8;
  font-weight: 800;
  font-size: 14px;
}

.item-card.unit-style-card .item-index {
  display: none; /* replaced by unit-number */
}

.item-card.unit-style-card.item-card--pe .unit-number {
  color: #9b6dff;
}

/* Dark mode — unit-style cards */
html[data-theme="dark"] .item-card.unit-style-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  color: #f5f7ff;
  border-color: rgba(255,255,255,0.08);
  box-shadow: none;
}

html[data-theme="dark"] .item-card.unit-style-card .unit-number {
  color: #b4a7ff;
}

html[data-theme="dark"] .item-card.unit-style-card .item-name-placeholder,
html[data-theme="dark"] .item-card.unit-style-card p {
  color: #929bb8;
}

html[data-theme="dark"] .item-card.unit-style-card .unit-arrow {
  background: rgba(255,255,255,0.07);
  color: #c4bbff;
}

html[data-theme="dark"] .item-card.unit-style-card:hover {
  border-color: rgba(139, 124, 255, 0.55);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

/* =========================================================
   IMPROVED DARK MODE (global resources)
========================================================= */

html[data-theme="dark"] body,
html[data-theme="dark"] {
  background: #0b1020;
  color: #f5f7ff;
}

html[data-theme="dark"] .site-header {
  background: rgba(11, 16, 32, 0.92);
  border-bottom-color: rgba(255,255,255,0.08);
}

html[data-theme="dark"] .brand,
html[data-theme="dark"] .brand-text strong {
  color: #f5f7ff;
}

html[data-theme="dark"] .brand-text small {
  color: #929bb8;
}

html[data-theme="dark"] .main-nav a {
  color: #c5cbe0;
}

html[data-theme="dark"] .main-nav a:hover,
html[data-theme="dark"] .main-nav a.active {
  color: #fff;
}

html[data-theme="dark"] .arcade-intro h1,
html[data-theme="dark"] .section-heading h2,
html[data-theme="dark"] .unit-hero h1 {
  color: #f5f7ff;
}

html[data-theme="dark"] .arcade-intro p,
html[data-theme="dark"] .section-heading p {
  color: #929bb8;
}

html[data-theme="dark"] .back-link {
  color: #c5cbe0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 8px 14px;
  text-decoration: none;
  display: inline-flex;
  font-weight: 700;
  font-size: 14px;
}

html[data-theme="dark"] .back-link:hover {
  background: rgba(255,255,255,0.11);
}

html[data-theme="dark"] .level-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border-color: rgba(255,255,255,0.08);
  color: #f5f7ff;
  box-shadow: none;
}

html[data-theme="dark"] .level-card:hover {
  border-color: rgba(139, 124, 255, 0.55);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

html[data-theme="dark"] .level-card h3 {
  color: #f5f7ff;
}

html[data-theme="dark"] .site-footer {
  color: #7a8299;
  border-top-color: rgba(255,255,255,0.06);
}

html[data-theme="dark"] .theme-toggle {
  background: rgba(255,255,255,0.07);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
}


/* BACK BUTTON UNIFIED */
.back-link,
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  color: #252b40;
  background: #eef1f8;
  border: 1px solid #dfe3ee;
  transition: transform 0.2s ease, background 0.2s ease;
}
.back-link:hover,
.back-button:hover {
  transform: translateX(-3px);
  background: #e4e8f2;
}
html[data-theme="dark"] .back-link,
html[data-theme="dark"] .back-button {
  color: #dbe2ff;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}
html[data-theme="dark"] .back-link:hover,
html[data-theme="dark"] .back-button:hover {
  background: rgba(255,255,255,0.11);
}


/* Fix: ensure download/play remain clickable and visible */
.audio-actions a.audio-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}
.audio-download-btn[aria-busy="true"] {
  opacity: 0.7;
  pointer-events: none;
}
