/* Base Styles */
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
  background-attachment: fixed;
  color: #f0f2f5;
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
  scroll-behavior: smooth;
}

h1,
h2,
h3 {
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

h2 {
  font-size: 1.6rem;
  color: #e1e7ff;
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 500;
  opacity: 0.9;
}

h3 {
  font-size: 1.4rem;
  color: #a8b8ff;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  border-left: 4px solid #667eea;
  padding-left: 1rem;
  position: relative;
}

h3::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(to bottom, #667eea, #764ba2);
  border-radius: 2px;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #e8eaed;
  text-align: justify;
  hyphens: auto;
}

/* Container Layout */
.container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 2rem;
  gap: 2.5rem;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.content {
  flex: 3;
  min-width: 300px;
  background: rgba(255, 255, 255, 0.03);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar,
.sidebar-widgets {
  flex: 1;
  min-width: 280px;
  background: linear-gradient(145deg, #1e1f26 0%, #252633 100%);
  color: #e1e7ff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(5px);
}

/* TOC Links */
.toc {
  margin: 2rem 0;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.toc ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin: 0;
}

.toc a {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.toc a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.toc a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
}

.toc a:hover::before {
  left: 100%;
}

/* Sidebar */
.sidebar h4 {
  color: #eee;
  border-bottom: 1px solid #444;
  margin-bottom: 1rem;
}

.sidebar ul,
.sidebar-widgets ul {
  list-style: none;
  padding-left: 0;
}

.sidebar li,
.sidebar-widgets li {
  margin: 0.5rem 0;
}

.sidebar a,
.sidebar-widgets a {
  color: #aad;
  text-decoration: none;
}

.sidebar a:hover,
.sidebar-widgets a:hover {
  text-decoration: underline;
  color: #fff;
}

/* Blockquotes */
blockquote {
  margin: 2rem 0;
  padding: 2rem;
  border-left: 4px solid #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: #e1e7ff;
  font-style: italic;
  border-radius: 0 16px 16px 0;
  position: relative;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.1);
  font-size: 1.1rem;
  line-height: 1.8;
}

blockquote::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 3rem;
  color: #667eea;
  opacity: 0.3;
  font-family: serif;
}

/* Search Box */
.search-box {
  display: flex;
  margin-bottom: 2rem;
}

.search-box input {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 0.3rem 0 0 0.3rem;
  background: #2a2b34;
  color: white;
}

.search-box button {
  padding: 0.5rem 1rem;
  border: none;
  background: #3f78e0;
  color: white;
  border-radius: 0 0.3rem 0.3rem 0;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-box button:hover {
  background: #3461b3;
}

/* Lyrics Button */
.lyrics-link {
  display: inline-block;
  margin: 1.5rem 0;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  font-size: 1.1rem;
}

.lyrics-link::before {
  content: '🎵';
  margin-right: 0.5rem;
}

.lyrics-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
}

.lyrics-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.lyrics-link:hover::after {
  left: 100%;
}

/* YouTube Embed */
.youtube-preview {
  display: inline-block;
  margin: 2rem 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  border: 2px solid rgba(102, 126, 234, 0.3);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  position: relative;
}

.youtube-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(102, 126, 234, 0.1) 50%, transparent 60%);
  pointer-events: none;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.youtube-preview:hover {
  transform: scale(1.03) translateY(-5px);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
  border-color: rgba(102, 126, 234, 0.6);
}

.youtube-preview:hover::before {
  opacity: 1;
}

.youtube-preview img {
  width: 100%;
  max-width: 720px;
  display: block;
  border-radius: 14px;
  transition: transform 0.3s ease;
}

.youtube-preview:hover img {
  transform: scale(1.01);
}

/* Comments */
#comments {
  background: rgba(255, 255, 255, 0.03);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  margin-top: 2rem;
}

#comments input,
#comments textarea {
  background: rgba(255, 255, 255, 0.05);
  color: #f0f2f5;
  border: 2px solid rgba(102, 126, 234, 0.3);
  padding: 1rem;
  border-radius: 12px;
  width: 100%;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

#comments input:focus,
#comments textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

#comments button {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#comments button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
}

#comments .comment {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  transition: transform 0.3s ease;
}

#comments .comment:hover {
  transform: translateY(-2px);
}

#comments .comment p {
  margin: 0.5rem 0 0;
  color: #e8eaed;
}

