@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,400&display=swap');

/* Classic Prussian Blue & Burnished Gold Palettes */
:root {
  --bg-dark: #060912;
  --bg-deep: #0b101d;
  --bg-surface: rgba(15, 23, 42, 0.75);
  --bg-card: rgba(20, 30, 54, 0.5);
  
  --gold-primary: #dfba59;
  --gold-dark: #a67c1e;
  --gold-light: #f6e09c;
  --gold-gradient: linear-gradient(135deg, #f6e09c 0%, #dfba59 50%, #a67c1e 100%);
  
  --border-gold: rgba(223, 186, 89, 0.25);
  --border-light: rgba(255, 255, 255, 0.05);
  
  --text-cream: #f4efe6;
  --text-gold: #dfba59;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  
  --shadow-gold: 0 10px 30px rgba(166, 124, 30, 0.15);
  --shadow-deep: 0 15px 40px rgba(0, 0, 0, 0.6);
  
  --transition-classic: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --blur-radius: 20px;
}

/* Base resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 0% 0%, rgba(223, 186, 89, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.03) 0px, transparent 50%),
    linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-deep) 100%);
  color: var(--text-cream);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* App container layout */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 30px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 1100px) {
  .app-container.with-drawer {
    grid-template-columns: 1fr 350px;
  }
}

/* Centered Majestic Title Banner */
/* Centered Majestic Title Banner with Classical Music Motif Background */
.classic-header {
  background-image: 
    linear-gradient(rgba(6, 9, 18, 0.82), rgba(6, 9, 18, 0.94)),
    repeating-linear-gradient(0deg, transparent, transparent 11px, rgba(223, 186, 89, 0.04) 11px, rgba(223, 186, 89, 0.04) 12px, transparent 12px, transparent 20px);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 35px 20px;
  box-shadow: var(--shadow-deep);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
  width: 100%;
}

.classic-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(223, 186, 89, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.classic-header > * {
  position: relative;
  z-index: 1;
}

.classic-header .brand {
  flex-direction: column;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-crest {
  width: 46px;
  height: 46px;
  border: 2px solid var(--gold-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-primary);
  box-shadow: var(--shadow-gold);
  position: relative;
}

.brand-crest::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(223, 186, 89, 0.3);
  border-radius: 50%;
}

.brand-text h1 {
  font-size: 26px;
  color: var(--text-cream);
  font-weight: 800;
  letter-spacing: 0.01em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 2px;
}

/* Classical separator lines with Treble Clef */
.classical-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: 100%;
  max-width: 450px;
  margin: 5px auto 10px auto;
}

.classical-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary) 30%, var(--gold-primary) 70%, transparent);
  opacity: 0.45;
}

.classical-divider .symbol {
  color: var(--gold-primary);
  font-size: 16px;
  opacity: 0.85;
  text-shadow: 0 0 8px rgba(223, 186, 89, 0.3);
}

/* Control Hub (Search & Filters) */
.controls-hub {
  background: var(--bg-surface);
  backdrop-filter: blur(var(--blur-radius));
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: var(--shadow-deep);
  position: relative;
}

.controls-hub::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(223, 186, 89, 0.05);
  border-radius: 6px;
  pointer-events: none;
}

@media (min-width: 900px) {
  .controls-hub {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Very Small Search Box */
.search-box {
  position: relative;
  flex: 1;
  max-width: 160px;
  z-index: 10;
}

.search-box input {
  width: 100%;
  background: rgba(5, 8, 16, 0.9);
  border: 1px solid rgba(223, 186, 89, 0.35);
  border-radius: 6px;
  padding: 6px 10px 6px 26px;
  color: var(--text-cream);
  font-size: 11px;
  transition: var(--transition-classic);
  font-family: 'Montserrat', sans-serif;
}

.search-box input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px rgba(223, 186, 89, 0.2);
  outline: none;
}

.search-box i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-primary);
  font-size: 11px;
}

