*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%;
  background: #111;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  overflow: hidden;
}
.cr-root {
  position: relative;
  width: 100vw; height: 100vh;
  overflow: hidden;
  background-color: #111;
  background-image: radial-gradient(circle, #2a2a2a 1px, transparent 1px);
  background-size: 20px 20px;
}
.cr-stage {
  position: absolute; inset: 0; width: 300%; height: 100%;
  display: flex; transform: translateX(-33.333%); will-change: transform;
}
.cr-stage.sliding-left  { transition: transform 0.45s ease-out; }
.cr-stage.sliding-right { transition: transform 0.45s ease-out; }
.cr-panel {
  position: relative; width: 33.333%; height: 100%; flex-shrink: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 0 5vw;
}
.cr-img-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 77vh;
  border-radius: 0;
  overflow: hidden;
  z-index: 1;
}
.cr-img-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
  opacity: 0; transition: opacity 1.4s ease;
}
.cr-img-bg.active { opacity: 1; }
.cr-img-shadow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(17,17,17,1) 0%,
    rgba(17,17,17,0.7) 30%,
    rgba(17,17,17,0) 70%),
    linear-gradient(0deg, rgba(17,17,17,0.8) 0%, transparent 40%);
  z-index: 2;
}
.cr-main {
  position: relative; z-index: 10;
  display: flex; flex-direction: column; gap: 14px; max-width: 480px;
}

/* ── LOGO IMAGEM (substituindo texto) ── */
.cr-logo-wrap {
  opacity: 0; transform: translateX(-20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.cr-logo-wrap.visible { opacity: 1; transform: translateX(0); }
.cr-logo-img {
  display: block;
  max-width: 320px;
  max-height: 160px;
  width: auto; height: auto;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.85));
  /* ← adicione estas duas linhas: */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cr-logo-wrap.visible .cr-logo-img {
  opacity: 1;
}

/* ── META ── */
.cr-meta {
  display: flex; align-items: center; gap: 8px;
  opacity: 0; transform: translateX(-16px);
  transition: opacity 0.6s ease 0.10s, transform 0.6s ease 0.10s;
}
.cr-meta.visible { opacity: 1; transform: translateX(0); }
.cr-rating {
  background: #f47521; color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 2px 6px; border-radius: 2px; letter-spacing: 0.3px;
}
.cr-dot-sep { width: 4px; height: 4px; border-radius: 50%; background: #aaa; flex-shrink: 0; }
.cr-genres { color: #ccc; font-size: 12px; }

/* ── DESC ── */
.cr-desc {
  color: #ddd; font-size: 13px; line-height: 1.5; max-width: 340px;
  opacity: 0; transform: translateX(-14px);
  transition: opacity 0.6s ease 0.18s, transform 0.6s ease 0.18s;
}
.cr-desc.visible { opacity: 1; transform: translateX(0); }

/* ── BOTÕES ── */
.cr-buttons {
  display: flex; gap: 8px; align-items: center;
  opacity: 0; transform: translateX(-12px);
  transition: opacity 0.6s ease 0.26s, transform 0.6s ease 0.26s;
}
.cr-buttons.visible { opacity: 1; transform: translateX(0); }

/* Botão Play — fundo branco, texto preto, borda branca, ícone play */
.cr-btn-play {
  display: flex; align-items: center; gap: 8px;
  background: #fff; color: #000;
  border: 2px solid #fff;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 11px; font-weight: 800;
  cursor: pointer; letter-spacing: 0.8px; white-space: nowrap;
  font-family: 'Helvetica Neue', Arial, sans-serif; text-transform: uppercase;
  transition: background 0.18s, color 0.18s, transform 0.12s;
}
.cr-btn-play:hover { background: transparent; color: #fff; transform: scale(1.02); }
.cr-btn-play:active { transform: scale(0.98); }


/* Botão Salvar — fundo transparente, borda branca, ícone bookmark */
.cr-btn-save {
  width: 40px; height: 40px;
  border: 2px solid rgba(255,255,255,0.7);
  background: transparent;
  border-radius: 4px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.18s, background 0.18s, transform 0.12s;
}
.cr-btn-save:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.12);
  transform: scale(1.05);
}
.cr-btn-save img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1); /* ← deixa a imagem branca */
}

