/* Global Styles for DJ Website */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --theme-color: #00f0ff;
  --theme-bg: rgba(0,20,60,0.95);
  --theme-bg-light: rgba(0,20,60,0.9);
  --theme-glow: rgba(0,240,255,0.4);
  --theme-glow-color: rgba(0,240,255,1);
}

body {
  font-family: 'Arial', sans-serif;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.background-img {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  display: block;
}

.page-title {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  text-align: center;
  z-index: 10;
  white-space: nowrap;
  width: 100%;
}

.page-title.offline-title {
  top: 3%;
  font-size: clamp(1.5rem, 4vw, 3rem);
  animation: offlinePulse 3s ease-in-out infinite alternate;
}

@keyframes offlinePulse {
  0% {
    opacity: 0.7;
    transform: scale(1);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8), 0 0 10px rgba(255,68,68,0.3);
  }
  100% {
    opacity: 1;
    transform: scale(1.05);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8), 0 0 20px rgba(255,68,68,0.6), 0 0 30px rgba(255,68,68,0.3);
  }
}

.offline-text {
  color: #ff3333;
  animation: shadowFlash 2s ease-in-out infinite;
}

@keyframes shadowFlash {
  0%, 100% {
    text-shadow: 0 0 10px rgba(255,0,0,0.3), 0 0 20px rgba(255,0,0,0.2);
  }
  50% {
    text-shadow: 0 0 40px rgba(255,0,0,0.9), 0 0 80px rgba(255,0,0,0.6), 0 0 100px rgba(255,0,0,0.4);
  }
}

@media (max-width: 768px) {
  .page-title {
    font-size: clamp(1.5rem,8vw,3rem);
  }
  .page-title.offline-title {
    font-size: clamp(1rem,6vw,2rem);
  }
}

.offline-word {
  color: #ff4444;
  text-shadow: 0 0 20px #ff4444, 2px 2px 4px rgba(0,0,0,0.8);
  font-size: 1.2em;
}

.overlay-img {
  position: absolute;
  width: auto;
  height: 25vh;
  max-height: 200px;
  z-index: 20;
  opacity: 0.9;
}

nav {
  display: none;
}

nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

nav a {
  display: block;
  padding: 12px 20px;
  background: rgba(0,0,0,0.7);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

nav a:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .background-img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  body {
    background: #0a0a1a;
  }
  nav {
    display: none;
  }
  nav ul {
    flex-direction: row;
    gap: 5px;
  }
  nav a {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

/* Specific overlay positions */
.ginger-overlay {
  bottom: 50px;
  left: 20px;
  animation: gingerPulse 2s ease-in-out infinite;
}

@keyframes gingerPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px var(--theme-glow));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 25px var(--theme-color));
  }
}

.hubby-overlay {
  right: 0;
  top: 50%;
  height: 60vh;
  max-height: 500px;
  width: auto;
  animation: hubbyPulse 2s ease-in-out infinite;
}

@keyframes hubbyPulse {
  0%, 100% {
    transform: translateY(-50%) scale(1);
    filter: drop-shadow(0 0 10px var(--theme-glow));
  }
  50% {
    transform: translateY(-50%) scale(1.05);
    filter: drop-shadow(0 0 25px var(--theme-color));
  }
}

@media (max-width: 768px) {
  .hubby-overlay {
    left: 50%;
    right: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    height: auto;
    max-height: 40vh;
    animation: hubbyPulseMobile 2s ease-in-out infinite;
  }

  @keyframes hubbyPulseMobile {
    0%, 100% {
      transform: translate(-50%, -50%) scale(1);
      filter: drop-shadow(0 0 10px var(--theme-glow));
    }
    50% {
      transform: translate(-50%, -50%) scale(1.05);
      filter: drop-shadow(0 0 25px var(--theme-color));
    }
  }
}

