* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #050505;
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* FUNDO */

body::before {

  content: '';

  position: fixed;

  inset: 0;

  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.05), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255,255,255,0.03), transparent 30%);

  z-index: -2;
}

/* CONTAINER */

.container {

  width: 100%;

  max-width: 950px;

  margin: auto;

  padding: 40px 20px;
}

/* LOGO */

.logo {

  text-align: center;

  margin-bottom: 40px;
}

.logo h1 {

  font-size: 3.2rem;

  color: #ffffff;

  letter-spacing: 4px;

  text-transform: uppercase;

  text-shadow:
    0 0 5px rgba(255,255,255,0.30),
    0 0 12px rgba(255,255,255,0.15),
    0 0 24px rgba(255,255,255,0.08);

  animation: ghostGlow 3s ease-in-out infinite;
}

.logo p {

  color: #9d9d9d;

  margin-top: 10px;

  font-size: 15px;

  letter-spacing: 1px;
}

@keyframes ghostGlow {

  0% {

    text-shadow:
      0 0 5px rgba(255,255,255,0.25),
      0 0 12px rgba(255,255,255,0.10),
      0 0 24px rgba(255,255,255,0.05);
  }

  50% {

    text-shadow:
      0 0 8px rgba(255,255,255,0.45),
      0 0 18px rgba(255,255,255,0.20),
      0 0 36px rgba(255,255,255,0.10);
  }

  100% {

    text-shadow:
      0 0 5px rgba(255,255,255,0.25),
      0 0 12px rgba(255,255,255,0.10),
      0 0 24px rgba(255,255,255,0.05);
  }
}

/* SEARCH */

.search-box {

  display: flex;

  gap: 12px;

  margin-bottom: 25px;
}

.search-box input {

  flex: 1;

  padding: 17px;

  border-radius: 16px;

  border: 1px solid rgba(255,255,255,0.08);

  background: rgba(255,255,255,0.04);

  color: white;

  font-size: 16px;

  outline: none;

  backdrop-filter: blur(10px);

  transition: 0.25s ease;
}

.search-box input:focus {

  border-color: rgba(255,255,255,0.18);

  box-shadow:
    0 0 20px rgba(255,255,255,0.06);
}

.search-box input::placeholder {

  color: #7e7e7e;
}

.search-box button {

  padding: 16px 24px;

  border: 1px solid rgba(255,255,255,0.08);

  border-radius: 16px;

  background:
    linear-gradient(180deg, #ffffff, #cfcfcf);

  color: #050505;

  font-weight: 700;

  cursor: pointer;

  transition: 0.25s ease;
}

.search-box button:hover {

  transform:
    translateY(-2px)
    scale(1.02);

  box-shadow:
    0 0 25px rgba(255,255,255,0.15),
    0 0 40px rgba(255,255,255,0.08);
}

/* PLAYER */

.player {

  display: none;

  gap: 18px;

  align-items: center;

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,0.06),
      rgba(255,255,255,0.03)
    );

  border: 1px solid rgba(255,255,255,0.08);

  border-radius: 24px;

  padding: 18px;

  margin-bottom: 25px;

  backdrop-filter: blur(14px);

  box-shadow:
    0 0 25px rgba(255,255,255,0.03);
}

.player img {

  width: 140px;

  height: 140px;

  object-fit: cover;

  border-radius: 20px;

  flex-shrink: 0;
}

.player-info {

  flex: 1;

  min-width: 0;
}

.player-info h3 {

  margin-bottom: 14px;

  font-size: 20px;

  color: white;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;
}

.player-controls {

  display: flex;

  align-items: center;

  gap: 14px;
}

#pauseBtn {

  width: 55px;

  height: 55px;

  border-radius: 16px;

  border: none;

  background:
    linear-gradient(180deg, #ffffff, #d6d6d6);

  color: #050505;

  font-size: 18px;

  cursor: pointer;

  transition: 0.25s ease;
}

#pauseBtn:hover {

  transform: scale(1.05);
}

.progress-area {

  flex: 1;
}

#playerProgress {

  width: 100%;

  cursor: pointer;

  accent-color: white;
}

.time {

  display: flex;

  justify-content: space-between;

  margin-top: 6px;

  font-size: 13px;

  color: #9d9d9d;
}

/* LOADING */

.loading {

  display: none;

  text-align: center;

  margin-bottom: 25px;

  color: #bdbdbd;

  animation: pulse 1s infinite;

  letter-spacing: 1px;
}

@keyframes pulse {

  0% {
    opacity: 0.35;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.35;
  }
}

/* RESULTS */

.results {

  display: flex;

  flex-direction: column;

  gap: 18px;
}

.card {

  display: flex;

  gap: 18px;

  background: rgba(255,255,255,0.04);

  border: 1px solid rgba(255,255,255,0.06);

  padding: 16px;

  border-radius: 24px;

  backdrop-filter: blur(12px);

  align-items: center;

  transition: 0.25s ease;
}

