/* Lyrics Page Styles - Premium Urban Design */

/* Use site's CSS variables from style.css */
/* 
   Expected variables:
   --primary-color, --bg-color, --bg-gradient, --card-bg, --card-border,
   --text-main, --text-secondary, --font-heading, --font-body, 
   --glass-blur, --button-bg, --transition
*/

/* Theme Toggle Button (Legacy for other pages) */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  cursor: pointer;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: var(--button-bg);
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
  border-color: var(--primary-color);
}

.theme-toggle i {
  font-size: 1.2rem;
  color: var(--text-main);
  transition: color 0.3s ease;
}

/* Floating Action Panel (New) */
.action-panel {
  position: fixed;
  top: 20px;
  /* Aligned with old toggle */
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.action-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(20, 20, 20, 0.6);
  /* Slightly darker for contrast */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.action-btn:hover {
  background: var(--button-bg);
  transform: translateX(-5px) scale(1.05);
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
  z-index: 10;
}

.action-btn i,
.action-btn img {
  transition: transform 0.3s ease;
}

.action-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  /* Make white by default for dark theme */
}

.action-btn:hover i,
.action-btn:hover img {
  transform: scale(1.1);
}

/* Maintain original colors on hover */
.action-btn.yandex:hover img {
  filter: none;
}

.action-btn.zvuk:hover img {
  filter: none;
}

.action-btn.vk img {
  filter: brightness(1) invert(1);
}

/* Light theme for new buttons */
[data-theme="light"] .action-btn.yandex img,
[data-theme="light"] .action-btn.zvuk img {
  filter: brightness(0) invert(0);
  /* Black by default in light theme */
}

[data-theme="light"] .action-btn.vk img {
  filter: brightness(1) invert(0);
}

[data-theme="light"] .action-btn.yandex:hover img,
[data-theme="light"] .action-btn.zvuk:hover img,
[data-theme="light"] .action-btn.vk:hover img {
  filter: none;
  /* Original color on hover */
}

/* Specific button styles */
.action-btn.spotify:hover {
  background: #1DB954;
  color: #fff;
  border-color: #1DB954;
  box-shadow: 0 0 20px rgba(29, 185, 84, 0.4);
}

.action-btn.apple:hover {
  background: #FC3C44;
  color: #fff;
  border-color: #FC3C44;
  box-shadow: 0 0 20px rgba(252, 60, 68, 0.4);
}

.action-btn.yandex:hover {
  background: #FFFFFF;
  color: #000;
  border-color: #FFCC00;
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
}

.action-btn.zvuk:hover {
  background: #FFFFFF;
  color: #000;
  border-color: #2b46a6;
  box-shadow: 0 0 20px rgba(180, 242, 107, 0.4);
}

.action-btn.vk:hover {
  background: #0077FF;
  color: #000;
  border-color: #0077FF;
  box-shadow: 0 0 20px rgba(32, 2, 231, 0.4);
}

.action-btn.youtube:hover i {
  color: #ff0000;
}

.action-btn.youtube:hover {
  background: white;
  border-color: #ff0000;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
}

/* Light theme for new buttons */
[data-theme="light"] .action-btn.yandex:hover {
  color: #e4fb0e;
  background: #fff;
}

[data-theme="light"] .action-btn.zvuk:hover {
  color: rgb(13, 38, 85);
  background: #fff;
}

[data-theme="light"] .action-btn.vk:hover {
  color: #0077FF;
  background: #0077FF;
}

/* Tooltip Styles */
.action-tooltip {
  position: absolute;
  right: 60px;
  /* Left of the button */
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: var(--primary-color);
  color: #000;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
}

.action-tooltip.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Success/Error States */
.action-btn.success {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
}

.action-btn.error {
  background: #ff4757;
  color: #fff;
  border-color: #ff4757;
}

/* Light Theme Adjustments */
[data-theme="light"] .action-btn {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
  color: #333;
}

[data-theme="light"] .action-btn:hover {
  background: #fff;
  color: var(--primary-color);
}

[data-theme="light"] .action-btn.spotify:hover {
  color: #fff;
  background: #1DB954;
}

[data-theme="light"] .action-btn.apple:hover {
  color: #fff;
  background: #FC3C44;
}

/* Responsive */
@media (max-width: 768px) {
  .action-panel {
    top: auto;
    bottom: 20px;
    /* Move to bottom right on mobile for better reachability */
    right: 20px;
    flex-direction: column-reverse;
    /* Stack upwards */
  }

  .action-btn {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  footer {
    margin-right: 70px;
  }
}

/* Page Layout */
.lyrics-page {
  min-height: 100vh;
  padding: 80px 20px 80px;
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  font-family: var(--font-body);
}

.lyrics-page .container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

/* Main Song Content Card */
.lyrics-page .song-content {
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 60px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* Top accent line */
.lyrics-page .song-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  opacity: 0.5;
}

/* Song Title */
.lyrics-page h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  /*text-transform: uppercase;*/
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  position: relative;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding-bottom: 0.2em;
  /* Ensure descenders (g, j, p, q, y) are not cut off */
}

