/* Modern CSS for Lyrics Manager - Pure CSS without Tailwind */

/* Reset and Base */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(circle at top left, #202338, #05060a);
  color: #e0e0e0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* Custom Colors */
:root {
  --bg-primary: #0a0b12;
  --bg-secondary: #0f1119;
  --bg-card: rgba(10, 12, 20, 0.94);
  --text-primary: #e0e0e0;
  --text-secondary: #8a8a8a;
  --accent-purple: #8367c7ff;
  --accent-blue: #5603adff;
  --accent-green: #b3e9c7ff;
  --border-color: #2a2a2a;
  --gradient-border: linear-gradient(90deg, #5603adff, #8367c7ff, #b3e9c7ff);
}

/* Header */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #374151;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (min-width: 640px) {
  .top-bar {
    padding: 0.75rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .top-bar {
    padding: 0.75rem 2rem;
  }
}

@media (min-width: 1280px) {
  .top-bar {
    padding: 1rem 3rem;
  }
}

.top-bar h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #a855f7;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .top-bar h1 {
    font-size: 1.5rem;
  }
}

.nav-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #9ca3af;
  background: transparent;
  border-radius: 9999px;
  border: 1px solid #374151;
  transition: all 0.2s ease;
  cursor: pointer;
}

@media (min-width: 640px) {
  .nav-btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }
}

.nav-btn.active,
.nav-btn:hover {
  color: #a855f7;
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.1);
}

/* Main Container */
.main-container {
  min-height: 100vh;
  padding-top: 4rem; /* Space for fixed header */
}

/* Songs Grid */
.songs-index {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .songs-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    padding: 2rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .songs-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    padding: 3rem 2rem;
  }
}

@media (min-width: 1280px) {
  .songs-index {
    padding: 3rem 3rem;
  }
}

/* Song Cards */
.song-preview {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(134, 239, 172, 0.05));
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

@media (min-width: 640px) {
  .song-preview {
    border-radius: 1rem;
    padding: 2rem;
    min-height: 320px;
  }
}

.song-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.25rem;
  background: linear-gradient(90deg, #5603adff, #8367c7ff, #b3e9c7ff);
}

.song-preview:hover {
  transform: scale(1.05);
  box-shadow: 0 25px 50px -12px rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.5);
}

.song-preview h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #a855f7;
  margin-bottom: 1rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

@media (min-width: 640px) {
  .song-preview h2 {
    font-size: 1.5rem;
  }
}

.song-preview h2 a {
  color: #a855f7;
  text-decoration: none;
  transition: color 0.2s ease;
}

.song-preview h2 a:hover {
  color: #c084fc;
  text-decoration: underline;
}

.song-excerpt {
  color: #9ca3af;
  font-style: italic;
  line-height: 1.625;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .song-excerpt {
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .song-excerpt {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

.read-more {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #60a5fa;
  border: 2px solid #60a5fa;
  border-radius: 9999px;
  transition: all 0.2s ease;
  align-self: flex-start;
  text-decoration: none;
}

@media (min-width: 640px) {
  .read-more {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

.read-more:hover {
  background: #60a5fa;
  color: white;
  transform: translateY(-0.25rem);
}

/* Song Content Pages */
.song-content {
  max-width: 896px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), rgba(134, 239, 172, 0.02));
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

@media (min-width: 640px) {
  .song-content {
    padding: 2rem;
  }
}

@media (min-width: 1024px) {
  .song-content {
    padding: 3rem;
  }
}

.song-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.25rem;
  background: linear-gradient(90deg, #5603adff, #8367c7ff, #b3e9c7ff, #d9f99d);
}

.song-content h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #a855f7;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 4px solid #a855f7;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .song-content h1 {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .song-content h1 {
    font-size: 3rem;
  }
}

.song-content p {
  color: #d1d5db;
  line-height: 1.625;
  margin-bottom: 1rem;
  font-size: 1rem;
  white-space: pre-wrap;
}

@media (min-width: 640px) {
  .song-content p {
    font-size: 1.125rem;
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem 2rem;
  color: #6b7280;
  font-size: 0.875rem;
  border-top: 1px solid #374151;
  margin-top: auto;
}

@media (min-width: 640px) {
  .footer {
    padding: 2rem;
  }
}

/* Responsive Utilities */
@media (max-width: 640px) {
  .songs-index {
    gap: 1rem;
  }
  
  .song-preview {
    min-height: 240px;
  }
}

/* Loading States */
.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  background: #1f2937;
  border-radius: 0.5rem;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* Focus States */
button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #a855f7, 0 0 0 4px rgba(168, 85, 247, 0.2);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Better spacing for mobile */
@media (max-width: 640px) {
  .main-container {
    padding-top: 3.5rem;
  }
  
  .songs-index {
    padding: 1rem 0.75rem;
  }
}
