* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  color: #fff;
}

header {
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
  padding: 2rem;
  text-align: center;
  border-bottom: 3px solid #c9a227;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
}

.header-photo {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid #c9a227;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  flex-shrink: 0;
}

.header-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-photo-left img {
  transform: scale(1.2);
}

.header-photo-right img {
  transform: scale(1.2);
  object-position: center top;
}

.header-content h1 {
  font-size: 2.5rem;
  color: #c9a227;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  margin-bottom: 0.5rem;
}

.subtitle {
  color: #aaa;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.controls {
  max-width: 800px;
  margin: 0 auto;
}

#search {
  width: 100%;
  max-width: 500px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 25px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  margin-bottom: 1rem;
}

#search::placeholder {
  color: #888;
}

#search:focus {
  outline: 2px solid #c9a227;
  background: rgba(255,255,255,0.15);
}

.filters {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #c9a227;
  background: transparent;
  color: #c9a227;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: #c9a227;
  color: #1a1a2e;
}

.song-count {
  color: #888;
  font-size: 0.9rem;
}

.story-link-container {
  margin-bottom: 1.5rem;
}

.story-link {
  background: none;
  border: none;
  color: #c9a227;
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: underline;
  font-style: italic;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
}

.story-link:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(201, 162, 39, 0.5);
}

.story-link.active {
  color: #fff;
  font-weight: 600;
}

.story-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.story-section.hidden {
  display: none;
}

.story-content {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(201, 162, 39, 0.3);
}

.story-content h2 {
  color: #c9a227;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.story-content p {
  color: #ddd;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.story-content .quote {
  font-style: italic;
  color: #c9a227;
  font-size: 1.1rem;
  text-align: center;
  padding: 1rem 2rem;
  margin: 1.5rem 0;
  border-left: 3px solid #c9a227;
  background: rgba(201, 162, 39, 0.1);
}

.story-content .dedication {
  font-size: 1.2rem;
  font-weight: 600;
  color: #c9a227;
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(201, 162, 39, 0.3);
}

main {
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.song-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.song-grid.hidden {
  display: none;
}

.song-card {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.1);
}

.song-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(201, 162, 39, 0.2);
  border-color: #c9a227;
}

.song-card.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
}

.song-card.unavailable:hover {
  transform: none;
  box-shadow: none;
}

.thumbnail-container {
  position: relative;
  padding-top: 56.25%;
  background: #000;
}

.thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.song-card:hover .play-overlay {
  opacity: 1;
}

.play-icon {
  width: 60px;
  height: 60px;
  background: rgba(201, 162, 39, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-icon::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 20px solid #1a1a2e;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 5px;
}

.song-info {
  padding: 1rem;
}

.song-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.song-artist {
  font-size: 0.875rem;
  color: #c9a227;
  margin-bottom: 0.25rem;
}

.song-duration {
  font-size: 0.75rem;
  color: #888;
}

.song-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: #c41e3a;
  color: #fff;
  font-size: 0.7rem;
  border-radius: 10px;
  margin-top: 0.5rem;
}

.unavailable-badge {
  background: #666;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #1a1a2e;
  border-radius: 12px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  border: 2px solid #c9a227;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}

.close-btn:hover {
  color: #c9a227;
}

#player-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

#player-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-info {
  padding: 1.5rem;
  text-align: center;
}

.modal-info h2 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.modal-info p {
  color: #c9a227;
}

footer {
  text-align: center;
  padding: 2rem;
  color: #666;
  border-top: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
  }

  .header-photo {
    width: 100px;
    height: 100px;
  }

  .header-content h1 {
    font-size: 1.75rem;
  }

  main {
    padding: 1rem;
  }

  .song-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .header-photo {
    display: none;
  }
}
