* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary-color: #e94560;
  --secondary-color: #533483;
  --background-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --card-bg: rgba(255, 255, 255, 0.05);
  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--background-gradient);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 8px;
  position: relative;
  z-index: 1;
}

header {
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  padding: 12px;
  border-radius: 12px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.header-content {
  position: relative;
}

.artist-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.artist-image:hover {
  transform: scale(1.05);
}

.tribute-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 12px;
}

header:hover .tribute-overlay {
  opacity: 1;
}

.tribute-text {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 8px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}
/* Enhanced loading states */
#loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
    display: none;
}

.audio-loading {
    opacity: 0.7;
    pointer-events: none;
}

.play-pause-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Smooth transitions for audio player */
.audio-player {
    transition: all 0.3s ease;
}

.song-item.playing {
    background: rgba(233, 69, 96, 0.2) !important;
    border-left: 3px solid #e94560;
    transition: all 0.3s ease;
}

.song-item.playing h4 {
    color: #e94560 !important;
    transition: color 0.3s ease;
}
.flower {
  font-size: 2rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: var(--primary-color);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

header p {
  font-size: 0.9rem;
  max-width: 100%;
  margin: 0 auto;
  color: var(--text-secondary);
  line-height: 1.4;
}

.emotional-quote {
  font-style: italic;
  text-align: center;
  margin: 16px 0;
  padding: 12px;
  background: rgba(233, 69, 96, 0.1);
  border-left: 4px solid var(--primary-color);
  font-size: 0.95rem;
  border-radius: 4px;
}

/* Search and Filter */
.search-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  position: relative;
}

.search-wrapper {
  position: relative;
}

.search-box {
  padding: 10px 12px 10px 40px;
  border: none;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 100%;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.search-box:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px var(--primary-color);
}

.search-box::placeholder {
  color: var(--text-secondary);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.filter-select {
  padding: 10px 12px;
  border: none;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 100%;
  backdrop-filter: blur(5px);
  cursor: pointer;
}

/* Player Styles */
.player-container {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.now-playing {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.album-art {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 1.5rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  animation: rotate 20s linear infinite;
  animation-play-state: paused;
}

.album-art.playing {
  animation-play-state: running;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

.track-info h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-info p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-container {
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-bottom: 8px;
  cursor: pointer;
  position: relative;
  transition: height 0.2s;
}

.progress-container:hover {
  height: 8px;
}

.progress {
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s;
}

.time-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.controls button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.controls button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.controls button:active {
  background: var(--primary-color);
  transform: scale(0.95);
}

.play-pause {
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  transition: height 0.2s;
}

.volume-slider:hover {
  height: 6px;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  transition: all 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* View Controls */
.view-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.view-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.view-btn.active {
  background: var(--primary-color);
  box-shadow: 0 4px 8px rgba(233, 69, 96, 0.3);
}

.view-btn:active {
  transform: translateY(0);
}

/* Albums and Songs */
h2 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 16px;
  color: var(--primary-color);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.albums-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.album-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.album-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.album-card.active {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.album-img {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-primary);
  position: relative;
}

.album-year {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 0.8rem;
}

.album-info {
  padding: 12px;
}

.album-info h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-info p {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.songs-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.album-card.active .songs-list {
  max-height: 300px;
  overflow-y: auto;
}

.song-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.song-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(5px);
}

.song-item.playing {
  background: rgba(233, 69, 96, 0.2);
  border-left: 3px solid var(--primary-color);
}

.song-item.playing h4 {
  color: var(--primary-color);
}

.song-info {
  flex: 1;
  min-width: 0;
}

.song-info h4 {
  font-size: 0.9rem;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-duration {
  color: var(--text-secondary);
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-left: 8px;
}

/* Falling Flowers */
.falling-flowers {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.falling-flowers .flower {
  position: absolute;
  top: -50px;
  font-size: 1rem;
  animation: fall linear forwards;
  user-select: none;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(233, 69, 96, 0.9);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: transform 0.3s;
  font-size: 0.9rem;
  max-width: 90%;
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Loading Indicator */
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

/* Search Suggestions */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(30, 30, 46, 0.95);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: var(--shadow);
  display: none;
  backdrop-filter: blur(10px);
}

.search-suggestions.active {
  display: block;
}

.suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: rgba(233, 69, 96, 0.2);
}

/* Alternative Views */
.songs-list.all-songs {
  display: none;
  max-height: 400px;
  overflow-y: auto;
  background: var(--card-bg);
  border-radius: 8px;
  margin-top: 16px;
}

.songs-list.all-songs.active {
  display: block;
}

.year-section, .alphabet-section {
  margin-bottom: 16px;
}

.year-header, .alphabet-header {
  background: rgba(233, 69, 96, 0.2);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Responsive Design */
@media (min-width: 768px) {
  .container {
    padding: 16px;
    max-width: 768px;
  }
  
  .search-container {
    flex-direction: row;
  }
  
  .search-box {
    flex: 1;
  }
  
  .filter-select {
    width: auto;
    min-width: 140px;
  }
  
  .albums-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .artist-image {
    width: 150px;
    height: 150px;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  header p {
    font-size: 1rem;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
  
  .albums-container {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .artist-image {
    width: 180px;
    height: 180px;
  }
  
  h1 {
    font-size: 2.5rem;
  }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .artist-image {
    border-width: 2px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .falling-flowers .flower {
    animation: none;
    opacity: 0;
  }
  
  .album-art {
    animation: none;
  }
}

/* Print Styles */
@media print {
  .player-container,
  .view-controls,
  .search-container,
  .falling-flowers {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}