/*#mpp-app svg -> creoq ue no ussé*/
#mpp-app svg {
      width: 24px;
      height: 24px;
      display: inline-block;
      vertical-align: middle;
}

@font-face {
      font-family: "Mikodacs";
      src: url("fonts/Mikodacs.otf") format("truetype");
      font-weight: normal;
      font-style: normal;
}

*,
*::before,
*::after {
      padding: 0;
      margin: 0;
      box-sizing: border-box;
}

html {
      font-family: "Poppins", sans-serif;
      font-size: 16px;
      color: #ededf8;
}

#bg-video {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      z-index: -2;
}

body::after {
      content: "";
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 27, 0.6);
      z-index: -1;
}

a {
      text-decoration: none;
      color: inherit;
}

button,
input {
      font-family: sans-serif;
      font-size: 1rem;
      color: inherit;
      border: none;
      outline: none;
      background-color: transparent;
}

button {
      user-select: none;
      cursor: pointer;
}

.bi {
      width: 1.2rem;
      height: auto;
      pointer-events: none;
}

/* ============ TOPBAR - RESPONSIVO ============ */
.topbar {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 10;
      width: 100%;
      padding: 15px 20px;
      background-color: rgba(0, 0, 27, 0.95);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar__row {
      width: 100%;
      display: flex;
      align-items: center;
      margin-bottom: 12px;
      flex-wrap: wrap;
      gap: 10px;
}

.topbar__row:last-child {
      margin-bottom: 0;
}

.topbar__row--search {
      /*justify-content: center;*/
}

.topbar__logo-section {
      display: flex;
      align-items: center;
      gap: 10px;
      flex: 1;
      min-width: 150px;
}

.topbar__logo {
      width: 4rem;
      height: auto;
}

.topbar__title {
      font-size: 1rem;
      font-weight: 600;
}

/* ============ PLAYLIST - RESPONSIVO ============ */
.playlist {
      position: relative;
}

.playlist__toggle {
      padding: 8px 16px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.1);
      border: 2px solid rgba(255, 255, 255, 0.2);
      color: white;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: all 0.2s;
      font-size: 0.85rem;
      font-weight: 500;
}

.playlist__toggle:hover {
      background: rgba(255, 255, 255, 0.15);
      border-color: #00ffcc;
      color: white;
}

.playlist__toggle svg {
      width: 16px;
      height: 16px;
}

.playlist__toggle span:not(.playlist__count) {
      display: none;
}

.playlist__count {
      background: #00ffcc;
      color: #000;
      font-size: 0.7rem;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 12px;
      min-width: 22px;
      text-align: center;
}

.playlist__dropdown {
      position: fixed;
      top: 70px;
      right: 10px;
      width: calc(100vw - 20px);
      max-width: 400px;
      max-height: 60vh;
      background: rgba(5, 10, 25, 0.98);
      backdrop-filter: blur(20px);
      border-radius: 12px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.1);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-10px);
      transition: all 0.3s ease;
      overflow: hidden;
      z-index: 1000;
}

.playlist__dropdown.show {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
}

.playlist__header {
      padding: 12px 15px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: rgba(0, 255, 204, 0.05);
}

.playlist__header h3 {
      font-size: 0.9rem;
      font-weight: 600;
      color: #00ffcc;
      margin: 0;
}

.playlist__clear {
      font-size: 0.75rem;
      padding: 5px 12px;
      border-radius: 6px;
      background: rgba(255, 50, 50, 0.2);
      color: #ff6b6b;
      border: none;
      cursor: pointer;
      transition: all 0.2s;
}

.playlist__clear:hover {
      background: rgba(255, 50, 50, 0.3);
}

.playlist__list {
      max-height: 50vh;
      overflow-y: auto;
      padding: 8px;
}

.playlist__list::-webkit-scrollbar {
      width: 4px;
}

.playlist__list::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.3);
      border-radius: 10px;
}

.playlist__empty {
      padding: 40px 15px;
      text-align: center;
      color: rgba(255, 255, 255, 0.4);
      font-size: 0.85rem;
}

.playlist__item {
      padding: 10px;
      margin-bottom: 6px;
      background: rgba(255, 255, 255, 0.05);
      border-radius: 8px;
      border-left: 3px solid transparent;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      justify-content: space-between;
      align-items: center;
}