/* ── UI LAYER / DOTS ── */
.cr-ui-layer {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: center; padding-bottom: 20px;
}
.cr-dots-nav {
  display: flex;
  align-items: center;
  gap: 0;
}
.cr-dots-arrow {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.15s;
}
.cr-dots-arrow:hover { opacity: 1; }
.cr-dots-arrow.hidden { visibility: hidden; pointer-events: none; }
.cr-dots-arrow img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  display: block;
}
/* seta esquerda: aponta para a esquerda (espelhada) */
.cr-dots-arrow-left img  { transform: scaleX(-1); }
/* seta direita: aponta para a direita (normal) */
.cr-dots-arrow-right img { transform: scaleX(1); }
.cr-dots {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  max-width: calc(100vw - 200px);
}
.cr-dots::-webkit-scrollbar { display: none; }

/* ── ESTRELA CUSTOMIZADA ── */
.cr-dot-btn {
  width: 36px; height: 36px;
  border: none; background: transparent;
  cursor: pointer; padding: 0; position: relative;
  display: flex; align-items: center; justify-content: center;
  /* Inativa: inclinada para um lado */
  transform: rotate(-20deg);
  transition: transform 0.15s cubic-bezier(0.34,1.56,0.64,1), filter 0.15s ease;
  filter: brightness(0.45);
}

.cr-dot-btn .cr-star-img {
  width: 35px; height: 35px;
  display: block;
  /* Branco desativado: usamos filter para tornar tudo branco e depois escurecer */
  filter: brightness(0) invert(1);
  transition: width 0.15s cubic-bezier(0.34,1.56,0.64,1),
              height 0.15s cubic-bezier(0.34,1.56,0.64,1),
              filter 0.15s ease;
}

/* Hover nas inativas: vira bolinha laranja */
.cr-dot-btn:not(.active):hover {
  transform: rotate(0deg);
  filter: brightness(1);
}
.cr-dot-btn:not(.active):hover .cr-star-img {
  /* Torna laranja */
  filter: brightness(0) saturate(100%) invert(55%) sepia(90%) saturate(600%) hue-rotate(355deg) brightness(1.1);
  width: 26px; height: 26px;
}

/* Ativa: reta, branca, maior */
.cr-dot-btn.active {
  transform: rotate(0deg);
  filter: brightness(1);
}
.cr-dot-btn.active .cr-star-img {
  width: 50px; height: 50px;
  filter: brightness(0) invert(1); /* branco puro */
}

/* Clicada: escala extra */
.cr-dot-btn.clicked {
  transform: rotate(0deg) scale(1.45) !important;
}

/* Efeito shimmer ao clicar */
.cr-dot-btn::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, transparent 70%);
  opacity: 0; transform: scale(0); pointer-events: none;
}
.cr-dot-btn.clicked::after { animation: shimmerPulse 0.45s ease-out forwards; }
@keyframes shimmerPulse {
  0%   { opacity: 0.8; transform: scale(0.3); }
  60%  { opacity: 0.3; transform: scale(1.5); }
  100% { opacity: 0;   transform: scale(2); }
}

/* ── PROGRESS ── */
.cr-progress {
  position: absolute; bottom: 0; left: 0;
  height: 3px; width: 0%;
  background: #f47521; z-index: 101; border-radius: 0 2px 2px 0;
}

/* ── PARTICLES ── */
.cr-particles { position: absolute; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }

/* ── TOP LABEL ── */
.cr-top-label {
  position: absolute; top: 28px; left: 5vw; z-index: 10;
  font-size: 17px !important;
  color: #fff; font-size: 15px; font-weight: 600;
}

