:root {
  --bg-color: #0f0f13;
  --panel-bg: rgba(30, 30, 35, 0.6);
  --text-primary: #ffffff;
  --text-secondary: #a0a0a5;
  --accent: #ff2a5f;
  --accent-hover: #ff4d79;
  --glass-border: rgba(255, 255, 255, 0.08);
  --font-family: 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Background ambient glow */
.glass-bg {
  position: relative;
  width: 100%;
  max-width: 480px; /* Mobile app width */
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% -20%, rgba(255, 42, 95, 0.15) 0%, var(--bg-color) 60%);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 20px;
  z-index: 10;
}

h1 {
  font-size: 24px;
  font-weight: 600;
  background: linear-gradient(90deg, #fff, #ff2a5f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-import {
  background: var(--panel-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-import:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

main {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px;
  padding-bottom: 240px; /* extra space for player */
  scrollbar-width: none;
}
main::-webkit-scrollbar {
  display: none;
}

.playlist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.playlist li {
  background: var(--panel-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.playlist li:hover, .playlist li.active {
  background: rgba(255, 42, 95, 0.1);
  border-color: rgba(255, 42, 95, 0.3);
  transform: scale(1.02);
}

.playlist li.active {
  border-color: var(--accent);
}

.playlist li.empty-state {
  justify-content: center;
  text-align: center;
  color: var(--text-secondary);
  background: transparent;
  border: 1px dashed var(--glass-border);
  padding: 40px 20px;
  pointer-events: none;
  line-height: 1.5;
}

.track-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.track-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}

.track-details h3 {
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-details p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Player fixed at bottom */
.player {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 24px 20px 32px 20px;
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
  background: rgba(20, 20, 25, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 20;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.track-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.artwork {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff2a5f, #ff7e5f);
  box-shadow: 0 8px 16px rgba(255, 42, 95, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.artwork::after {
  content: '🎵';
  font-size: 24px;
}

.info-text {
  flex: 1;
  overflow: hidden;
}

.info-text h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-text p {
  font-size: 14px;
  color: var(--text-secondary);
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.progress-bar-wrapper {
  position: relative;
  flex: 1;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  position: absolute;
  pointer-events: none;
}

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

input[type=range] {
  width: 100%;
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 24px;
  z-index: 10;
}

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

.control-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  color: var(--accent);
  transform: scale(1.1);
}

.play-btn {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(255, 42, 95, 0.4);
  color: white;
}
.play-btn:hover {
  background: var(--accent-hover);
  color: white;
  transform: scale(1.05);
}

@media (min-width: 481px) {
  .glass-bg {
    height: 90vh;
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    border: 1px solid var(--glass-border);
  }
}