.playlist__item:hover {
      background: rgba(255, 255, 255, 0.1);
      border-left-color: #00ffcc;
}

.playlist__item.active {
      background: rgba(0, 255, 204, 0.15);
      border-left-color: #00ffcc;
}

.playlist__item-info {
      flex: 1;
      min-width: 0;
}

.playlist__item-title {
      font-size: 0.85rem;
      font-weight: 500;
      margin-bottom: 3px;
      color: white;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
}

.playlist__item-artist {
      font-size: 0.75rem;
      color: rgba(255, 255, 255, 0.6);
}

.playlist__item-remove {
      background: rgba(255, 50, 50, 0.2);
      border: none;
      color: #ff6b6b;
      width: 26px;
      height: 26px;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
      font-size: 1.1rem;
      flex-shrink: 0;
      margin-left: 8px;
}

.playlist__item-remove:hover {
      background: rgba(255, 50, 50, 0.4);
}

/* ============ SEARCH - RESPONSIVO Y SIN MOVIMIENTO ============ */
.search {
      position: relative;
      display: flex;
      width: 100%;
      max-width: 700px;


}

.search__input-container {
      position: relative;
      width: 100%;
}

.search__icon {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: rgba(255, 255, 255, 0.5);
      pointer-events: none;
      width: 18px;
      height: 18px;
}

input[type="text"] {
      padding: 12px 15px 12px 42px !important;
      font-size: 1.0rem !important;
      background-color: rgba(255, 255, 255, 0.12) !important;
}


.search__input {
      width: 90%;
      border: 2px solid rgba(255, 255, 255, 0.15);
      border-radius: 12px;
      color: white;

      outline: none;
      transition: all 0.3s;

}

.search__input:focus {
      background: rgba(255, 255, 255, 0.12);
      border-color: #00ffcc;
      box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.15);
}

.search__input::placeholder {
      color: rgba(255, 255, 255, 0.4);
}

/* FIX: Resultados con position fixed para no mover nada */
.search__results {
      position: absolute;
      top: calc(100% + 8px);
      left: 50%;
      transform: translateX(-50%);
      width: calc(100% - 40px);
      max-width: 700px;
      max-height: 60vh;
      background: rgba(5, 10, 25, 0.98);
      backdrop-filter: blur(20px);
      border-radius: 12px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.1);
      overflow-y: auto;
      z-index: 999;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search__results.show {
      opacity: 1;
      visibility: visible;
      display: flex
}

.search__results::-webkit-scrollbar {
      width: 4px;
}

.search__results::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.3);
      border-radius: 10px;
}

.search__no-results {
      padding: 30px 15px;
      text-align: center;
      color: rgba(255, 255, 255, 0.4);
      font-size: 0.85rem;
}

.search__item {
      padding: 12px 15px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      transition: all 0.2s;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
      gap: 10px;
}

.search__item:hover {
      background: rgba(255, 255, 255, 0.08);
}

.search__item:last-child {
      border-bottom: none;
}

.search__item-info {
      flex: 1;
      min-width: 0;
}

.search__item-title {
      font-size: 1.0rem;
      font-weight: 500;
      margin-bottom: 4px;
      color: white;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
}

.search__item-artist {
      font-size: 0.8rem;
      color: rgba(255, 255, 255, 0.6);
}


.search__item-add,
.search__item-play {
      background: rgba(0, 255, 204, 0.2);
      border: none;
      color: #00ffcc;
      width: 36px;
      height: 36px;
      border-radius: 8px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.3rem;
      font-weight: 700;
      transition: all 0.2s;
      flex-shrink: 0;
      padding: 0;
}

.search__item-add:hover,
.search__item-play:hover {
      background: rgba(0, 255, 204, 0.3);
      transform: scale(1.1);
      color: #00ffcc;
}

/* ============ PLAYER - RESPONSIVO ============ */
.player {
      position: fixed;
      bottom: 0;
      left: 0;
      z-index: 2;
      width: 100%;
      padding: 12px 15px;
      display: flex;
      align-items: center;
      background-color: rgba(0, 0, 27, 0.95);
      backdrop-filter: blur(4px);
      gap: 8px;
      flex-wrap: wrap;
}

