.audio-player {
  background: var(--bg-1);
  border: 1px solid var(--green);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
  font-family: Fantasque, VT323, ui-monospace, monospace;
}

.loading-state, .error-state {
  text-align: center;
  padding: 2rem;
  color: var(--green-2);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-1);
  border-top: 3px solid var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.loading-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 1rem;
}

.loading-fill {
  height: 100%;
  background: var(--green);
  transition: width 0.3s ease;
}

.error-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #ff6b6b;
}

.metadata {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.track-info {
  flex: 1;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--green);
}

.format-badge {
  background: var(--green);
  color: var(--bg-0);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.track-counter {
  background: var(--bg-2);
  color: var(--green-2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  border: 1px solid var(--green-2);
}

.artist {
  color: var(--green-2);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.album, .year {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.tech-info {
  color: #666;
  font-size: 0.8rem;
  font-family: Fantasque, monospace;
  margin-top: 0.5rem;
  padding: 0.3rem 0.5rem;
  background: var(--bg-1);
  border-radius: 4px;
  border: 1px solid #333;
}

.artwork {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--green);
  position: relative;
}

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

.artwork-glow {
  display: none;
}

.artwork-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  border: 1px dashed var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-1);
}

.artwork-placeholder :global(svg) {
  opacity: 0.7;
  color: var(--green-2);
}

.controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.control-btn, .playlist-btn {
  background: none;
  border: 1px solid var(--green);
  border-radius: 4px;
  padding: 0.5rem;
  color: var(--green);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover, .playlist-btn:hover {
  background: var(--green);
  color: var(--bg-0);
}

.control-btn:disabled, .playlist-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.control-btn:disabled:hover, .playlist-btn:disabled:hover {
  background: none;
  color: var(--green);
}

.play-btn {
  background: var(--green);
  color: var(--bg-0);
  border: none;
  border-radius: 4px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.play-btn:hover {
  background: var(--green-2);
}

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

.btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.time-control {
  flex: 1;
  text-align: center;
}

.time-display {
  color: var(--green-2);
  font-family: Fantasque, monospace;
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.current-time {
  color: var(--green);
  font-weight: bold;
}

.separator {
  color: #666;
  margin: 0 0.3rem;
}

.total-time {
  color: var(--green-2);
}

.time-remaining {
  font-size: 0.8rem;
  color: #888;
  font-family: Fantasque, monospace;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.volume-btn {
  background: none;
  border: 1px solid var(--green);
  border-radius: 4px;
  padding: 0.3rem 0.5rem;
  color: var(--green);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
}

.volume-btn:hover {
  background: var(--green);
  color: var(--bg-0);
}

.volume-slider-container {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: center;
}

.volume-slider {
  width: 80px;
  height: 6px;
  background: var(--bg-1);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  border: 1px solid var(--green);
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--green);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--green);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.volume-percentage {
  font-size: 0.7rem;
  color: #666;
  font-family: Fantasque, monospace;
}

.progress-container {
  cursor: pointer;
  outline: none;
  position: relative;
  z-index: 1;
}

.progress-container:focus {
  box-shadow: 0 0 0 2px var(--green);
  border-radius: 4px;
}

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

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-1);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--green);
  transition: all 0.2s ease;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-2));
  transition: width 0.1s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.playlist {
  margin-top: 1rem;
  border-top: 1px solid var(--green);
  padding-top: 1rem;
}

.playlist-header {
  color: var(--green);
  font-weight: bold;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.playlist-items {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--green);
  border-radius: 4px;
  background: var(--bg-2);
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0, 255, 0, 0.1);
}

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

.playlist-item:hover, .playlist-item:focus {
  background: var(--bg-1);
  outline: none;
}

.playlist-item:focus {
  box-shadow: inset 0 0 0 1px var(--green);
}

.playlist-item.active {
  background: rgba(0, 255, 0, 0.1);
  border-left: 3px solid var(--green);
}

.track-number {
  width: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--green-2);
  font-family: Fantasque, monospace;
}

.track-details {
  flex: 1;
}

.track-title {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: bold;
}

.track-artist {
  color: var(--green-2);
  font-size: 0.8rem;
}

.track-duration {
  color: #888;
  font-size: 0.8rem;
  font-family: Fantasque, monospace;
}