/* Dropdown select for filter scaling */
.filter-select-wrapper {
  position: relative;
  display: inline-block;
  z-index: 10;
  min-width: 190px;
}

.filter-select-wrapper select {
  width: 100%;
  background: rgba(5, 8, 16, 0.9);
  border: 1px solid rgba(223, 186, 89, 0.35);
  border-radius: 6px;
  padding: 6px 30px 6px 28px;
  color: var(--text-cream);
  font-size: 11px;
  transition: var(--transition-classic);
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.filter-select-wrapper select:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px rgba(223, 186, 89, 0.2);
}

.filter-select-wrapper i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-primary);
  font-size: 11px;
  pointer-events: none;
}

.filter-select-wrapper::after {
  content: '▼';
  font-size: 8px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-primary);
  pointer-events: none;
}

/* Portfolio Showcase Gallery with smaller cards */
.scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 16px;
}

/* Compact Score Cover Card (Book / Portfolio style) */
.score-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition-classic);
  box-shadow: var(--shadow-deep);
  position: relative;
  overflow: hidden;
}

.score-card::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(223, 186, 89, 0.04);
  border-radius: 5px;
  pointer-events: none;
}

.score-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-primary);
  box-shadow: 0 10px 25px rgba(223, 186, 89, 0.1);
}

/* Compact Cover Graphic View */
.cover-wrapper {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(223, 186, 89, 0.15);
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-classic);
  filter: sepia(20%) contrast(105%);
}

.score-card:hover .cover-img {
  transform: scale(1.04);
  filter: sepia(0%) contrast(110%);
}

/* Floating overlay */
.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 19, 0.2) 0%, rgba(6, 10, 19, 0.95) 100%);
  opacity: 0;
  transition: var(--transition-classic);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 15px;
  gap: 8px;
}

.score-card:hover .cover-overlay {
  opacity: 1;
}

/* Card details below cover */
.card-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-title {
  font-size: 13px;
  color: var(--text-cream);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: var(--transition-classic);
}

.score-card:hover .card-title {
  color: var(--gold-primary);
}

.card-composer {
  font-size: 9px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Card custom top-right checkbox */
.card-checkbox-pos {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
}

.batch-checkbox {
  opacity: 0;
  position: absolute;
  cursor: pointer;
  height: 20px;
  width: 20px;
  z-index: 22;
  margin: 0;
}

.checkmark {
  display: inline-block;
  height: 20px;
  width: 20px;
  background-color: rgba(6, 10, 19, 0.85);
  border: 1px solid var(--gold-primary);
  border-radius: 4px;
  transition: var(--transition-classic);
  box-shadow: var(--shadow-deep);
}

.batch-checkbox:checked ~ .checkmark {
  background: var(--gold-gradient);
  border-color: transparent;
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 4px;
  height: 9px;
  border: solid var(--bg-dark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.batch-checkbox:checked ~ .checkmark::after {
  display: block;
}

/* Quick buttons on cover overlay */
.overlay-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.overlay-btn {
  width: 100%;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-classic);
  font-family: 'Montserrat', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
}

.overlay-btn.primary {
  background: var(--gold-gradient);
  color: var(--bg-dark);
  box-shadow: var(--shadow-gold);
}

.overlay-btn.primary:hover {
  filter: brightness(1.1);
}

.overlay-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-cream);
}

.overlay-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Side Drawer (Batch list) */
.batch-drawer {
  background: var(--bg-surface);
  backdrop-filter: blur(var(--blur-radius));
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: fit-content;
  box-shadow: var(--shadow-deep);
  position: sticky;
  top: 30px;
  animation: fadeIn 0.4s ease;
}

.batch-drawer::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(223, 186, 89, 0.04);
  border-radius: 5px;
  pointer-events: none;
}