.card:hover {

  transform: translateY(-4px);

  border-color: rgba(255,255,255,0.12);

  box-shadow:
    0 0 30px rgba(255,255,255,0.04),
    0 0 60px rgba(255,255,255,0.02);
}

.card img {

  width: 220px;

  height: 125px;

  object-fit: cover;

  border-radius: 18px;

  flex-shrink: 0;
}

.card-info {

  flex: 1;
}

.card-info h3 {

  font-size: 19px;

  margin-bottom: 10px;

  line-height: 1.3;

  color: #ffffff;
}

.card-info p {

  color: #b5b5b5;

  font-size: 14px;

  margin-bottom: 6px;
}

/* BUTTONS */

.buttons {

  display: flex;

  gap: 10px;

  margin-top: 15px;

  flex-wrap: wrap;
}

.play-btn,
.download-btn,
.playlist-btn,
.playlist-play,
.playlist-download,
.playlist-remove {

  border: none;

  padding: 13px 20px;

  border-radius: 14px;

  font-weight: 700;

  cursor: pointer;

  transition: 0.25s ease;
}

.play-btn,
.download-btn,
.playlist-btn,
.playlist-play,
.playlist-download {

  background:
    linear-gradient(180deg, #ffffff, #d6d6d6);

  color: #050505;
}

.playlist-remove {

  background: #1b1b1b;

  color: white;

  border: 1px solid rgba(255,255,255,0.08);
}

.play-btn:hover,
.download-btn:hover,
.playlist-btn:hover,
.playlist-play:hover,
.playlist-download:hover,
.playlist-remove:hover {

  transform:
    translateY(-2px)
    scale(1.03);

  box-shadow:
    0 0 25px rgba(255,255,255,0.18),
    0 0 45px rgba(255,255,255,0.08);
}

/* PLAYLIST BUTTON ANIMATION */

.playlist-btn.added {

  animation:
    playlistPop 0.45s ease;

  pointer-events: none;
}

@keyframes playlistPop {

  0% {

    transform:
      scale(1);
  }

  30% {

    transform:
      scale(1.12)
      translateY(-3px);

    box-shadow:
      0 0 25px rgba(255,255,255,0.25);
  }

  60% {

    transform:
      scale(0.96);
  }

  100% {

    transform:
      scale(1);
  }
}

/* TOGGLE */

.playlist-toggle {

  position: fixed;

  top: 20px;

  left: 20px;

  width: 55px;

  height: 55px;

  border-radius: 18px;

  border: 1px solid rgba(255,255,255,0.08);

  background:
    rgba(15,15,15,0.95);

  color: white;

  font-size: 24px;

  cursor: pointer;

  z-index: 9999;

  backdrop-filter: blur(12px);

  transition: 0.25s ease;
}

.playlist-toggle:hover {

  transform: scale(1.05);

  border-color:
    rgba(255,255,255,0.16);
}

/* SIDEBAR */

.playlist-sidebar {

  position: fixed;

  top: 0;

  left: -420px;

  width: 380px;

  height: 100vh;

  background:
    rgba(8,8,8,0.96);

  backdrop-filter: blur(20px);

  border-right:
    1px solid rgba(255,255,255,0.08);

  padding: 90px 18px 20px;

  z-index: 999;

  transition: 0.35s ease;

  overflow-y: auto;
}

.playlist-sidebar.active {

  left: 0;
}

/* PLAYLIST */

.playlist-container {

  background:
    rgba(255,255,255,0.03);

  border:
    1px solid rgba(255,255,255,0.06);

  border-radius: 24px;

  padding: 18px;
}

.playlist-header {

  display: flex;

  flex-direction: column;

  gap: 12px;

  margin-bottom: 15px;
}

.playlist-header h2 {

  font-size: 22px;
}

#downloadPlaylist {

  padding: 14px;

  border-radius: 16px;

  border: none;

  background:
    linear-gradient(180deg, #ffffff, #d6d6d6);

  color: #050505;

  font-weight: 700;

  cursor: pointer;

  transition: 0.25s ease;
}

#downloadPlaylist:hover {

  transform: translateY(-2px);
}

.playlist {

  display: flex;

  flex-direction: column;

  gap: 14px;
}

.playlist-item {

  display: flex;

  gap: 12px;

  background:
    rgba(255,255,255,0.03);

  border:
    1px solid rgba(255,255,255,0.06);

  border-radius: 18px;

  padding: 12px;

  transition: 0.25s ease;
}

.playlist-item:hover {

  transform: translateY(-2px);

  border-color:
    rgba(255,255,255,0.12);
}

.playlist-item img {

  width: 90px;

  height: 70px;

  object-fit: cover;

  border-radius: 12px;

  flex-shrink: 0;
}

.playlist-info {

  flex: 1;

  min-width: 0;
}

