/* =============== Lyrics Details Page Styles =============== */

/* Screen reader only - hides content visually but keeps it accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

#songTitle {
  font-size: 3rem;
  font-weight: 800;
  margin: 20px 0 20px;
  padding: 10px;
  background: linear-gradient(135deg, #9b59b6, #e74c3c, #f39c12);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

/* Metadata Section */
.metadata {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 10px auto;
  max-width: 1000px;
  padding: 0 20px;
  flex-wrap: wrap;
}

.metadata-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.metadata-label {
  font-size: 0.9rem;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.metadata-value {
  font-size: 1.3rem;
  color: var(--text-color);
  font-weight: 700;
  text-align: center;
}

/* Video Links Section */
.video-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 8px auto 15px;
  max-width: 800px;
  padding: 0 20px;
  flex-wrap: wrap;
}

.youtube-link_2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: none;
  border: none;
  text-decoration: none;
  color: var(--text-color);
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  border-bottom: 1px solid var(--accent-color);
}

.youtube-link_2::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.youtube-link_2:hover::before {
  transform: scaleX(1);
}

.youtube-link_2 .video-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.youtube-link_2 .video-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-color);
  transition: color 0.3s ease;
  opacity: 0.9;
}

.youtube-link_2:hover {
  background: rgba(155, 89, 182, 0.1);
}

.youtube-link_2:hover .video-icon {
  transform: scale(1.15) rotate(5deg);
}

.youtube-link_2:hover .video-text {
  color: var(--accent-color);
  opacity: 1;
}

.youtube-link_2:visited .video-text {
  color: var(--accent-color);
  opacity: 0.8;
}

.youtube-link_2:visited:hover .video-text {
  color: var(--accent-color);
  opacity: 1;
}

.lyrics-heading {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 5px 0 5px;
  padding: 10px;
  position: relative;
}

.lyrics-heading::before,
.lyrics-heading::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.lyrics-heading::before {
  left: calc(50% - 250px);
}

.lyrics-heading::after {
  right: calc(50% - 250px);
}

/* Translation Section */
#translationSection {
  margin: 20px auto 5px;
  max-width: 1000px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

#translationSection label {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
}

#translationSection .select-wrapper {
  position: relative;
  display: inline-block;
  min-width: 200px;
  max-width: 300px;
  flex-shrink: 0;
}

/* Language Selector */
#languageSelector {
  width: 100%;
  text-align: center;
  min-width: 150px;
  padding: 10px 1px;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-bottom: 2px solid var(--border-color);
  background: transparent;
  color: var(--text-color);
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

#languageSelector:hover {
  border-bottom-color: var(--accent-color);
}

#languageSelector:focus {
  outline: none;
  border-bottom-color: var(--accent-color);
}

/* Switch Order Button */
.btn-icon-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent-color);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.btn-icon-round:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: rotate(180deg);
}

.btn-icon-round:active {
  transform: rotate(180deg) scale(0.95);
}

/* Icon visibility for dark mode */
body.theme-dark .btn-icon-round img {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* Icon visibility for light mode */
body.theme-light .btn-icon-round img {
  filter: brightness(0);
  opacity: 0.7;
}

.btn-icon-round:hover img {
  filter: brightness(0) invert(1);
  opacity: 1;
}

/* Lyrics Container */
#lyricsContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 30px;
  align-items: flex-start;
}

/* Order switching for mobile */
#lyricsContainer.reversed #originalColumn {
  order: 2;
}

#lyricsContainer.reversed #translationColumn {
  order: 1;
}

.column {
  flex: 1;
  min-width: 320px;
}

.column h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--text-color);
  padding: 15px;
  background: linear-gradient(90deg, transparent, rgba(155, 89, 182, 0.2), transparent);
  border-radius: 8px;
  position: relative;
}

.column h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  border-radius: 2px;
}