/* Card wrap: só estilizado no mobile (ver @media) */
.cr-card-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {

  html, body { overflow: hidden; height: 100%; }

  .cr-root {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-rows: 12vh 1fr 1fr;
    grid-template-columns: 1fr;
    background: #111;
    overflow: hidden;
    padding: 0;
  }

  /* Label */
  .cr-top-label {
    position: relative;
    top: auto; left: auto;
    grid-row: 1;
    grid-column: 1;
    width: calc(100% - 56px);
    font-size: 12px !important;
    font-weight: 600;
    color: #fff;
    padding: 14px 16px 0;
    display: flex;
    align-items: flex-start;
    z-index: 10;
  }

  /* Card centralizado na celula 2 */
  .cr-card-wrap {
    position: relative;
    grid-row: 2;
    grid-column: 1;
    width: calc(100% - 24px);
    height: 100%;
    max-height: 42vh;
    margin: auto;
    border-radius: 14px;
    overflow: hidden;
    background: #1a1a1a;
    inset: auto;
  }

  .cr-stage {
    position: absolute;
    inset: 0;
    width: 300%;
    height: 100%;
    left: 0;
  }

  .cr-panel {
    position: relative;
    width: 33.333%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    justify-content: flex-end;
    align-items: flex-start;
  }

  .cr-img-wrap {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    transform: none;
    border-radius: 0;
  }

  .cr-img-shadow {
    background:
      linear-gradient(0deg,
        rgba(17,17,17,1)    0%,
        rgba(17,17,17,0.85) 28%,
        rgba(17,17,17,0.2)  55%,
        transparent         80%),
      linear-gradient(90deg,
        rgba(17,17,17,0.45) 0%,
        transparent         55%);
  }

  .cr-main {
    position: relative;
    z-index: 10;
    max-width: 95%;
    gap: 6px;
    padding: 0 14px 16px;
  }

  .cr-logo-img { max-width: 160px !important; max-height: 80px !important; }
  .cr-desc     { font-size: 10px; max-width: 100%; }
  .cr-genres   { font-size: 10px; }
  .cr-btn-play { padding: 8px 12px; font-size: 9px; gap: 5px; }
  .cr-btn-save { width: 34px; height: 34px; }
  .cr-btn-save img { width: 16px; height: 16px; }

  .cr-progress {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    border-radius: 0;
    z-index: 101;
  }

  /* Estrelas na celula 3 */
  .cr-ui-layer {
    position: relative;
    grid-row: 3;
    grid-column: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 24px;
    z-index: 100;
  }

  .cr-dots-nav {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    max-width: 100vw;
  }

  /* setas no mobile: mesma imagem, tamanho menor */
  .cr-dots-arrow {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 4px;
    min-width: 24px;
    flex-shrink: 0;
    opacity: 0.65;
    transition: opacity 0.15s;
  }
  .cr-dots-arrow:active { opacity: 1; }
  .cr-dots-arrow.hidden { visibility: hidden; pointer-events: none; }
  .cr-dots-arrow img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    display: block;
  }

  .cr-dots {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    padding: 4px 0;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    max-width: calc(100vw - 72px);
    scroll-behavior: smooth;
  }
  .cr-dots::-webkit-scrollbar { display: none; }

  .cr-dot-btn {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex !important;
  }
  .cr-dot-btn .cr-star-img        { width: 15px; height: 15px; }
  .cr-dot-btn.active .cr-star-img { width: 26px; height: 26px; }

  .cr-particles {
    position: fixed;
    inset: 0;
    z-index: 200;
  }
}


/* ── SEARCH BAR ── */
.cr-search-wrap {
  position: absolute;
  top: 22px;
  right: 5vw;
  z-index: 200;
  display: flex;
  align-items: center;
}

.cr-search-toggle {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.cr-search-toggle:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.6); }
.cr-search-toggle svg { display: block; }

.cr-search-box {
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 0;
  opacity: 0;
  transition: width 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.25s ease;
  background: rgba(17,17,17,0.85);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  margin-right: 8px;
  order: -1; /* aparece à esquerda do ícone */
}
.cr-search-box.open {
  width: 220px;
  opacity: 1;
}

.cr-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  padding: 8px 12px;
  width: 100%;
  letter-spacing: 0.3px;
}
.cr-search-input::placeholder { color: rgba(255,255,255,0.4); }

.cr-search-clear {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 10px 0 0;
  color: rgba(255,255,255,0.5);
  font-size: 16px;
  line-height: 1;
  display: none;
  flex-shrink: 0;
}
.cr-search-clear.visible { display: block; }
.cr-search-clear:hover { color: #fff; }

/* Dropdown de resultados */
.cr-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: rgba(17,17,17,0.95);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 300;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.cr-search-results.open { display: block; }

.cr-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cr-search-item:last-child { border-bottom: none; }
.cr-search-item:hover { background: rgba(255,255,255,0.1); }
.cr-search-item-title {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  flex: 1;
}
.cr-search-item-genres {
  color: rgba(255,255,255,0.45);
  font-size: 10px;
}
.cr-search-no-results {
  padding: 14px;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  text-align: center;
}

/* Mobile adjustments for search */
@media (max-width: 768px) {
  .cr-search-wrap {
    top: 10px;
    right: 14px;
  }
  .cr-search-box.open { width: 180px; }
  .cr-search-toggle { width: 32px; height: 32px; }
}

#cr-global-tooltip {
  position: fixed;
  transform: translate(-50%, -100%);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  translate: 0 10px;
  transition: opacity 0.25s ease, translate 0.5s cubic-bezier(0.34,1.56,0.64,1);
  letter-spacing: 0.5px;
  z-index: 9999;
}

#cr-global-tooltip.visible {
  opacity: 1;
  translate: 0 0px;
}