.playlist-info h4 {

  font-size: 14px;

  margin-bottom: 4px;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;
}

.playlist-info p {

  font-size: 12px;

  color: #9d9d9d;
}

.playlist-actions {

  display: flex;

  flex-direction: column;

  gap: 8px;
}

.playlist-empty {

  text-align: center;

  color: #8d8d8d;

  padding: 10px;
}

/* MOBILE */

@media(max-width: 700px) {

  .search-box {

    flex-direction: column;
  }

  .card {

    flex-direction: column;

    align-items: flex-start;
  }

  .card img {

    width: 100%;

    height: auto;
  }

  .buttons {

    width: 100%;

    flex-direction: column;
  }

  .play-btn,
  .download-btn,
  .playlist-btn {

    width: 100%;
  }

  .logo h1 {

    font-size: 2.5rem;
  }

  .player {

    flex-direction: column;

    align-items: flex-start;
  }

  .player img {

    width: 100%;

    height: auto;
  }

  .playlist-sidebar {

    width: 100%;

    left: -100%;
  }

  .playlist-item {

    flex-direction: column;
  }

  .playlist-item img {

    width: 100%;

    height: auto;
  }

  .playlist-actions {

    width: 100%;
  }

  .playlist-play,
  .playlist-download,
  .playlist-remove {

    width: 100%;
  }
}

/* LOADING PLAYLIST */

.playlist-btn.loading-add {

  opacity: 0.7;

  animation:
    pulseAdd 0.8s infinite;
}

@keyframes pulseAdd {

  0% {

    transform: scale(1);
  }

  50% {

    transform: scale(1.05);
  }

  100% {

    transform: scale(1);
  }
}


/* ADD SUCCESS */

.playlist-btn.added {

  animation:
    addedSuccess 0.6s ease;
}

@keyframes addedSuccess {

  0% {

    transform:
      scale(1);
  }

  30% {

    transform:
      scale(1.18)
      translateY(-3px);

    box-shadow:
      0 0 30px rgba(255,255,255,0.25);
  }

  60% {

    transform:
      scale(0.92);
  }

  100% {

    transform:
      scale(1);
  }
}

/* LOADING PLAYLIST */

.playlist-btn.loading-add {

  opacity: 0.7;

  animation:
    pulseAdd 0.8s infinite;
}

@keyframes pulseAdd {

  0% {

    transform: scale(1);
  }

  50% {

    transform: scale(1.05);
  }

  100% {

    transform: scale(1);
  }
}


/* ADD SUCCESS */

.playlist-btn.added {

  animation:
    addedSuccess 0.6s ease;
}

@keyframes addedSuccess {

  0% {

    transform:
      scale(1);
  }

  30% {

    transform:
      scale(1.18)
      translateY(-3px);

    box-shadow:
      0 0 30px rgba(255,255,255,0.25);
  }

  60% {

    transform:
      scale(0.92);
  }

  100% {

    transform:
      scale(1);
  }
}

/* TIKTOK */

.tiktok-card {

  flex-direction: column;

  overflow: hidden;

}

.tiktok-preview {

  width: 100%;

  max-height: 650px;

  border-radius: 18px;

  object-fit: contain;

  background: #000;

}

.tiktok-card .card-info {

  width: 100%;

  padding-top: 10px;

}

.tiktok-card h3 {

  margin-bottom: 10px;

  line-height: 1.4;

}

.tiktok-card p {

  margin-bottom: 8px;

}

@media(max-width:700px){

  .tiktok-preview {

    max-height: 75vh;

  }

}

/* ABAS */

.tabs {

  display: flex;

  gap: 12px;

  margin-bottom: 25px;

}

.tab-btn {

  flex: 1;

  padding: 16px;

  border-radius: 18px;

  border: 1px solid rgba(255,255,255,0.08);

  background: rgba(255,255,255,0.04);

  color: #bdbdbd;

  font-size: 15px;

  font-weight: 600;

  cursor: pointer;

  backdrop-filter: blur(12px);

  transition: all .25s ease;

}

.tab-btn:hover {

  transform:
    translateY(-2px);

  border-color:
    rgba(255,255,255,0.15);

  color: white;

  box-shadow:
    0 0 20px rgba(255,255,255,0.05);

}

.tab-btn.active {

  background:
    linear-gradient(
      180deg,
      #ffffff,
      #d8d8d8
    );

  color: #050505;

  border-color:
    transparent;

  box-shadow:
    0 0 25px rgba(255,255,255,0.15),
    0 0 40px rgba(255,255,255,0.05);

}

.tab-content {

  animation:
    fadeTab .25s ease;

}

@keyframes fadeTab {

  from {

    opacity: 0;

    transform:
      translateY(10px);

  }

  to {

    opacity: 1;

    transform:
      translateY(0);

  }

}

@media(max-width:700px){

  .tabs {

    flex-direction: column;

  }

}