@media (max-width: 768px) {
  .ginger-overlay {
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    animation: overlayPulseMobile 2s ease-in-out infinite;
  }

  @keyframes overlayPulseMobile {
    0%, 100% {
      transform: translateX(-50%) scale(1);
      filter: drop-shadow(0 0 10px var(--theme-glow));
    }
    50% {
      transform: translateX(-50%) scale(1.1);
      filter: drop-shadow(0 0 25px var(--theme-color));
    }
  }
  
  input.song-request-box {
    margin-left: 7.5%;
    right: auto;
    bottom: 20px;
    width: auto;
    transform: none;
  }
}

/* Audio Player Styles */
.audio-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  max-width: 90vw;
  background: rgba(0,20,60,0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,240,255,0.4), 0 0 40px rgba(0,240,255,0.2);
  border: 2px solid rgba(0,240,255,0.6);
  z-index: 1000;
  font-family: 'Arial', sans-serif;
  color: white;
}

.audio-player h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: #00f0ff;
  text-align: center;
  text-shadow: 0 0 10px #00f0ff, 0 0 20px rgba(0,240,255,0.5);
}

.player-status {
  text-align: center;
  margin-bottom: 15px;
  padding: 8px;
  border-radius: 10px;
  font-weight: bold;
}

.status-live { background: rgba(0,255,0,0.2); color: white; }
.status-down { background: rgba(255,0,0,0.2); color: #ff4444; }

.track-info {
  margin-bottom: 15px;
  font-size: 0.9rem;
  text-align: center;
  min-height: 40px;
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 15px;
  gap: 10px;
}

.btn {
  background: linear-gradient(45deg, #00f0ff, #4a90ff);
  border: 2px solid rgba(0,240,255,0.6);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  font-size: 1.2rem;
  color: #001122;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,240,255,0.4), 0 0 20px rgba(0,240,255,0.2);
  animation: neonPulse 2s infinite alternate;
}

@keyframes neonPulse {
  from { box-shadow: 0 4px 15px rgba(0,240,255,0.4), 0 0 20px rgba(0,240,255,0.2); }
  to { box-shadow: 0 4px 15px rgba(0,240,255,0.6), 0 0 30px rgba(0,240,255,0.4); }
}

.btn:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 8px 25px rgba(0,240,255,0.7), 0 0 40px rgba(0,240,255,0.5);
  animation-duration: 0.5s;
}

.btn:active {
  transform: scale(0.95) rotate(-5deg);
}

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

.volume-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(0,240,255,0.2);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(45deg, #00f0ff, #4a90ff);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0,240,255,0.6);
}

.volume-tooltip {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,20,60,0.95);
  color: #00f0ff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: bold;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  box-shadow: 0 4px 15px rgba(0,240,255,0.3);
  border: 1px solid rgba(0,240,255,0.5);
  z-index: 50;
}

.volume-tooltip.show {
  opacity: 1;
  visibility: visible;
}

.cover-art-container {
  margin-bottom: 10px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(45deg, rgba(0,240,255,0.1), rgba(74,144,255,0.1));
  border: 1px solid rgba(0,240,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

#coverArt {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.cover-placeholder {
  font-size: 0.8rem;
  color: #00f0ff;
  text-align: center;
  padding: 10px;
}

.listeners-display {
  text-align: center;
  margin-bottom: 10px;
  padding: 6px;
  border-radius: 8px;
  font-weight: bold;
  background: rgba(0,240,255,0.1);
  border: 1px solid rgba(0,240,255,0.3);
}

audio {
  display: none;
}

#title-input {
  width: 100%;
}

#title-color-input {
  width: 50px !important;
  height: 40px !important;
  border: 2px solid rgba(0,240,255,0.6);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,240,255,0.4);
  transition: all 0.3s ease;
}

#title-color-input:hover {
  box-shadow: 0 6px 20px rgba(0,240,255,0.6);
  transform: scale(1.05);
}