.column p {
  color: var(--text-color);
  margin-bottom: 8px;
  white-space: pre-wrap;
  line-height: 1.6;
  font-family: 'Lora', 'Georgia', serif;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
} 

#translatedLyrics p {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeIn 0.5s forwards;
}

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

.lyric {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 14px 16px;
  border-radius: 8px;
  margin: 4px 0;
  color: var(--text-color);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
}

/* Enhanced electric purple glow */
.lyric.hovered {
  background: linear-gradient(90deg, rgba(155, 89, 182, 0.25), rgba(155, 89, 182, 0.15));
  box-shadow: 0 0 20px rgba(155, 89, 182, 0.6), inset 0 0 20px rgba(155, 89, 182, 0.1);
  transform: translateX(8px);
}

/* Divider */
.divider {
  border: none;
  height: 1px;
  background: #333;
  margin: 30px 0;
}

/* Back button */
.top-nav {
  text-align: left;
  margin: 20px 0;
  padding: 0 20px;
}

/* Button styles now handled by buttons.css */

/* Scroll to top button visibility */
#scrollToTopBtn {
  display: none;
}

#scrollToTopBtn.visible {
  display: flex;
}

/* Lyrics Controls */
.lyrics-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px auto;
  padding: 10px;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1000px;
}

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

/* Copy Notification */
.copy-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  background: var(--accent-color);
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.copy-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.copy-notification.error {
  background: #e74c3c;
}

/* Skeleton Loaders */
.skeleton-loader {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px auto;
  max-width: 1000px;
  padding: 0 20px;
  flex-wrap: wrap;
}

.skeleton-item {
  width: 120px;
  height: 60px;
  background: linear-gradient(90deg, rgba(155, 89, 182, 0.1) 25%, rgba(155, 89, 182, 0.2) 50%, rgba(155, 89, 182, 0.1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-line {
  height: 24px;
  margin: 12px 0;
  background: linear-gradient(90deg, rgba(155, 89, 182, 0.1) 25%, rgba(155, 89, 182, 0.2) 50%, rgba(155, 89, 182, 0.1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Error Message */
.error-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-color);
}

.error-message p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

/* Retry button - uses btn-secondary from buttons.css */

/* Custom Confirmation Modal */
.modal-confirm {
  max-width: 400px;
  text-align: center;
  padding: 40px 30px;
}

.confirm-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(231, 76, 60, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-icon svg {
  color: #e74c3c;
}

.modal-confirm h3 {
  color: var(--text-color);
  font-size: 1.5rem;
  margin: 0 0 15px 0;
  font-weight: 700;
}

.modal-confirm p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 30px 0;
}

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

.confirm-buttons button {
  flex: 1;
  max-width: 140px;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
  #songTitle {
    font-size: 2rem;
    margin: 10px 0 5px;
  }

  .metadata {
    gap: 15px;
    margin: 10px auto;
  }

  .metadata-item {
    min-width: 100px;
  }

  .metadata-value {
    font-size: 1.1rem;
  }

  .video-links {
    flex-direction: column;
    gap: 8px;
    margin: 5px auto 10px;
  }

  .youtube-link_2 {
    min-width: 100%;
  }

  .lyrics-heading {
    font-size: 1.5rem;
    margin: 10px 0 5px;
  }

  .lyrics-heading::before,
  .lyrics-heading::after {
    display: none;
  }

  #lyricsContainer {
    flex-direction: column;
    gap: 0;
  }

  .column {
    min-width: 100%;
  }

  .column h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }

  /* Stack original and translation for each line */
  .lyric.original-line {
    margin-bottom: 8px;
    background: transparent;
    border-left: 3px solid var(--accent-color);
    padding-left: 12px;
  }

  .lyric.translated-line {
    margin-bottom: 8px;
    background: transparent;
    border-left: 3px solid #e74c3c;
    padding-left: 12px;
    font-style: italic;
    opacity: 0.9;
  }

  #translationSection {
    padding: 5px 10px;
    margin: 5px 10px 5px;
    gap: 10px;
  }

  #translationSection label {
    font-size: 0.95rem;
  }

  #languageSelector {
    width: 100%;
    max-width: 180px;
    min-width: 150px;
    font-size: 0.9rem;
  }

  #scrollToTopBtn {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 20px;
  }

  .lyrics-controls {
    margin: 10px auto 15px;
    padding: 10px;
    justify-content: center;
    gap: 15px;
  }

  .copy-controls {
    justify-content: center;
  }

  .control-btn {
    font-size: 0.9rem;
    padding: 8px 14px;
    flex: 1;
  }

  .modal-content {
    width: 95%;
    max-width: none;
    margin: 10px;
  }
}

