/* ========================================
   Winamp Player Styles
   Classic 2000s Winamp Aesthetic
   ======================================== */

/* ===== MAIN WINAMP PLAYER CONTAINER ===== */
.winamp-yt-player {
  /* Position controlled by inline styles to avoid conflicts */
  z-index: 10000 !important;
  width: 340px;
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 50%, #0a0a0a 100%);
  border: 2px solid #ffe600;
  border-radius: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 4px 16px rgba(255, 230, 0, 0.2), 0 0 40px rgba(0,0,0,0.4), inset 0 0 20px rgba(0, 0, 0, 0.8);
  font-family: 'Share Tech Mono', 'Consolas', monospace;
  color: #ffe600;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  user-select: none;
  /* Classic Winamp styling */
  border-top: 3px solid #ffe600;
  border-bottom: 3px solid #ffe600;
  border-left: 2px solid #ffe600;
  border-right: 2px solid #ffe600;
  /* Force visibility - WINAMP IS THE CORE! */
  visibility: visible !important;
  opacity: 1 !important;
  /* Ensure it's always on top */
  position: fixed !important;
  bottom: 10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

/* ===== RETRO CORNER DECORATIONS ===== */
.winamp-yt-player::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 8px;
  height: 8px;
  background: #ffe600;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  z-index: 1;
}

.winamp-yt-player::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #ffe600;
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  z-index: 1;
}