.drawer-header {
  border-bottom: 1px solid rgba(223, 186, 89, 0.15);
  padding-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-header h3 {
  font-size: 18px;
  color: var(--text-gold);
}

.badge-count {
  background: var(--gold-gradient);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--bg-dark);
  box-shadow: var(--shadow-gold);
}

.selected-list {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.selected-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(223, 186, 89, 0.08);
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selected-item .item-title {
  font-size: 12px;
  font-weight: 600;
  font-family: 'Playfair Display', serif;
}

.selected-item .item-composer {
  font-size: 9px;
  color: var(--text-secondary);
}

.remove-item-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition-classic);
}

.remove-item-btn:hover {
  color: #f87171;
}

.batch-options {
  border-top: 1px solid rgba(223, 186, 89, 0.15);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.batch-options-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}

.format-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.opt-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-secondary);
}

.opt-checkbox-wrapper label {
  cursor: pointer;
}

.checkout-btn {
  background: var(--gold-gradient);
  border: none;
  border-radius: 6px;
  padding: 12px;
  color: var(--bg-dark);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-gold);
  transition: var(--transition-classic);
}

.checkout-btn:hover {
  filter: brightness(1.1);
}

.checkout-btn:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

/* Detail Modal - Split layout portfolio */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.9);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-classic);
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-deep);
  border: 1px solid var(--gold-primary);
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  display: grid;
  grid-template-columns: 1fr;
  box-shadow: var(--shadow-deep);
  transform: scale(0.96) translateY(15px);
  transition: var(--transition-classic);
  overflow: hidden;
}

@media (min-width: 768px) {
  .modal-content {
    grid-template-columns: 280px 1fr;
  }
}

.modal-overlay.open .modal-content {
  transform: scale(1) translateY(0);
}

/* Modal Left Column */
.modal-graphic-col {
  background: #080d1a;
  border-right: 1px solid var(--border-gold);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  overflow-y: auto;
  max-height: 85vh;
}

.modal-cover-wrapper {
  width: 170px;
  aspect-ratio: 3/4;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--gold-primary);
}

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

.modal-composer-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--gold-primary);
  border-radius: 4px;
  padding: 3px 8px;
  background: rgba(223, 186, 89, 0.04);
}

/* Modal Right Column */
.modal-details-col {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  max-height: 85vh;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(223, 186, 89, 0.12);
  padding-bottom: 12px;
}

.modal-header h2 {
  font-size: 24px;
  color: var(--text-cream);
  font-family: 'Playfair Display', serif;
}

.modal-header p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.close-modal-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-classic);
}

.close-modal-btn:hover {
  background: var(--gold-primary);
  color: var(--bg-dark);
}

/* Language Selector */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition-classic);
  font-family: 'Montserrat', sans-serif;
  outline: none;
}

.lang-btn:hover {
  color: var(--gold-light);
}

.lang-btn.active {
  color: var(--gold-primary);
  background: rgba(223, 186, 89, 0.1);
  border: 1px solid var(--border-gold);
}

.lang-divider {
  color: var(--text-muted);
  font-size: 10px;
  pointer-events: none;
}

/* Redesigned details biography sheet - Premium Dark style */
.parchment-sheet {
  background-color: rgba(6, 10, 19, 0.6);
  background-image: radial-gradient(circle, rgba(223, 186, 89, 0.05) 0%, transparent 80%);
  color: var(--text-cream);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--border-gold);
  border-left: 3px solid var(--gold-primary);
  box-shadow: var(--shadow-deep);
  font-size: 12px;
  line-height: 1.6;
}

