
html, body {
  margin: 0;
  padding: 0;
  background: transparent;
  overflow:hidden;
  display: inline-block;
}

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --winamp-bg: #232323;
  --winamp-primary: #00FF00;
  --winamp-secondary: #00CC00;
  --winamp-text: #C7C7C7;
  --winamp-title: #C7C7C7;
  --winamp-border: #353535;
}

.miniamp {
  background: var(--winamp-bg);
  color: var(--winamp-text);
  padding: 4px;
  width: 275px;
  font-family: "MS Sans Serif", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 2px solid var(--winamp-border);
  box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.title-bar {
  background: #000;
  padding: 3px 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border-top: 1px solid #4A4A4A;
  border-left: 1px solid #4A4A4A;
  border-right: 1px solid #1A1A1A;
  border-bottom: 1px solid #1A1A1A;
  height: 18px;
}

.title-bar-text {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  color: #FF0000;
  letter-spacing: 0.1em;
  text-shadow:
    0 0 2px #FF0000,
    0 0 6px #FF0000,
    0 0 12px #FF0000;
  animation: scrollInfinite 20s linear infinite, flicker 1.5s step-end infinite;
  padding-right: 100px;
  position: absolute;
  left: 0;
  white-space: nowrap;
  line-height: 18px;
  margin: 0;
  padding-top: 1px;
  box-sizing: border-box;
}

@keyframes scrollInfinite {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.8; }
}

/* Container row for dropdown + dice button */
.playlist-row {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* Reduce dropdown width to make room for a square dice button */
.playlist-dropdown {
  width: 100%;
  background: #2A2A2A;
  color: var(--winamp-text);
  border: 1px solid #1A1A1A;
  padding: 2px;
  display: none;
  font-size: 11px;
}

/* Small square dice button to the right of dropdown */
.dice-btn {
  width: 24px;
  height: 26px;
  min-width: 24px;
  background: linear-gradient(180deg, #595959 0%, #3A3A3A 100%);
  border: 1px solid #1A1A1A;
  color: var(--winamp-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  user-select: none;
  box-shadow: inset 0 1px rgba(255,255,255,0.02);
}

/* Active (shuffled) state will glow green a bit */
.dice-btn.active {
  background: linear-gradient(180deg, #004400 0%, #003300 100%);
  color: var(--winamp-primary);
  text-shadow: 0 0 6px rgba(0,255,0,0.6);
}

/* Hover/focus states */
.dice-btn:hover {
  background: linear-gradient(180deg, #6A6A6A 0%, #4A4A4A 100%);
}

.controls-container {
  display: flex;
  gap: 2px;
  align-items: center;
  background: #3A3A3A;
  padding: 3px;
  border-radius: 2px;
}

.control-btn {
  background: linear-gradient(180deg, #595959 0%, #3A3A3A 100%);
  border: 1px solid #1A1A1A;
  color: var(--winamp-text);
  cursor: pointer;
  transition: all 0.1s;
  flex: 1;
  min-width: 23px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  text-shadow: 1px 1px 1px #000;
}

.control-btn:active {
  background: linear-gradient(180deg, #3A3A3A 0%, #2A2A2A 100%);
  transform: translateY(1px);
}

.control-btn:hover {
  background: linear-gradient(180deg, #6A6A6A 0%, #4A4A4A 100%);
}

.playlist-dropdown option {
  background: #2A2A2A;
  padding: 2px;
}

.playlist-dropdown option:hover {
  background: #3A3A3A;
}

.add-song-form {
  width: 100%;
  display: none;
  padding: 4px;
  background: #2A2A2A;
  border: 1px solid #1A1A1A;
}

.add-song-form input {
  width: calc(100% - 6px);
  padding: 2px;
  margin-bottom: 3px;
  background: #1A1A1A;
  border: 1px solid #4A4A4A;
  color: var(--winamp-text);
  font-size: 11px;
}

.add-song-form input:focus {
  outline: 1px solid var(--winamp-primary);
}

.playlist-dropdown::-webkit-scrollbar {
  width: 6px;
}

.playlist-dropdown::-webkit-scrollbar-track {
  background: #1A1A1A;
}

.playlist-dropdown::-webkit-scrollbar-thumb {
  background: #4A4A4A;
}

.playlist-dropdown::-webkit-scrollbar-thumb:hover {
  background: #5A5A5A;
}

.warning-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--winamp-bg);
  border: 2px solid var(--winamp-border);
  padding: 12px;
  z-index: 1000;
  display: none;
  min-width: 250px;
  box-shadow: 4px 4px 8px rgba(0,0,0,0.7);
}

.warning-dialog h3 {
  margin: 0 0 8px 0;
  color: var(--winamp-primary);
  font-size: 12px;
}

.warning-dialog p {
  margin: 0 0 12px 0;
  font-size: 11px;
  line-height: 1.3;
}

.warning-dialog-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.warning-dialog-buttons {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.warning-dialog input[type="checkbox"] {
  margin-right: 4px;
}

.warning-dialog label {
  font-size: 10px;
  cursor: pointer;
}

.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
}