/* =============================================
   Yui — Our Soundtrack page
   ============================================= */

.soundtrack-page {
  padding: var(--space-2xl) 0 var(--space-3xl);
  position: relative;
  z-index: 1;
}

.soundtrack-hero {
  text-align: center;
  margin-bottom: var(--space-xl);
}
.soundtrack-hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin: var(--space-sm) 0 var(--space-md);
}
.soundtrack-tagline {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ----- shared "centered card" used for not-paired & empty ----- */
.st-card {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  max-width: 540px;
  margin: 0 auto var(--space-lg);
}
.st-empty-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--space-md);
}
.st-empty-sub {
  color: var(--text-secondary);
  margin: var(--space-sm) 0 var(--space-lg);
  line-height: 1.55;
}

/* ----- toolbar ----- */
.st-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.st-toolbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  padding: 6px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-full);
}
.st-meta-sep {
  color: var(--text-muted);
  margin: 0 2px;
}
.st-conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.st-conn-dot--connecting,
.st-conn-dot--waiting {
  background: var(--accent-amber);
  animation: st-pulse 1.4s ease-in-out infinite;
}
.st-conn-dot--online {
  background: var(--accent-mint);
  box-shadow: 0 0 12px rgba(126, 184, 166, 0.6);
}
.st-conn-dot--offline { background: var(--text-muted); }
.st-conn-dot--error   { background: var(--accent-coral); }

@keyframes st-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(1.2); }
}

/* ----- add form ----- */
.st-add-form {
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.st-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-md);
}
.st-source-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 6px 0 0;
  min-height: 1.25em;
}
.st-source-hint.is-ok    { color: var(--accent-mint); }
.st-source-hint.is-warn  { color: var(--accent-amber); }
.st-note-input {
  width: 100%;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  line-height: 1.5;
}
.st-optional {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.8em;
  margin-left: 4px;
}
.st-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.st-error {
  margin-top: var(--space-md);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(224, 120, 86, 0.10);
  border: 1px solid rgba(224, 120, 86, 0.35);
  color: var(--accent-coral);
  font-size: 0.9rem;
}

/* ----- album list ----- */
.st-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.st-item {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: var(--space-md);
  padding: var(--space-md);
  align-items: stretch;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.st-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* art / thumbnail */
.st-item-art {
  position: relative;
  display: block;
  width: 132px;
  height: 88px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary);
  text-decoration: none;
  flex-shrink: 0;
}
.st-item-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.st-item-thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--gradient-warm);
  color: var(--text-primary);
}
.st-item-source-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  backdrop-filter: blur(4px);
}
.st-item-source-badge.is-spotify { background: rgba(30, 215, 96, 0.85); color: #0a1a0d; }
.st-item-source-badge.is-youtube { background: rgba(255, 0, 0, 0.85); color: #fff; }
.st-item-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.0);
  opacity: 0;
  transition: opacity var(--transition-fast), background var(--transition-fast);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
.st-item-art:hover .st-item-play-icon {
  opacity: 1;
  background: rgba(0, 0, 0, 0.35);
}

/* body */
.st-item-body {
  min-width: 0; /* let titles ellipsize */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.st-item-title-link {
  text-decoration: none;
  color: inherit;
}
.st-item-title-link:hover .st-item-title { color: var(--accent-amber); }
.st-item-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition-fast);
}
.st-item-artist {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.st-item-note {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.st-item-meta {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* actions */
.st-item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  justify-content: flex-start;
}
.st-icon-btn {
  background: none;
  border: 1px solid var(--bg-glass-border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.st-icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--bg-glass-border);
  background: var(--bg-card-hover);
}
.st-remove-btn:hover {
  color: var(--accent-coral);
  border-color: rgba(224, 120, 86, 0.4);
}

/* empty state */
.st-empty {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  margin-top: var(--space-md);
}
.st-empty h3 {
  margin: var(--space-sm) 0 var(--space-sm);
  font-size: 1.3rem;
}

/* ----- mobile ----- */
@media (max-width: 640px) {
  .st-form-row {
    grid-template-columns: 1fr;
  }
  .st-item {
    grid-template-columns: 96px 1fr;
    grid-template-rows: auto auto;
  }
  .st-item-art {
    width: 96px;
    height: 64px;
  }
  .st-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
    margin-top: -4px;
  }
  .st-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .st-toolbar .btn { width: 100%; }
  .st-toolbar-meta { justify-content: center; }
}