.parchment-sheet h4 {
  color: var(--gold-primary);
  font-size: 13px;
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.parchment-sheet p {
  color: var(--text-cream) !important;
}

/* Download Cabinet layout */
.cabinet-section h4 {
  font-size: 12px;
  color: var(--text-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(223, 186, 89, 0.08);
  padding-bottom: 4px;
}

.cabinet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

@media (min-width: 600px) {
  .cabinet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Cabinet File Row */
.cabinet-file-row {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(223, 186, 89, 0.08);
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-classic);
  text-decoration: none;
}

.cabinet-file-row:hover {
  background: rgba(223, 186, 89, 0.05);
  border-color: var(--gold-primary);
  transform: translateX(3px);
}

.file-info-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-icon {
  font-size: 16px;
  color: var(--gold-primary);
}

.file-name-meta {
  display: flex;
  flex-direction: column;
}

.file-name-meta .name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-cream);
}

.file-name-meta .meta {
  font-size: 9px;
  color: var(--text-secondary);
}

.file-action-btn {
  color: var(--gold-primary);
  font-size: 12px;
  transition: var(--transition-classic);
}

.cabinet-file-row:hover .file-action-btn {
  transform: scale(1.1);
  color: var(--gold-light);
}

/* Metadata grid */
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metadata-chip {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  padding: 6px 10px;
  text-align: center;
}

.metadata-chip .lbl {
  font-size: 8px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.metadata-chip .val {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-cream);
}

/* Footer Section */
footer {
  grid-column: 1 / -1;
  margin-top: 50px;
  border-top: 1px solid var(--border-gold);
  padding: 30px 20px;
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  position: relative;
}

footer::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: var(--gold-primary);
  opacity: 0.3;
}

footer .quote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-gold);
  margin-bottom: 8px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Toast Alerts */
.toast-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #0c1426;
  border: 1px solid var(--gold-primary);
  color: var(--text-cream);
  padding: 12px 18px;
  border-radius: 4px;
  box-shadow: var(--shadow-deep);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 11px;
  font-weight: 500;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.fade-out {
  animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(10px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cover Canvas Dynamic Styling */
.cover-canvas {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 10px;
  color: var(--text-cream);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.7);
  transition: var(--transition-classic);
}

.cover-canvas::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1.5px solid rgba(223, 186, 89, 0.15);
  border-radius: 4px;
  pointer-events: none;
  transition: var(--transition-classic);
}

.score-card:hover .cover-canvas::before {
  border-color: rgba(223, 186, 89, 0.45);
  box-shadow: 0 0 8px rgba(223, 186, 89, 0.2);
}

