/* assets/pages/library/library-base.css */
/* Shared library page styles */

.page-hero {
  padding: 60px 5% 48px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
}

.page-hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 900;
  margin-bottom: 12px;
  line-height: 1.2;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 720px;
  line-height: 1.8;
  margin: 0;
}

.filters {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 5% 22px;
  display: grid;
  gap: 14px;
  align-items: stretch;
  justify-content: center;
}

.filters select,
.filters input {
  width: min(100%, 230px);
  max-width: 230px;
  min-width: 0;
  justify-self: center;
  background: var(--surface);
  border: 1px solid rgba(200,164,90,0.24);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.94rem;
  outline: none;
  transition: all 0.25s var(--ease);
  box-shadow: inset 0 0 0 1px rgba(200,164,90,0.04);
  -webkit-appearance: none;
  appearance: none;
}

.filters select:hover,
.filters input:hover {
  border-color: rgba(200,164,90,0.38);
  background: var(--surface2);
}

.filters select:focus,
.filters input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,164,90,0.10);
  background: var(--surface2);
}

.filters select option {
  background: var(--bg3);
  color: var(--text);
}

.filters-jump {
  width: fit-content;
  min-width: 0;
  max-width: 230px;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(200,164,90,0.10);
  border: 1px solid rgba(200,164,90,0.28);
  color: var(--gold-light);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.25s var(--ease);
  box-shadow: inset 0 0 0 1px rgba(200,164,90,0.04);
}

.filters-jump:hover {
  background: rgba(200,164,90,0.18);
  border-color: rgba(200,164,90,0.46);
  color: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(200,164,90,0.12);
}

.filters-jump:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,164,90,0.12);
  background: rgba(200,164,90,0.16);
}

.request-sheet-section {
  scroll-margin-top: 120px;
}

#list.grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5% 100px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1350px) {
  #list.grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  #list.grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #list.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  #list.grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.35s var(--ease);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 42px rgba(0,0,0,0.38);
  border-color: rgba(200,164,90,0.28);
}

.card-header {
  display: grid;
  gap: 8px;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text);
}

.card-composer,
.card-performer {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.badge-song {
  background: var(--gold-dim);
  color: var(--gold);
  border-color: rgba(200,164,90,0.2);
}

.badge-inst {
  background: var(--surface);
  color: var(--text-dim);
  border-color: var(--border2);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-maqam,
.card-tonic,
.card-tag,
.card-tag-muted {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.maqam-link {
  text-decoration: none;
  color: var(--gold-light);
  font-weight: 700;
}

.download-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  background: var(--gold);
  color: var(--bg);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
  transition: all 0.25s var(--ease);
}

.download-btn:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(200,164,90,0.25);
}