.player__button {
      padding: 0;
      line-height: 0;
      width: 45px;
      height: 45px;
      border-radius: 10px;
      border: 0.5px solid #7f7cff;
      background-color: rgba(255, 255, 255, 0.1);
      flex-shrink: 0;

}

.player__button[data-play="true"] .bi:nth-child(1) {
      display: none;

}

.player__button[data-play="true"] .bi:nth-child(2) {
      display: inline-block;
      fill: #00FFAA;
}

.player__button[data-play="false"] .bi:nth-child(1) {
      display: inline-block;
      /*fill: white;*/
}

.player__button[data-play="false"] .bi:nth-child(2) {
      display: none;
}


.player__button:hover {
      background: rgba(255, 255, 255, 0.25);
      transform: scale(1.05);
      border: 2px solid #7f7cff;
}

#\$player_play_button {
      outline: none;
      color: white;
}


#player_stop_button {
      outline: none;
}

#player_stop_button .bi {
      fill: white;
}

#player_next_button {
      outline: none;
}

#player_next_button .bi {
      fill: white;
}

.player__progress {
      flex: 1;
      min-width: 200px;
      margin: 0 10px;
}

.player__slider {
      width: 100%;
      height: 2px;
      margin-bottom: 15px;
      border: none;
      box-shadow: unset;
      background-color: rgba(255, 255, 255, 0.1);
}

.player__slider .noUi-connect {
      background-color: #0277ef;
}

.player__slider .noUi-handle {
      width: 10px;
      height: 10px;
      right: -5px;
      top: -4px;
      border: none;
      border-radius: 50%;
      box-shadow: unset;
      background-color: #0277ef;
}

.player__slider .noUi-handle::before,
.player__slider .noUi-handle::after {
      display: none;
}

.player__time {
      font-size: 0.6rem;
      line-height: 0;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
}

.player__info {
      display: flex;
      flex-direction: column;
      min-width: 150px;
      flex: 1;
}

.player__song-title {
      font-size: 0.8rem;
      font-weight: 600;
      color: white;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
}

.player__song-artist {
      font-size: 0.7rem;
      color: rgba(255, 255, 255, 0.6);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
}

.menu {
      position: absolute;
      bottom: 0;
      right: 0;
      z-index: 3;
      width: 220px;
      height: fit-content;
      padding: 8px 0;
      border-radius: 15px;
      background-color: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(8px);
      pointer-events: none;
      opacity: 0;
      transition: 0.2s;
}

.menu.show {
      pointer-events: unset;
      opacity: 1;
}

.menu__item {
      width: 100%;
      padding: 8px 15px;
      display: flex;
      align-items: center;
      justify-content: space-between;
}

.menu__input {
      width: 90px;
      padding: 10px;
      font-size: 0.75rem;
      font-weight: 500;
      text-align: center;
      border-radius: 8px;
      background-color: rgba(255, 255, 255, 0.1);
}

/* ============ LYRICS - RESPONSIVO ============ */
.lyric {
      position: fixed;
      z-index: 1;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 90%;
      max-width: 1000px;
      display: flex;
      flex-direction: column;
      gap: 20px;
      align-items: center;
}

.lyric__container {
      position: relative;
      width: 100%;
      text-align: center;
}

.lyric__line {
      font-family: 'Mikodacs', 'Cooper Black', 'Concert One', sans-serif;
      text-align: center;
      font-size: 2.2rem;
      line-height: 1.3;
      font-weight: 500;
      opacity: 0.7;
      color: white;
      transition: opacity 0.3s ease, color 0.3s ease, transform 0.3s ease;
      min-height: 70px;
      display: flex;
      align-items: center;
      justify-content: center;
}

.lyric__line.active {
      opacity: 1;
      font-size: 2.5rem;
      color: #ededf8;
      transform: scale(1.05);
      text-shadow: 0 0 25px orangered, 0 0 25px white;
}

.lyric__cursor {
      position: absolute;
      height: 4px;
      border-radius: 999px;
      background: linear-gradient(90deg, #00ffd5, #00b3ff, #7f7cff);
      opacity: 1;
      transition: width 0.15s ease, left 0.15s ease, top 0.15s ease;
      box-shadow: 0 0 10px rgba(0, 255, 213, 0.8), 0 0 20px rgba(0, 179, 255, 0.6);
      pointer-events: none;
}

#countdown {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 999;
      display: none;
}