#comments .comment small {
  color: #a8b8ff;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .container,
  .main-grid {
    flex-direction: column;
    padding: 1rem;
    gap: 1.5rem;
    margin: 1rem;
  }

  .content {
    padding: 1.5rem;
  }

  .sidebar,
  .sidebar-widgets {
    padding: 1.5rem;
    min-width: unset;
  }

  h1 {
    font-size: 2rem;
    text-align: center;
  }

  h2 {
    font-size: 1.3rem;
    text-align: center;
    color: #e1e7ff;
  }

  h3 {
    font-size: 1.2rem;
    margin-top: 2rem;
  }

  .toc {
    padding: 1.5rem;
  }

  .toc ul {
    gap: 0.8rem;
  }

  .toc a {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  p {
    font-size: 1rem;
    text-align: left;
  }

  section {
    padding: 1.5rem;
  }

  blockquote {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }

  .sidebar {
    order: 1;
  }

  .youtube-preview {
    margin: 1.5rem 0;
  }

  .lyrics-link {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  #comments {
    padding: 1.5rem;
  }

  #scrollTopBtn {
    bottom: 1rem;
    right: 1rem;
    padding: 0.8rem;
    font-size: 1.2rem;
  }
}

/* Dark mode (already included by default) */
.dark body {
  background: #101014;
  color: #f0f0f0;
}

.container {
  max-width: 1400px;
  padding: 2rem 3rem;
}
body {
  letter-spacing: 0.2px;
}
p {
  font-size: 1.05rem;
  line-height: 1.7;
}
h2 {
  font-size: 1.6rem;
}
h3 {
  font-size: 1.3rem;
}
blockquote {
  background: linear-gradient(90deg, #181820 0%, #222 100%);
  padding: 1rem 1.5rem;
  border-left: 4px solid #3f78e0;
}
.sidebar,
.sidebar-widgets {
  background: #24262c;
}

blockquote {
  background: linear-gradient(90deg, #202228 0%, #262830 100%);
  border-left: 4px solid #3f78e0;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  color: #ccc;
  font-style: italic;
  margin: 1.5rem 0;
}

#comments .comment {
  background: #22242a;
  padding: 1rem;
  border-radius: 0.5rem;
}
.sidebar,
.sidebar-widgets,
blockquote {
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.02);
}
section {
  background: rgba(255, 255, 255, 0.02);
  padding: 2.5rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}
.breadcrumbs {
  font-size: 0.9rem;
  color: #a8b8ff;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(5px);
}
.breadcrumbs a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}
.breadcrumbs a:hover {
  color: #8b5cf6;
  text-decoration: none;
}
a,
button {
  transition: all 0.3s ease;
}

/* Enhanced link styles */
a {
  color: #667eea;
  text-decoration: none;
  position: relative;
}

a:hover {
  color: #8b5cf6;
}

/* Smooth animations */
* {
  box-sizing: border-box;
}

/* Enhanced focus states for accessibility */
*:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Selection styles */
::selection {
  background: rgba(102, 126, 234, 0.3);
  color: #fff;
}

::-moz-selection {
  background: rgba(102, 126, 234, 0.3);
  color: #fff;
}

/* Fade-in animation for content */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  animation: fadeInUp 0.8s ease-out;
}

section {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }

/* Floating animation for decorative elements */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.toc {
  animation: float 6s ease-in-out infinite;
}

/* Pulse animation for important elements */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
}

.lyrics-link {
  animation: pulse 2s infinite;
}

/* Scroll-triggered animations */
@media (prefers-reduced-motion: no-preference) {
  .content, .sidebar, .sidebar-widgets {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
  }

  .sidebar {
    animation-delay: 0.3s;
  }

  .sidebar-widgets {
    animation-delay: 0.4s;
  }
}
#scrollTopBtn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 1.2rem;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}
#scrollTopBtn.show {
  opacity: 1;
  visibility: visible;
}
#scrollTopBtn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
}

.song-title {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.song-artist {
  display: block;
  font-size: 1rem;
  color: #a8b8ff;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Quick Facts Card */
.quick-facts-card {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  margin-bottom: 2rem;
  justify-content: space-around;
  animation: fadeInUp 0.5s ease-out;
}

.fact-item {
  text-align: center;
  flex: 1;
  min-width: 120px;
}

.fact-label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #a8b8ff;
  margin-bottom: 0.3rem;
}

.fact-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

/* Sticky TOC adjustment */
.toc {
  position: sticky;
  top: 100px; /* Adjust based on header height */
  z-index: 10;
  margin: 2rem 0;
  text-align: center;
  background: rgba(255, 255, 255, 0.03); /* Keep existing background */
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

/* Visual Elements */
.content-image {
  width: 100%;
  border-radius: 16px;
  margin: 2rem 0;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  filter: brightness(0.9) contrast(1.1);
  transition: transform 0.3s ease;
}

.content-image:hover {
  transform: scale(1.01);
}

/* Related Songs Section */
.related-songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.song-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 120px;
}

.song-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: #667eea;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.song-card a {
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
}

.song-card span {
  display: block;
  font-size: 0.9rem;
  color: #a8b8ff;
  margin-top: 0.5rem;
}