/* ===== WINAMP TITLE BAR ===== */
.winamp-yt-titlebar {
  background: linear-gradient(90deg, #333 0%, #222 50%, #111 100%);
  padding: 8px 12px 6px 12px;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #ffe600;
  border-bottom: 2px solid #ffe600;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 230, 0, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ===== WINAMP CONTROLS SECTION ===== */
.winamp-yt-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 8px 16px;
  justify-content: center;
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
  border-bottom: 1px solid #333;
  min-height: 40px;
}

/* ===== WINAMP LCD DISPLAY ===== */
.winamp-yt-lcd {
  background: linear-gradient(180deg, #0a0a0a 0%, #181c18 50%, #0a0a0a 100%);
  color: #aaff66;
  font-family: 'Share Tech Mono', 'Consolas', 'monospace';
  font-size: 16px;
  border: 2px solid #333;
  border-top: 1px solid #555;
  border-bottom: 1px solid #111;
  margin: 8px 12px;
  padding: 8px 12px;
  text-align: center;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
  text-shadow: 0 0 8px rgba(170, 255, 102, 0.6);
  letter-spacing: 0.04em;
  border-radius: 4px;
}

.winamp-yt-lcd-timer {
  display: block;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
  color: #aaff66;
}

.winamp-yt-lcd-title {
  display: block;
  font-size: 14px;
  color: #88ff44;
  white-space: nowrap;
  overflow: hidden;
  animation: winamp-title-scroll 12s linear infinite;
  text-shadow: 0 0 6px #88ff44, 0 0 2px #fff;
}

@keyframes winamp-title-scroll {
  0% { transform: translateX(0); }
  10% { transform: translateX(0); }
  90% { transform: translateX(-40%); }
  100% { transform: translateX(0); }
}

/* ===== EXTERNAL PLAY BUTTON ===== */
.winamp-external-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px auto 0 auto;
  padding: 10px 20px;
  background: linear-gradient(180deg, #ffe600 0%, #ffcc00 50%, #ffaa00 100%);
  border: 2px solid #333;
  border-top: 2px solid #555;
  border-bottom: 2px solid #111;
  border-radius: 0;
  color: #000;
  font-weight: bold;
  font-size: 14px;
  font-family: 'Share Tech Mono', monospace;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.winamp-external-play:hover {
  background: linear-gradient(180deg, #ffcc00 0%, #ffe600 50%, #ffaa00 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border-color: #555;
}

.winamp-external-play:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===== STATUS INDICATOR ===== */
.winamp-status-indicator {
  text-align: center;
  margin: 8px auto;
  color: #00ff88;
  font-size: 12px;
  font-family: 'Share Tech Mono', monospace;
}

/* ===== HIDDEN SOUNDCLOUD IFRAME ===== */
.winamp-yt-iframe-wrap {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 320px;
  height: 120px;
  background: #111;
  border-radius: 6px;
  overflow: hidden;
  margin: 8px auto 0 auto;
  box-shadow: 0 2px 8px #000a;
  border: 1.5px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== SPECTRUM VISUALIZER ===== */
.winamp-yt-spectrum {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
  margin: 8px 12px 12px 12px;
  padding: 8px 16px;
  background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
  border: 1px solid #333;
  border-top: 1px solid #555;
  border-bottom: 1px solid #111;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.6);
}

.winamp-yt-bar {
  width: 8px;
  background: linear-gradient(180deg, #ffe600 0%, #ffb300 50%, #ff8800 100%);
  border-radius: 0;
  box-shadow: 0 0 8px rgba(255, 230, 0, 0.4), inset 0 0 4px rgba(255, 255, 255, 0.2);
  animation: winamp-bar 1.2s infinite;
  animation-timing-function: cubic-bezier(.4,0,.2,1);
  border: 1px solid #333;
  border-top: 1px solid #555;
  border-bottom: 1px solid #111;
}

/* Different delays and heights for retro effect */
.winamp-yt-bar:nth-child(1) { height: 18px; animation-delay: 0s; }
.winamp-yt-bar:nth-child(2) { height: 24px; animation-delay: 0.2s; }
.winamp-yt-bar:nth-child(3) { height: 14px; animation-delay: 0.4s; }
.winamp-yt-bar:nth-child(4) { height: 26px; animation-delay: 0.1s; }
.winamp-yt-bar:nth-child(5) { height: 20px; animation-delay: 0.3s; }
.winamp-yt-bar:nth-child(6) { height: 16px; animation-delay: 0.5s; }
.winamp-yt-bar:nth-child(7) { height: 22px; animation-delay: 0.15s; }

@keyframes winamp-bar {
  0%   { transform: scaleY(1); }
  20%  { transform: scaleY(1.5); }
  40%  { transform: scaleY(0.7); }
  60%  { transform: scaleY(1.3); }
  80%  { transform: scaleY(0.9); }
  100% { transform: scaleY(1); }
}

/* ===== STATUS BAR ===== */
.winamp-status-bar {
  background: linear-gradient(90deg, #111 0%, #222 50%, #111 100%);
  border-top: 1px solid #333;
  padding: 4px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #ccc;
  font-family: 'Share Tech Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.status-text {
  color: #ffe600;
  text-shadow: 0 0 4px rgba(255, 230, 0, 0.4);
}

.status-time {
  color: #aaff66;
  text-shadow: 0 0 4px rgba(170, 255, 102, 0.4);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  /* Keep Winamp player visible on mobile but adjust size */
  .winamp-yt-player {
    width: 90vw !important;
    max-width: 340px !important;
    bottom: 10px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .winamp-yt-iframe-wrap {
    width: 90vw !important;
    max-width: 320px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

@media (max-width: 600px) {
  .winamp-yt-player { 
    left: 50%; 
    transform: translateX(-50%); 
    bottom: 8px; 
    width: 98vw; 
    max-width: 340px; 
  }
  
  .winamp-yt-iframe-wrap { 
    width: 98vw; 
    max-width: 320px; 
  }
}

/* ===== LCD GLOW ANIMATION ===== */
@keyframes lcd-glow {
  0% { 
    text-shadow: 0 0 5px #88ff44, 0 0 10px #88ff44, 0 0 15px #88ff44;
    color: #88ff44;
  }
  50% { 
    text-shadow: 0 0 10px #88ff44, 0 0 20px #88ff44, 0 0 30px #88ff44;
    color: #aaff66;
  }
  100% { 
    text-shadow: 0 0 5px #88ff44, 0 0 10px #88ff44, 0 0 15px #88ff44;
    color: #88ff44;
  }
}

/* ===== COSMIC WINAMP - THE LEGENDARY TOUCH ===== */
.cosmic-winamp {
	animation: cosmic-winamp-enter 1s ease-out !important;
	position: relative !important;
	overflow: hidden !important;
}

.cosmic-winamp::before {
	content: '';
	position: absolute;
	top: -2px;
	left: -2px;
	right: -2px;
	bottom: -2px;
	background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff0080, #8000ff);
	background-size: 400% 400%;
	border-radius: 12px;
	z-index: -1;
	animation: cosmic-border-glow 3s ease-in-out infinite;
	opacity: 0.7;
}

.cosmic-winamp::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
	pointer-events: none;
	animation: cosmic-inner-glow 4s ease-in-out infinite;
}

.cosmic-winamp .winamp-yt-titlebar {
	background: linear-gradient(90deg, #1a1a1a, #2a2a2a, #1a1a1a) !important;
	animation: cosmic-titlebar-shine 2s ease-in-out infinite !important;
}

.cosmic-winamp .winamp-yt-titlebar span {
	animation: cosmic-note-bounce 1.5s ease-in-out infinite !important;
}

.cosmic-winamp .play-button {
	background: linear-gradient(135deg, #00ff88, #00d4ff) !important;
	border: 2px solid rgba(255, 255, 255, 0.3) !important;
	animation: cosmic-button-pulse 2s ease-in-out infinite !important;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.cosmic-winamp .play-button:hover {
	transform: scale(1.1) rotate(5deg) !important;
	box-shadow: 0 0 30px rgba(0, 255, 136, 0.6), 0 0 60px rgba(0, 212, 255, 0.4) !important;
	background: linear-gradient(135deg, #00d4ff, #00ff88) !important;
}

.cosmic-winamp .stop-button {
	background: linear-gradient(135deg, #ff4444, #ff0066) !important;
	border: 2px solid rgba(255, 255, 255, 0.3) !important;
	animation: cosmic-button-pulse 2s ease-in-out infinite 0.5s !important;
}

.cosmic-winamp .stop-button:hover {
	transform: scale(1.1) rotate(-5deg) !important;
	box-shadow: 0 0 30px rgba(255, 68, 68, 0.6), 0 0 60px rgba(255, 0, 102, 0.4) !important;
}

.cosmic-winamp .lcd-display {
	background: linear-gradient(135deg, #0a0a0a, #1a1a1a) !important;
	border: 2px solid rgba(0, 255, 136, 0.5) !important;
	box-shadow: 
		inset 0 0 10px rgba(0, 255, 136, 0.2),
		0 0 20px rgba(0, 255, 136, 0.1) !important;
	animation: cosmic-lcd-glow 3s ease-in-out infinite !important;
}

.cosmic-winamp .spectrum-display {
	background: linear-gradient(180deg, rgba(0, 255, 136, 0.1), rgba(0, 212, 255, 0.1)) !important;
	border: 1px solid rgba(0, 255, 136, 0.3) !important;
	animation: cosmic-spectrum-pulse 2s ease-in-out infinite !important;
}

.cosmic-winamp .spectrum-bar {
	background: linear-gradient(180deg, #00ff88, #00d4ff) !important;
	box-shadow: 0 0 10px rgba(0, 255, 136, 0.5) !important;
	animation: cosmic-bar-dance 0.8s ease-in-out infinite !important;
}

.cosmic-winamp .spectrum-bar:nth-child(odd) {
	animation-delay: 0.1s !important;
}

.cosmic-winamp .spectrum-bar:nth-child(even) {
	animation-delay: 0.2s !important;
}

.cosmic-winamp .spectrum-bar:nth-child(3n) {
	animation-delay: 0.3s !important;
}

.cosmic-winamp .spectrum-bar:nth-child(4n) {
	animation-delay: 0.4s !important;
}

.cosmic-winamp .spectrum-bar:nth-child(5n) {
	animation-delay: 0.5s !important;
}

/* ===== COSMIC WINAMP ANIMATIONS ===== */
@keyframes cosmic-winamp-enter {
	0% {
		opacity: 0;
		transform: translateY(50px) scale(0.8);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes cosmic-border-glow {
	0%, 100% {
		background-position: 0% 50%;
		opacity: 0.7;
	}
	50% {
		background-position: 100% 50%;
		opacity: 1;
	}
}

@keyframes cosmic-inner-glow {
	0%, 100% {
		opacity: 0.3;
		transform: scale(1);
	}
	50% {
		opacity: 0.6;
		transform: scale(1.05);
	}
}

@keyframes cosmic-titlebar-shine {
	0%, 100% {
		background: linear-gradient(90deg, #1a1a1a, #2a2a2a, #1a1a1a);
	}
	50% {
		background: linear-gradient(90deg, #2a2a2a, #3a3a3a, #2a2a2a);
	}
}

@keyframes cosmic-note-bounce {
	0%, 100% {
		transform: translateY(0) rotate(0deg);
	}
	50% {
		transform: translateY(-3px) rotate(10deg);
	}
}

@keyframes cosmic-button-pulse {
	0%, 100% {
		transform: scale(1);
		box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
	}
	50% {
		transform: scale(1.05);
		box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
	}
}

@keyframes cosmic-lcd-glow {
	0%, 100% {
		box-shadow: 
			inset 0 0 10px rgba(0, 255, 136, 0.2),
			0 0 20px rgba(0, 255, 136, 0.1);
	}
	50% {
		box-shadow: 
			inset 0 0 15px rgba(0, 255, 136, 0.3),
			0 0 30px rgba(0, 255, 136, 0.2);
	}
}

@keyframes cosmic-spectrum-pulse {
	0%, 100% {
		background: linear-gradient(180deg, rgba(0, 255, 136, 0.1), rgba(0, 212, 255, 0.1));
	}
	50% {
		background: linear-gradient(180deg, rgba(0, 255, 136, 0.2), rgba(0, 212, 255, 0.2));
	}
}

@keyframes cosmic-bar-dance {
	0%, 100% {
		transform: scaleY(1);
		opacity: 0.8;
	}
	50% {
		transform: scaleY(1.2);
		opacity: 1;
	}
}

/* ===== COSMIC WINAMP RESPONSIVE ===== */
@media (max-width: 768px) {
	.cosmic-winamp {
		/* NEVER HIDE WINAMP - IT'S THE CORE! */
		display: flex !important;
		width: 90vw !important;
		max-width: 340px !important;
		bottom: 10px !important;
		left: 50% !important;
		transform: translateX(-50%) !important;
	}
}