/* Song Parts (Verses, Chorus, etc) */
.song-part {
  margin-bottom: 40px;
  padding: 30px 40px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 16px 16px 0;
  line-height: 1.8;
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--text-secondary);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
}

.song-part:hover {
  background: rgba(255, 255, 255, 0.04);
  border-left-color: var(--primary-color);
  transform: translateX(10px);
  box-shadow: -10px 0 30px rgba(0, 255, 136, 0.05);
  color: var(--text-main);
}

/* Song Description (Metadata) */
.song-description {
  margin-bottom: 8px;
  padding: 30px;
  text-align: left;
  position: relative;
}

.song-description h2,
.song-description h3 {
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 2px;
  margin-bottom: 10px;
  font-weight: 400;
}

.song-description h2 {
  font-size: 1.4rem;
  color: var(--text-main);
}

.song-description h3 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.song-description p {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Chorus Special Styling */
.song-part.chorus {
  background: rgba(0, 255, 136, 0.03);
  border-left-color: rgba(0, 255, 136, 0.4);
}

.song-part.chorus:hover {
  background: rgba(0, 255, 136, 0.08);
  border-left-color: var(--primary-color);
}

/* Section Headings (Verset, Chœur, etc) */
.song-part h3 {
  font-family: 'Barlow Condensed', sans-serif;
  color: var(--primary-color);
  font-size: 1.1rem;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 10px;
}

.song-part h3::after {
  content: '';
  height: 1px;
  flex-grow: 1;
  background: linear-gradient(90deg, var(--primary-color), transparent);
  opacity: 0.3;
}

/* Back Button */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  margin-top: 50px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.back-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--primary-color);
  transition: width 0.3s ease;
  z-index: -1;
}

.back-button:hover {
  color: #000;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 255, 136, 0.22);
}

.back-button:hover::before {
  width: 100%;
}

.back-button i {
  transition: transform 0.3s ease;
}

.back-button:hover i {
  transform: translateX(-5px);
}

.back-button:active {
  transform: translateY(0);
  box-shadow: 0 0 0 rgba(0, 255, 136, 0);
}

.song-navigation {
  margin-top: 40px;
  padding-top: 10px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-right: 70px;
}

.song-navigation h2 {
  margin-bottom: 20px;
}

.navigation-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.song-navigation .back-button {
  margin-top: 0;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.song-navigation .back-button.next:hover i {
  transform: translateX(5px);
}

/* Album Platforms on Song Pages */
.lyrics-page .platforms {
  margin-top: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 30px;
  padding-right: 70px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.lyrics-page .platforms h2 {
  margin-bottom: 24px;
}

.lyrics-page .platforms .platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* Light Theme Adjustments */
[data-theme="light"] {
  --text-main: #1a1a1a;
  --text-secondary: #4a4a4a;
}

[data-theme="light"] .lyrics-page .song-content {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .lyrics-page h1 {
  background: linear-gradient(180deg, #1a1a1a 0%, #4a4a4a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

[data-theme="light"] .song-part {
  background: rgba(255, 255, 255, 0.5);
  border-left-color: rgba(0, 0, 0, 0.1);
  color: #333;
}

[data-theme="light"] .song-part:hover {
  background: #fff;
  border-left-color: var(--primary-color);
  box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.05);
  color: #000;
}

[data-theme="light"] .back-button {
  color: #333;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .back-button:hover {
  color: #fff;
}

/* Responsive Design */
@media (max-width: 992px) {
  .lyrics-page .container {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .lyrics-page {
    padding: 50px 15px 40px;
  }

  .lyrics-page .song-content {
    padding: 40px 25px;
    border-radius: 24px;
  }

  .lyrics-page h1 {
    font-size: 3rem;
    margin-bottom: 40px;
  }

  .lyrics-page h2 {
    font-size: 1.3rem;
  }

  .lyrics-page h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .song-part {
    padding: 20px 20px;
    margin-bottom: 15px;
    font-size: 1.05rem;
    border-radius: 12px;
  }

  .navigation-buttons {
    grid-template-columns: 1fr;
  }

  .lyrics-page .platforms {
    padding: 24px;
    padding-right: 24px;
    margin-right: 70px;
  }

}

@media (max-width: 480px) {
  .lyrics-page h1 {
    font-size: 2.5rem;
  }

  .lyrics-page h2 {
    font-size: 1.2rem;
  }

  .lyrics-page h3 {
    font-size: 1rem;
  }

  .lyrics-page .song-content {
    padding: 25px 15px;
    background: transparent;
    /* Remove card bg on very small screens for cleaner look */
    box-shadow: none;
    border: none;
    backdrop-filter: none;
  }

  .song-part {
    background: rgba(20, 20, 20, 0.5);
    backdrop-filter: blur(10px);
    /* Add blur to individual parts instead */
    padding: 20px 15px;
  }

  [data-theme="light"] .song-part {
    background: rgba(255, 255, 255, 0.7);
  }
}