/* === YouList Premium Styles === */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px;
  background: #0f172a;
  color: #f1f5f9;
  font-family: 'Source Sans Pro', sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Main Box */
.box {
  background: #1e293b;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  width: 100%;
  max-width: 700px;
}

@media (min-width: 1024px) {
  .box {
    width: 86%;
  }
}

/* Playlist Sidebar */
.playlist {
  background: #1e293b;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  width: 280px;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #f59e0b transparent;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.playlist::-webkit-scrollbar {
  width: 1px;
}

.playlist::-webkit-scrollbar-thumb {
  background: #f59e0b;
  border-radius: 2px;
}

.playlist, .playlist * {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  -ms-touch-action: pan-y;
}

/* Form Elements */
input, button {
  padding: 10px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  font-family: 'Source Sans Pro', sans-serif;
}

input {
  flex: 0.05;
}

button {
  background: #06b6d4;
  color: #fff;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.3s, transform 0.2s;
}

button:hover {
  background: #0891b2;
  transform: translateY(-2px);
}

/* YouTube Player */
iframe {
  margin-top: 20px;
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 12px;
}

/* Playlist Items */
.playlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #334155;
  padding: 6px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 13px;
  gap: 8px;
}

.playlist-item span {
  flex: 1;
  cursor: pointer;
  text-decoration: none;
  padding-right: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-item button {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  margin-left: 6px;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  background: #06b6d4;
  color: #fff;
  cursor: pointer;
  border: none;
}

.playlist-item button:hover {
  background: #0891b2;
  transform: translateY(-1px);
}

/* Playlist Controls */
.playlist-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
}

.playlist-controls button {
  width: 100%;
  margin-left: 0;
  border-radius: 6px;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease forwards;
}

.modal-content {
  background: #1e293b;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  transform: scale(0.8);
  animation: scaleIn 0.3s ease forwards;
}

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  width: 100%;
}

.modal-buttons > button {
  background: #06b6d4;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  width: 100%;
  text-align: center;
  transition: background 0.3s, transform 0.12s;
}

.modal-buttons > button:hover {
  background: #0891b2;
  transform: translateY(-2px);
}

.modal-content > .close-btn {
  margin-top: 10px;
  background: #ef4444 !important;
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  border: none;
  transition: background 0.3s, transform 0.12s;
}

.modal-content > .close-btn:hover {
  background: #dc2626 !important;
  transform: translateY(-2px);
}

#confirmModal .modal-buttons button:first-child {
  background: #06b6d4;
}

#confirmModal .modal-buttons button:first-child:hover {
  background: #0891b2;
}

#confirmModal .modal-buttons .close-btn {
  background: #ef4444;
}

#confirmModal .modal-buttons .close-btn:hover {
  background: #dc2626;
}

/* Extensions Button */
.extensions-btn {
  background: #f59e0b;
  color: #fff;
  transition: background 0.3s, transform 0.2s;
}

.extensions-btn:hover {
  background: #d97706;
  transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.8); }
  to { transform: scale(1); }
}

/* Footer */
.copy {
  color: #455E87;
  font-size: 13px;
}

/* Dark Mode Button */
#darkModeBtnWrapper {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin-bottom: 15px;
}

#darkModeBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 17px;
  color: #f1f5f9;
  transition: transform 0.2s ease, color 0.2s;
}

#darkModeBtn:hover {
  transform: scale(1.05);
  color: #facc15;
}

/* Dark Overlay (OLED Mode) */
#darkOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000000;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #FBD697;
  font-family: 'Source Sans Pro', sans-serif;
  animation: fadeIn 0.5s ease;
}

#lamp {
  font-size: 32px;
  color: #FBD697;
  cursor: pointer;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

#lamp:hover {
  transform: scale(1.1);
}

#darkOverlay span {
  cursor: pointer;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Small Messages */
#msgPix {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #00FFFF;
  color: #111;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
}

/* PWA Install Button - CORREÇÃO: OCULTO POR PADRÃO */
.btn-install-pwa {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #fff;
  width: 100%;
  margin-left: 0;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: none; /* ALTERADO: Era display: flex, agora é none */
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-install-pwa:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
}

.btn-install-pwa:active {
  transform: translateY(0);
}

/* Donation Box */
.donation-box {
  margin-top: 20px;
  text-align: center;
  background: #1e293b;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Responsive */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  
  .box, .playlist {
    width: 100%;
    max-width: 100%;
  }
  
  iframe {
    height: 250px;
  }
}

@media (max-width: 420px) {
  .playlist-item button {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    font-size: 12px;
  }
}