:root {
  --bg-base: #07080c;
  --bg-surface: #0e1118;
  --bg-surface-elevated: #161b26;
  --bg-card: rgba(18, 22, 33, 0.7);
  --bg-card-hover: rgba(28, 34, 51, 0.85);
  --bg-glass: rgba(14, 17, 24, 0.82);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --border-active: rgba(255, 87, 34, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  --accent-suno: #ff5722;
  --accent-suno-hover: #ff7043;
  --accent-pink: #ec4899;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;

  --gradient-suno: linear-gradient(135deg, #ff5722 0%, #ec4899 50%, #8b5cf6 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(255, 87, 34, 0.18), transparent 70%);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(255, 87, 34, 0.35);

  --player-height: 86px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  padding-bottom: calc(var(--player-height) + 32px);
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Glow */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 20%;
  right: 20%;
  height: 480px;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gradient-suno);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Hero Section */
.hero {
  padding: 44px 0 32px 0;
}

.hero-card {
  background: linear-gradient(145deg, rgba(22, 27, 40, 0.85) 0%, rgba(14, 17, 24, 0.95) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: var(--gradient-suno);
  opacity: 0.12;
  filter: blur(50px);
  border-radius: 50%;
  pointer-events: none;
}

.hero-text {
  max-width: 680px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-suno);
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

.hero-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-suno);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 87, 34, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.5);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

.hero-stats {
  display: flex;
  gap: 20px;
}

.stat-item {
  text-align: center;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-width: 100px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Toolbar & Filters */
.toolbar {
  margin: 12px 0 28px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 440px;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: var(--accent-suno);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.15);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-toggle {
  display: flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.view-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.view-btn svg {
  width: 16px;
  height: 16px;
}

/* Category Filter Pills */
.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.pill:hover {
  border-color: var(--border-hover);
  color: #fff;
}

.pill.active {
  background: rgba(255, 87, 34, 0.15);
  border-color: var(--accent-suno);
  color: var(--accent-suno);
  font-weight: 600;
}

/* Songs Grid */
.songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}

.song-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.song-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.song-card.is-active {
  border-color: var(--accent-suno);
  box-shadow: 0 0 20px rgba(255, 87, 34, 0.25);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #181d29;
  margin-bottom: 14px;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.song-card:hover .card-img {
  transform: scale(1.05);
}

.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
}

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

.play-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-suno);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(255, 87, 34, 0.5);
  transform: scale(0.9);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.song-card:hover .play-circle {
  transform: scale(1);
}

.play-circle svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  margin-left: 2px;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  transition: color 0.15s ease;
}

.card-title:hover {
  color: var(--accent-suno);
}

.card-tags {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 500;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-hook {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.card-action-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.card-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.card-action-btn svg {
  width: 14px;
  height: 14px;
}

/* Tracklist / Table View */
.tracklist-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track-row {
  display: grid;
  grid-template-columns: 40px 52px 1fr 180px 80px 100px;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.15s;
}

.track-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.track-row.is-active {
  border-color: var(--accent-suno);
  background: rgba(255, 87, 34, 0.08);
}

.track-idx {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
}

.track-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #181d29;
}

.track-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

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

.track-tags {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-duration {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: right;
}

.track-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* Sticky Bottom Music Player */
.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-height);
  background: rgba(10, 12, 18, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  z-index: 50;
  display: flex;
  align-items: center;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
}

.player-content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 320px 1fr 280px;
  align-items: center;
  gap: 20px;
}

/* Player Left: Now Playing */
.player-track {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.player-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #181d29;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.player-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.player-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.player-artist {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Player Center: Controls & Scrubber */
.player-controls-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.player-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 6px;
  border-radius: 50%;
}

.ctrl-btn:hover {
  color: #fff;
  transform: scale(1.08);
}

.ctrl-btn.active {
  color: var(--accent-suno);
}

.ctrl-play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctrl-play-btn:hover {
  transform: scale(1.08);
  background: #fff;
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.4);
}

.ctrl-play-btn svg {
  width: 18px;
  height: 18px;
  fill: #000;
}

.player-scrubber-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.time-stamp {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 36px;
  font-variant-numeric: tabular-nums;
}

.time-stamp.right {
  text-align: right;
}

.progress-bar-wrap {
  flex: 1;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.progress-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  position: relative;
  transition: height 0.15s;
}

.progress-bar-wrap:hover .progress-bar-bg {
  height: 6px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-suno);
  border-radius: var(--radius-full);
  width: 0%;
  position: relative;
}

.progress-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s;
}

.progress-bar-wrap:hover .progress-thumb {
  transform: translateY(-50%) scale(1);
}

/* Player Right: Volume & Options */
.player-extra {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

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

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

/* Lyrics Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.lyrics-modal {
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.open .lyrics-modal {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-header-info h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.modal-header-info p {
  font-size: 0.8rem;
  color: var(--accent-suno);
  margin-top: 2px;
}

.close-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.close-btn:hover {
  color: #fff;
  border-color: var(--border-hover);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #e2e8f0;
  white-space: pre-wrap;
  font-family: inherit;
}

.lyrics-verse-tag {
  color: var(--accent-suno);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 14px;
  display: block;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .player-content {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .player-extra {
    display: none;
  }
  .hero-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-stats {
    width: 100%;
    justify-content: flex-start;
  }
  .track-row {
    grid-template-columns: 32px 44px 1fr 70px 40px;
  }
  .track-tags {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .songs-grid {
    grid-template-columns: 1fr;
  }
  .player-track {
    max-width: 140px;
  }
  .player-title {
    font-size: 0.85rem;
  }
  .player-artist {
    font-size: 0.7rem;
  }
}