#title-input::placeholder {
  color: rgba(255,255,255,0.7);
}

input.song-request-box {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1500;
  width: 280px;
  padding: 14px 18px;
  border-radius: 25px;
  border: 2px solid var(--theme-color);
  background: var(--theme-bg);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 1rem;
  font-family: 'Arial', sans-serif;
  outline: none;
  box-shadow: 0 8px 32px var(--theme-color-alpha, rgba(0,240,255,0.3));
  transition: all 0.3s ease;
}

input.song-request-box::placeholder {
  color: rgba(255,255,255,0.5);
}

input.song-request-box:focus {
  border-color: var(--theme-color);
  box-shadow: 0 0 20px var(--theme-color-alpha, rgba(0,240,255,0.5)), 0 0 40px var(--theme-color-alpha, rgba(0,240,255,0.25));
}

/* Admin Panel Styles */
#admin-panel {
  font-family: 'Arial', sans-serif;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  background: var(--theme-bg);
  border: 2px solid var(--theme-color);
  backdrop-filter: blur(20px);
}

#admin-panel::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.admin-panel-inner {
  padding: 20px;
}

.admin-panel-inner h3 {
  color: #00f0ff;
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 0 0 10px #00f0ff;
  font-size: 1.3rem;
}

.admin-section {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0,20,60,0.7);
  border-radius: 12px;
  border: 1px solid var(--theme-color);
}

.admin-section.title-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-section.title-section > div {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-section label {
  display: block;
  margin-bottom: 8px;
  color: #00f0ff;
  font-weight: bold;
}

.admin-section input {
  width: 100%;
  padding: 12px;
  border: 2px solid rgba(0,240,255,0.6);
  border-radius: 8px;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 1rem;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.admin-section input::placeholder {
  color: rgba(255,255,255,0.6);
}

.admin-section button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 5px;
  font-family: 'Arial', sans-serif;
  font-size: 1rem;
}

#update-title-btn, #update-wallpaper-url-btn {
  background: linear-gradient(45deg, #00f0ff, #4a90ff);
  color: #001122;
  box-shadow: 0 4px 15px rgba(0,240,255,0.4);
}

#update-title-btn:hover, #update-wallpaper-url-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,240,255,0.6);
}

#reset-title-btn, #reset-wallpaper-btn, #clear-requests-btn {
  background: linear-gradient(45deg, #ff4444, #ff6666);
  color: white;
  box-shadow: 0 4px 15px rgba(255,68,68,0.4);
}

#reset-title-btn:hover, #reset-wallpaper-btn:hover, #clear-requests-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,68,68,0.6);
}

#close-panel {
  width: 100%;
  padding: 12px;
  background: rgba(100,100,100,0.8);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

#close-panel:hover {
  background: rgba(200,0,0,0.8);
  transform: translateY(-1px);
}

.request-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(0,20,60,0.7);
  border-radius: 8px;
  border-left: 3px solid #00f0ff;
  font-size: 0.95rem;
  overflow-x: hidden;
  flex-wrap: wrap;
  word-wrap: break-word;
}

.request-item .delete-req {
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.request-item .delete-req:hover {
  background: #ff6666;
  transform: scale(1.1);
}

#requests-list {
  max-height: 200px;
  overflow-y: hidden;
}

/* Song Cover Styles for Stream Panel */
#song-cover {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0,240,255,0.4), 0 0 20px rgba(0,240,255,0.2);
  transition: all 0.4s ease;
  background: linear-gradient(45deg, rgba(0,240,255,0.1), rgba(74,144,255,0.1));
  border: 2px solid rgba(0,240,255,0.3);
}

#song-cover:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0,240,255,0.6), 0 0 30px rgba(0,240,255,0.4);
}

#song-cover.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid rgba(0,240,255,0.2);
  border-top: 4px solid #00f0ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

#song-cover.fallback {
  background: linear-gradient(45deg, #e94560, #ff6b6b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
}
