* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: fixed;
  background-color: #000000;
  font-family: "SF Mono", "Courier New", Courier, Monaco, Menlo, monospace;
  color: #ffffff;
}

#visualizer-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}

/* Retro Start Overlay */
#play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.9);
  transition: opacity 0.3s steps(4), visibility 0.3s steps(4);
}

#play-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#play-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  background-color: #000000;
  color: #ffffff;
  border: 3px solid #ffffff;
  border-radius: 0;
  box-shadow: 6px 6px 0px #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

#play-button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0px #ffffff;
  background-color: #111111;
}

#play-button:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0px #ffffff;
}

.play-icon {
  font-size: 18px;
}

/* Retro Now Playing Widget */
#now-playing-container {
  position: absolute;
  bottom: 28px;
  left: 28px;
  z-index: 20;
  width: auto;
  max-width: 480px;
  min-width: 340px;
  background-color: #000000 !important;
  border: 3px solid #ffffff;
  border-radius: 0 !important;
  box-shadow: 6px 6px 0px #ffffff;
  padding: 12px 14px;
  transition: opacity 0.2s steps(2), transform 0.2s steps(2);
}

.now-playing-hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* Retro Box Header */
.retro-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ffffff;
}

.rec-dot {
  font-size: 10px;
  color: #00ff66;
  animation: blink 1.2s infinite steps(1);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.header-tag {
  white-space: nowrap;
}

.header-line {
  flex: 1;
  height: 1px;
  background: #ffffff;
  opacity: 0.5;
}

/* Main Content: Art + Details */
.retro-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Square Art Frame */
.art-frame {
  flex-shrink: 0;
  width: 74px;
  height: 74px;
  border: 2px solid #ffffff;
  border-radius: 0 !important;
  background-color: #000000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#track-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

/* Track Fields */
.track-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.track-field {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.field-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: #888888;
  font-weight: 700;
}

.field-value {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.title-value {
  color: #ffffff;
  font-size: 15px;
}

.artist-value {
  color: #cccccc;
  font-size: 13px;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 480px) {
  #now-playing-container {
    bottom: 16px;
    left: 16px;
    right: 16px;
    min-width: 0;
    max-width: none;
    box-shadow: 4px 4px 0px #ffffff;
  }
  .art-frame {
    width: 60px;
    height: 60px;
  }
  .title-value {
    font-size: 13px;
  }
  .artist-value {
    font-size: 11px;
  }
}
