/* ============================================
   PRIDE — Cardinal Four Album Website
   Stylesheet v1.0
   ============================================ */

/* === CSS Variables === */
:root {
  /* Pride flag colors */
  --red: #FF0018;
  --orange: #FFA52C;
  --yellow: #FFFF41;
  --green: #008018;
  --blue: #0000F9;
  --violet: #86007D;

  /* Background & text */
  --bg-primary: #0a0a0f;
  --bg-card: #12121a;
  --bg-hover: #1a1a25;
  --text-primary: #ffffff;
  --text-secondary: #b0b0c0;
  --text-muted: #606070;

  /* Spacing & sizing */
  --max-width: 900px;
  --border-radius: 12px;
  --transition: 0.2s ease;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* === Typography === */
h1, h2, h3 {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
}

a {
  color: var(--violet);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--orange);
}

/* === Header / Navigation === */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(to right, var(--red), var(--orange), var(--yellow), var(--green), var(--blue), var(--violet)) 1;
}

header {
  padding: 0.5rem 1rem;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all var(--transition);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* === Hero Section === */
.hero {
  text-align: center;
  padding: 4rem 1rem;
  background: linear-gradient(180deg, rgba(134, 0, 125, 0.1) 0%, transparent 100%);
}

.hero h1 {
  font-size: clamp(4rem, 12vw, 8rem);
  color: var(--text-primary);
  text-shadow: 0 0 60px rgba(134, 0, 125, 0.5);
  margin: 1rem 0;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 500px;
  margin: 0 auto;
}

/* === Pride Flag Animation === */
.hero-flag,
.footer-flag {
  display: flex;
  justify-content: center;
  gap: 0;
  height: 8px;
  overflow: hidden;
}

.hero-flag span {
  width: calc(100% / 6);
  height: 100%;
  background: var(--color);
  /* Color assigned via inline style --i mapping */
  --color: var(--red);
}

/* Assign stripe colors */
.hero-flag span[style*="--i:0"],
.footer-flag span:nth-child(1) { background: var(--red); }
.hero-flag span[style*="--i:1"],
.footer-flag span:nth-child(2) { background: var(--orange); }
.hero-flag span[style*="--i:2"],
.footer-flag span:nth-child(3) { background: var(--yellow); }
.hero-flag span[style*="--i:3"],
.footer-flag span:nth-child(4) { background: var(--green); }
.hero-flag span[style*="--i:4"],
.footer-flag span:nth-child(5) { background: var(--blue); }
.hero-flag span[style*="--i:5"],
.footer-flag span:nth-child(6) { background: var(--violet); }

.footer-flag span {
  flex: 1;
}

/* === Album Info === */
.album-info {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.album-art {
  flex-shrink: 0;
}

.album-art-img {
  width: auto;
  height: 245px;
  display: block;
}
.album-art-placeholder {
  width: 140px;
  height: 245px;
  background: linear-gradient(135deg, var(--violet) 0%, var(--blue) 50%, var(--green) 100%);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  box-shadow: 0 8px 32px rgba(134, 0, 125, 0.3);
}

.track-count {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* === Track List === */
.track-list {
  flex: 1;
  min-width: 0;
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.track {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 1.5rem;
  transition: background var(--transition);
  border: 1px solid transparent;
}

.track {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.track:last-child {
  border-bottom: none;
}
.track:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.05);
}

.track-info {
  min-width: 0;
}

.track-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.track-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0;
}

.track-bpm {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.track-meta {
  margin-top: 0.25rem;
}

.track-genre {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

/* === Audio Player === */
.track-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  background: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.play-btn:hover {
  border-color: var(--violet);
  background: var(--violet);
  transform: scale(1.05);
}

.play-btn.playing {
  border-color: var(--orange);
  background: var(--orange);
}

.play-btn.paused {
  border-color: var(--green);
  background: var(--green);
}

.audio-wrapper {
  width: 120px;
}

.progress-bar {
  height: 4px;
  background: var(--bg-primary);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--violet), var(--orange));
  transition: width 0.1s linear;
}

/* === Star Rating === */
.track-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rating-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  display: none; /* Show only after rating */
}

.track-rating.rated .rating-label {
  display: block;
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.star:hover,
.star.active {
  color: var(--yellow);
  transform: scale(1.2);
}

.star.active {
  color: var(--yellow);
}

/* === Suno Link === */
.suno-link {
  color: var(--text-muted);
  font-size: 1.5rem;
  transition: all var(--transition);
  padding: 0.5rem;
}

.suno-link:hover {
  color: var(--orange);
  transform: scale(1.1);
}

/* === CTA Section === */
.cta {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-secondary);
}

.cta a {
  color: var(--orange);
  font-weight: 600;
}

/* === Footer === */
footer {
  text-align: center;
  padding: 3rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
  margin: 0.5rem 0;
}

.footer-flag {
  margin-bottom: 1.5rem;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.copyright {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* === Responsive === */
@media (max-width: 700px) {
  .track {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .track-player,
  .track-rating {
    justify-content: flex-start;
  }

  .suno-link {
    display: none; /* Hide on mobile to save space */
  }

  .album-info {
    flex-direction: column;
    text-align: center;
  }

  nav {
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* === Comments Page === */
.page-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1rem 2rem;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-secondary);
}

.comments-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.comment-form {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--violet);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.submit-btn {
  background: linear-gradient(135deg, var(--violet) 0%, var(--blue) 100%);
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(134, 0, 125, 0.4);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.comment-name {
  font-weight: 600;
  color: var(--text-primary);
}

.comment-date {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.comment-text {
  color: var(--text-secondary);
  line-height: 1.7;
}

.no-comments {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* === Contact Page === */
.contact-info {
  max-width: 500px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-form {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.success-message,
.error-message {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.success-message {
  background: rgba(0, 128, 24, 0.2);
  color: var(--green);
  border: 1px solid var(--green);
}

.error-message {
  background: rgba(255, 0, 24, 0.2);
  color: var(--red);
  border: 1px solid var(--red);
}

/* Honeypot (hidden from real users) */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

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

.track,
.comment {
  animation: fadeIn 0.4s ease forwards;
}

.track:nth-child(1) { animation-delay: 0.05s; }
.track:nth-child(2) { animation-delay: 0.10s; }
.track:nth-child(3) { animation-delay: 0.15s; }
.track:nth-child(4) { animation-delay: 0.20s; }
.track:nth-child(5) { animation-delay: 0.25s; }
.track:nth-child(6) { animation-delay: 0.30s; }
.track:nth-child(7) { animation-delay: 0.35s; }
.track:nth-child(8) { animation-delay: 0.40s; }
/* === Content Layout (album art + tracks side by side) === */
.content-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.album-art-sidebar {
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  width: 200px;
}

.page-album-art {
  width: 100%;
  height: auto;
  max-height: 200px;
  display: block;
  animation: artPulse 4s ease-in-out infinite;
}

@media (max-width: 700px) {
  .content-layout {
    flex-direction: column;
  }
  .album-art-sidebar {
    position: static;
  }
  .page-album-art {
    height: 130px;
  }
}
