/* ═══════════════════════════════════════════════════
LOFI RADIO PLAYER — Portfólio Jarede
Player fixo no canto inferior direito
═══════════════════════════════════════════════════ */

#lofi-player {
  position: fixed;
  bottom: 1.8rem;
  right: 1.8rem;
  z-index: 9998;
  width: 280px;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(40,200,64,0.08);
  font-family: 'Courier New', monospace;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1),
              opacity  0.35s ease;
}

#lofi-player.minimized {
  transform: translateY(calc(100% - 44px));
}

/* ── Capa / Vinil ── */
.lp-cover {
  position: relative;
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #0d1f0d 0%, #0a1628 50%, #1a0d2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lp-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(40,200,64,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(121,192,255,0.06) 0%, transparent 50%);
}

/* Grade estilo CRT */
.lp-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,255,65,0.02) 3px, rgba(0,255,65,0.02) 4px
  );
  pointer-events: none;
}

.lp-vinyl {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    #111 0deg, #1a1a1a 10deg, #111 20deg
  );
  border: 3px solid #21262d;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lp-spin 4s linear infinite;
  animation-play-state: paused;
  box-shadow: 0 0 20px rgba(0,0,0,0.8), 0 0 40px rgba(40,200,64,0.1);
  position: relative;
  z-index: 1;
}

.lp-vinyl-center {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #28c840 0%, #1a8a2a 60%, #0d1117 100%);
  box-shadow: 0 0 8px rgba(40,200,64,0.5);
}

@keyframes lp-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Equalizador */
.lp-eq {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.lp-eq span {
  display: block;
  width: 4px;
  background: #28c840;
  border-radius: 2px;
  box-shadow: 0 0 6px #28c840;
  animation: lp-eq-bar 0.6s ease-in-out infinite alternate;
}
.lp-eq span:nth-child(1) { animation-duration: 0.5s; animation-delay: 0.0s; }
.lp-eq span:nth-child(2) { animation-duration: 0.7s; animation-delay: 0.1s; }
.lp-eq span:nth-child(3) { animation-duration: 0.4s; animation-delay: 0.2s; }
.lp-eq span:nth-child(4) { animation-duration: 0.6s; animation-delay: 0.05s; }
.lp-eq span:nth-child(5) { animation-duration: 0.8s; animation-delay: 0.15s; }

@keyframes lp-eq-bar {
  from { height: 4px;  opacity: 0.5; }
  to   { height: 18px; opacity: 1;   }
}

/* ── Info ── */
.lp-info {
  padding: 1rem 1.1rem 1.1rem;
}

.lp-badge {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: #28c840;
  margin-bottom: 0.4rem;
}

.lp-title {
  font-size: 0.88rem;
  color: #e6edf3;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.15rem;
}

.lp-artist {
  font-size: 0.7rem;
  color: #8b949e;
  margin-bottom: 0.8rem;
}

/* Barra de progresso */
.lp-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.lp-time {
  font-size: 0.58rem;
  color: #8b949e;
  min-width: 28px;
}

.lp-progress {
  flex: 1;
  height: 3px;
  background: #21262d;
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
}

.lp-progress-fill {
  height: 100%;
  background: #28c840;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s linear;
  box-shadow: 0 0 6px rgba(40,200,64,0.5);
}

/* Controles */
.lp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.lp-btn {
  background: #161b22;
  border: 1px solid #21262d;
  color: #8b949e;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-btn:hover {
  border-color: #28c840;
  color: #28c840;
  box-shadow: 0 0 10px rgba(40,200,64,0.2);
}

.lp-btn.lp-play {
  width: 44px;
  height: 44px;
  font-size: 1rem;
  background: #28c840;
  border-color: #28c840;
  color: #0d1117;
}

.lp-btn.lp-play:hover {
  background: #3ddb55;
  box-shadow: 0 0 16px rgba(40,200,64,0.4);
  color: #0d1117;
}

/* Volume */
.lp-volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lp-vol-icon { font-size: 0.75rem; }

.lp-volume {
  flex: 1;
  -webkit-appearance: none;
  height: 3px;
  background: #21262d;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.lp-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #28c840;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(40,200,64,0.5);
}

.lp-volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #28c840;
  cursor: pointer;
  border: none;
}