#countdown.show {
      display: block;
}

.countdown-number {
      font-size: 6rem;
      font-weight: 700;
      color: #00ffcc;
      text-shadow: 0 0 30px #00ffcc, 0 0 60px #00ffcc;
      animation: pulse 1s ease-in-out;
}

@keyframes pulse {

      0%,
      100% {
            transform: scale(1);
            opacity: 1;
      }

      50% {
            transform: scale(1.2);
            opacity: 0.8;
      }
}

#search-input {
      color: white;
}

/* Score */
#score-screen {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0.8);
      background: radial-gradient(circle, #1a1a1a, #000);
      padding: 45px;
      border-radius: 24px;
      text-align: center;
      display: none;
      z-index: 10;
      box-shadow: 0 0 40px rgba(0, 255, 204, 0.6);
      animation: popIn 0.5s ease forwards;
}

#score-screen.show {
      display: block;
}

@keyframes popIn {
      from {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.5);
      }

      to {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
      }
}

.score-icon {
      font-size: 4rem;
      margin-bottom: 10px;
      animation: bounce 1.5s infinite;
}

@keyframes bounce {

      0%,
      100% {
            transform: translateY(0);
      }

      50% {
            transform: translateY(-10px);
      }
}

#score-number {
      font-size: 5.5rem;
      color: #ffeb3b;
      text-shadow: 0 0 20px rgba(255, 235, 59, 0.8);
      margin-bottom: 10px;
}

#score-rank {
      font-size: 2rem;
      color: #00ffcc;
      margin-bottom: 20px;
}

#score-close {
      padding: 10px 22px;
      font-size: 1.2rem;
      border: none;
      border-radius: 12px;
      background: #00ffcc;
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
}

#score-close:hover {
      transform: scale(1.1);
      box-shadow: 0 0 15px #00ffcc;
}


/* ============ MEDIA QUERIES ============ */

/* Tablets (768px - 1024px) */
@media (min-width: 768px) {
      .topbar {
            padding: 15px 30px;
      }

      .topbar__title {
            font-size: 1.1rem;
      }

      .playlist__toggle span:not(.playlist__count) {
            display: inline;
      }

      .lyric__line {
            font-size: 2.8rem;
      }

      .lyric__line.active {
            font-size: 3rem;
      }

      .player__button {
            width: 50px;
            height: 50px;
      }

      .countdown-number {
            font-size: 8rem;
      }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
      .topbar__row {
            flex-wrap: nowrap;
      }

      .search {
            max-width: 900px;
      }

      .search__results {
            max-width: 900px;
      }

      .lyric__line {
            font-size: 3rem;
      }

      .lyric__line.active {
            font-size: 3.2rem;
      }
}

/* TVs/Large Screens (1440px+) */
@media (min-width: 1440px) {
      html {
            font-size: 18px;
      }

      .lyric {
            max-width: 1400px;
      }

      .lyric__line {
            font-size: 3.5rem;
      }

      .lyric__line.active {
            font-size: 3.8rem;
      }
}

/* Móviles pequeños (max 480px) */
@media (max-width: 480px) {
      .topbar {
            padding: 10px 15px;
      }

      .topbar__title {
            font-size: 0.9rem;
      }

      .search__input {
            font-size: 0.85rem;
            padding: 10px 12px 10px 38px;
      }

      .playlist__dropdown {
            position: fixed;
      }


      .lyric__line {
            font-size: 1rem;
      }

      .lyric__line.active {
            font-size: 1.2rem;
      }

      .player {
            padding: 10px;
      }

      .player__button {
            width: 40px;
            height: 40px;
      }

      .countdown-number {
            font-size: 4rem;
      }
}

/* SOLO celulares en horizontal */
@media screen and (max-width: 812px) and (orientation: landscape) {

      /* Ejemplos */
      .topbar {
            visibility: hidden;

      }

      .lyric__line {
            font-size: 2.0rem;
      }

      .lyric__line.active {
            font-size: 2.3rem;
      }

      .lyric {
            top: 40%;
      }

      .playlist__dropdown {
            visibility: hidden;
      }


}