.canvas-crest {
  font-size: 16px;
  color: var(--gold-primary);
  opacity: 0.85;
  margin-top: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.canvas-title {
  font-family: 'Playfair Display', serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-cream);
  margin: auto 0;
  line-height: 1.3;
  padding: 0 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.canvas-composer {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  margin-bottom: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Canvas Theme Gradients */
.cover-canvas.theme-0 { background: linear-gradient(135deg, #060913 0%, #111a2e 100%); }
.cover-canvas.theme-1 { background: linear-gradient(135deg, #2a080c 0%, #4a151b 100%); }
.cover-canvas.theme-2 { background: linear-gradient(135deg, #052316 0%, #0c3e29 100%); }
.cover-canvas.theme-3 { background: linear-gradient(135deg, #1f1203 0%, #3a2206 100%); }
.cover-canvas.theme-4 { background: linear-gradient(135deg, #180529 0%, #2f104d 100%); }
.cover-canvas.theme-5 { background: linear-gradient(135deg, #091a1a 0%, #153838 100%); }
.cover-canvas.theme-6 { background: linear-gradient(135deg, #111111 0%, #2c2c2c 100%); }
.cover-canvas.theme-7 { background: linear-gradient(135deg, #1e0322 0%, #3b0642 100%); }
.cover-canvas.theme-8 { background: linear-gradient(135deg, #021f24 0%, #063c46 100%); }
.cover-canvas.theme-9 { background: linear-gradient(135deg, #221c0b 0%, #3e3315 100%); }

/* Confirmation Dialog Overlay */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-classic);
  padding: 20px;
}

.confirm-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.confirm-content {
  background: var(--bg-deep);
  border: 1px solid var(--gold-primary);
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-deep);
  transform: scale(0.95) translateY(10px);
  transition: var(--transition-classic);
  position: relative;
}

.confirm-overlay.open .confirm-content {
  transform: scale(1) translateY(0);
}

.confirm-content h3 {
  font-size: 18px;
  color: var(--text-gold);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.confirm-content p {
  font-size: 12px;
  color: var(--text-cream);
  line-height: 1.5;
  margin-bottom: 24px;
}

.confirm-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-btn {
  padding: 8px 18px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-classic);
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.confirm-btn.cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-cream);
}

.confirm-btn.cancel:hover {
  background: rgba(255, 255, 255, 0.12);
}

.confirm-btn.accept {
  background: var(--gold-gradient);
  border: none;
  color: var(--bg-dark);
  box-shadow: var(--shadow-gold);
}

.confirm-btn.accept:hover {
  filter: brightness(1.1);
}

/* -------------------------------------------------------------
   Interactive Features: Audio Player, Sheet Music Viewer, Voice
   ------------------------------------------------------------- */

/* Idea 1: Interactive Audio Player */
.interactive-audio-player {
  width: 100%;
  background: rgba(4, 6, 12, 0.85);
  border: 1px solid rgba(223, 186, 89, 0.25);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-gradient);
  border: none;
  color: var(--bg-dark);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-classic);
  box-shadow: var(--shadow-gold);
}

.player-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.05);
}

.player-track-info {
  flex: 1;
  min-width: 0; /* Enable the flex item to shrink below content width */
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-track-title {
  display: block; /* Required for text-overflow to work on span */
  font-size: 10px;
  font-weight: 600;
  color: var(--text-cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}

/* Custom class for the synth play button inside the viewer */
.synth-play-btn {
  width: auto !important; /* Override the 24px restriction of .viewer-btn */
}

.player-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.player-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--gold-primary);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.player-visualizer {
  width: 100%;
  height: 35px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  border: 1px solid rgba(223, 186, 89, 0.1);
}

/* Idea 2: Sheet Music Interactive Viewer */
.sheet-music-viewer {
  background: rgba(6, 10, 19, 0.5);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(223, 186, 89, 0.15);
  padding-bottom: 8px;
}

.viewer-title {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  color: var(--text-gold);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.viewer-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.viewer-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  transition: var(--transition-classic);
}

.viewer-btn:hover {
  background: var(--gold-primary);
  color: var(--bg-dark);
}

.viewer-page-indicator {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
}

.viewer-canvas-container {
  width: 100%;
  display: flex;
  justify-content: center;
  background: #101625;
  border-radius: 6px;
  padding: 15px;
  border: 1px solid rgba(255,255,255,0.02);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
  max-height: 450px;
  overflow-y: auto;
}

.sheet-music-canvas {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.sheet-music-svg {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  background: #fefcfa;
  padding: 10px;
}

/* Idea 4: Read Aloud Button inside Biography */
.biography-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
}

.biography-header-container h4 {
  margin: 0 !important;
}

.read-aloud-btn {
  background: rgba(223, 186, 89, 0.05);
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-classic);
  box-shadow: var(--shadow-gold);
}

.read-aloud-btn:hover {
  background: var(--gold-primary);
  color: var(--bg-dark);
  transform: scale(1.06);
}

.read-aloud-btn.active {
  background: #f87171;
  color: white;
  border-color: transparent;
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(248, 113, 113, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}

/* Action bar for batch cabinet downloads */
.cabinet-actions-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(223, 186, 89, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.cabinet-action-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-classic);
}

.cabinet-action-btn:hover:not(:disabled) {
  background: rgba(223, 186, 89, 0.1);
  color: var(--gold-light);
}

.cabinet-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: transparent;
}

.cabinet-file-checkbox {
  accent-color: var(--gold-primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
  margin-right: 6px;
}