/* Botão minimizar */
.lp-toggle {
  position: absolute;
  top: 8px;
  right: 10px;
  background: rgba(13,17,23,0.7);
  border: 1px solid #21262d;
  color: #8b949e;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
  z-index: 10;
}

.lp-toggle:hover {
  color: #28c840;
  border-color: #28c840;
}

/* ── Responsivo ── */
@media (max-width: 480px) {
  #lofi-player {
    width: calc(100vw - 2rem);
    right: 1rem;
    bottom: 1rem;
  }
}

/* ── Tracklist ── */
.lp-tracklist {
  margin-top: .8rem;
  border-top: 1px solid #21262d;
  padding-top: .6rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.lp-track {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
  font-size: .68rem;
  color: #8b949e;
}

.lp-track:hover { background: #161b22; color: #e6edf3; }
.lp-track.active { background: #0d2218; color: #28c840; }

.lp-track-icon { font-size: .7rem; }
.lp-track-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lp-track-live {
  font-size: .55rem;
  letter-spacing: .1em;
  padding: .1rem .35rem;
  border: 1px solid #f85149;
  color: #f85149;
  border-radius: 3px;
}

/* ── Badge AO VIVO ── */
.lp-live-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: .6rem;
  letter-spacing: .1em;
  padding: .2rem .5rem;
  background: rgba(248,81,73,.15);
  border: 1px solid #f85149;
  color: #f85149;
  border-radius: 4px;
  display: none;
  z-index: 2;
  animation: lp-pulse-badge 2s ease-in-out infinite;
}

@keyframes lp-pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}

/* ── Barra de onda (live) ── */
.lp-live-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .9rem;
}

.lp-live-wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
}

.lp-live-wave span {
  display: block;
  width: 4px;
  background: #28c840;
  border-radius: 2px;
  box-shadow: 0 0 5px #28c840;
  animation: lp-eq-bar .6s ease-in-out infinite alternate;
}
.lp-live-wave span:nth-child(1) { animation-duration: .5s; }
.lp-live-wave span:nth-child(2) { animation-duration: .7s; animation-delay: .1s; }
.lp-live-wave span:nth-child(3) { animation-duration: .4s; animation-delay: .2s; }
.lp-live-wave span:nth-child(4) { animation-duration: .6s; animation-delay: .05s; }
.lp-live-wave span:nth-child(5) { animation-duration: .8s; animation-delay: .15s; }

.lp-live-label {
  font-size: .65rem;
  color: #3fb950;
  letter-spacing: .08em;
}
/* ════════════════════════════════════════════════════
   CARD GRANDE — canto inferior esquerdo
════════════════════════════════════════════════════ */
#lofi-card {
  position: fixed;
  bottom: 1.8rem;
  left: 1.8rem;
  z-index: 9997;
  width: 320px;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(40,200,64,0.06);
  font-family: 'Courier New', monospace;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

#lofi-card.minimized {
  transform: translateY(calc(100% - 38px));
}

.lc-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .9rem;
  background: #161b22;
  border-bottom: 1px solid #21262d;
}