/* =============== ANNOTATION STYLES =============== */

/* Line container for annotations */
.line-container {
  position: relative;
}

.line-container .lyric {
  position: relative;
  padding-right: 45px;
}

/* Annotation badge button */
.annotation-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 6px;
  font-size: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--background-color);
  color: var(--text-secondary);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  opacity: 0.6;
  min-width: 30px;
  text-align: center;
  z-index: 10;
}

.annotation-badge img {
  filter: brightness(0.7) contrast(1.2);
  transition: filter 0.3s ease;
}

.line-container:hover .annotation-badge {
  opacity: 1;
}

.line-container:hover .annotation-badge img {
  filter: brightness(1) contrast(1.2);
}

.annotation-badge:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(155, 89, 182, 0.3);
}

.annotation-badge:hover img {
  filter: brightness(1.5) contrast(1);
}

.annotation-badge.has-annotations {
  background: rgba(155, 89, 182, 0.1);
  border-color: var(--accent-color);
  color: var(--accent-color);
  font-weight: 600;
}

.annotation-badge.has-annotations img {
  filter: brightness(1) contrast(1.2);
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--bg-color);
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 20px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.15), rgba(231, 76, 60, 0.15));
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-color);
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-btn:hover {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  transform: rotate(90deg);
}

.modal-body {
  padding: 20px;
  max-height: calc(85vh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

/* Annotations list */
#annotationsList {
  margin-bottom: 30px;
  overflow-x: hidden;
}

.no-annotations {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 40px 20px;
}

/* Annotation card */
.annotation-card {
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.annotation-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.15);
  transform: translateY(-2px);
}

.annotation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.annotation-category {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.annotation-category.comment {
  background: rgba(52, 152, 219, 0.2);
  color: #3498db;
}

.annotation-category.question {
  background: rgba(241, 196, 15, 0.2);
  color: #f1c40f;
}

.annotation-category.context {
  background: rgba(155, 89, 182, 0.2);
  color: #9b59b6;
}

.annotation-category.suggestion {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
}

.annotation-author {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

.annotation-content {
  color: var(--text-color);
  line-height: 1.6;
  margin: 12px 0;
  padding: 12px;
  background: var(--hover-bg);
  border-radius: 6px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
  border: 1px solid var(--border-color);
}

.annotation-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.annotation-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.annotation-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(155, 89, 182, 0.1);
  transform: scale(1.1);
}

/* Add annotation form */
.add-annotation-form {
  border-top: 2px solid var(--border-color);
  padding-top: 20px;
}

.add-annotation-form h3 {
  margin-bottom: 15px;
  color: var(--accent-color);
  font-size: 1.2rem;
}

.add-annotation-form textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  margin-bottom: 15px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.add-annotation-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
}

.add-annotation-form select,
#editAnnotationModal textarea,
#editAnnotationModal select {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 15px;
  cursor: pointer;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

#editAnnotationModal textarea {
  resize: vertical;
  min-height: 100px;
}

.add-annotation-form select:focus,
#editAnnotationModal select:focus,
#editAnnotationModal textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
}

.modal-actions button {
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Copy notification (reuse for general notifications) */
.copy-notification.error {
  background: #e74c3c;
}