.lc-dots { display:flex; gap:.35rem; }
.lc-dot  { width:11px; height:11px; border-radius:50%; }
.lc-dot.red    { background:#ff5f57; }
.lc-dot.yellow { background:#febc2e; }
.lc-dot.green  { background:#28c840; }

.lc-title-bar {
  flex: 1;
  font-size: .65rem;
  color: #8b949e;
  letter-spacing: .06em;
}

.lc-close {
  background: none;
  border: none;
  color: #8b949e;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 .1rem;
  transition: color .15s;
}
.lc-close:hover { color: #28c840; }

.lc-body { padding: 1rem; }

.lc-now {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.lc-vinyl-wrap {
  position: relative;
  flex-shrink: 0;
}

.lc-vinyl {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: repeating-conic-gradient(#111 0deg, #1c1c1c 10deg, #111 20deg);
  border: 2px solid #21262d;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lp-spin 4s linear infinite;
  animation-play-state: paused;
  box-shadow: 0 0 20px rgba(0,0,0,.8), 0 0 30px rgba(40,200,64,.1);
}

.lc-vinyl-hole {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #28c840 0%, #0d1117 80%);
  box-shadow: 0 0 6px rgba(40,200,64,.5);
}

.lc-eq-wrap {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
}

.lc-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.lc-eq span {
  display: block;
  width: 3px;
  background: #28c840;
  border-radius: 2px;
  box-shadow: 0 0 4px #28c840;
  animation: lp-eq-bar .6s ease-in-out infinite alternate;
}
.lc-eq span:nth-child(1){animation-duration:.5s}
.lc-eq span:nth-child(2){animation-duration:.7s;animation-delay:.1s}
.lc-eq span:nth-child(3){animation-duration:.4s;animation-delay:.2s}
.lc-eq span:nth-child(4){animation-duration:.6s;animation-delay:.05s}
.lc-eq span:nth-child(5){animation-duration:.8s;animation-delay:.15s}

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

.lc-now-label {
  font-size: .58rem;
  color: #28c840;
  letter-spacing: .12em;
  margin-bottom: .3rem;
}

.lc-now-title {
  font-size: .9rem;
  color: #e6edf3;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: .15rem;
}

.lc-now-artist {
  font-size: .68rem;
  color: #8b949e;
  margin-bottom: .5rem;
}

.lc-live-pill {
  display: none;
  align-items: center;
  font-size: .58rem;
  padding: .15rem .45rem;
  border: 1px solid #f85149;
  color: #f85149;
  border-radius: 20px;
  width: fit-content;
  animation: lp-pulse-badge 2s ease-in-out infinite;
  margin-bottom: .4rem;
}

.lc-progress-wrap { margin-top: .3rem; }

.lc-progress {
  height: 3px;
  background: #21262d;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: .3rem;
}

.lc-fill {
  height: 100%;
  background: #28c840;
  width: 0%;
  transition: width .3s linear;
  box-shadow: 0 0 5px rgba(40,200,64,.5);
}

.lc-times {
  display: flex;
  justify-content: space-between;
  font-size: .58rem;
  color: #8b949e;
}

.lc-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .9rem;
}

.lc-btn {
  background: #161b22;
  border: 1px solid #21262d;
  color: #8b949e;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: .75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.lc-btn:hover { border-color:#28c840; color:#28c840; }

.lc-btn.lc-play {
  width: 42px;
  height: 42px;
  background: #28c840;
  border-color: #28c840;
  color: #0d1117;
  font-size: .95rem;
}
.lc-btn.lc-play:hover {
  background: #3ddb55;
  box-shadow: 0 0 14px rgba(40,200,64,.4);
}

.lc-vol {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
}

.lc-vol input[type=range] {
  flex: 1;
  -webkit-appearance: none;
  height: 3px;
  background: #21262d;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.lc-vol input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #28c840;
  box-shadow: 0 0 5px rgba(40,200,64,.5);
}

.lc-list {
  border-top: 1px solid #21262d;
  padding-top: .6rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  max-height: 140px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #21262d transparent;
}

.lc-track {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .68rem;
  color: #8b949e;
  transition: background .15s;
}
.lc-track:hover { background: #161b22; color: #e6edf3; }
.lc-track.active { background: #0d2218; color: #28c840; }

.lc-track-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lc-track-pill {
  font-size: .55rem;
  padding: .1rem .35rem;
  border: 1px solid #f85149;
  color: #f85149;
  border-radius: 3px;
}

@media (max-width: 480px) {
  #lofi-card {
    width: calc(100vw - 2rem);
    left: 1rem;
    bottom: 1rem;
  }
}