/* =============================================
   youline — Feed (Reels) Styles
   ============================================= */

/* Container de scroll vertical snapping */
.feed-container {
  position: absolute;
  inset: 0;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.feed-container::-webkit-scrollbar {
  display: none;
}

/* ---- Reel card ---- */
.reel-card {
  position: relative;
  width: 100%;
  height: 100dvh;
  max-height: 932px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: var(--black);
}

/* Vídeo ou placeholder de fundo */
.reel-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gradiente sobre o vídeo */
.reel-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,  rgba(0,0,0,0.85) 0%, transparent 45%),
    linear-gradient(to bottom, rgba(0,0,0,0.50) 0%, transparent 20%);
  pointer-events: none;
  z-index: 2;
}

/* ---- Score badge ---- */
.score-badge {
  position: absolute;
  top: 72px;
  right: var(--space-4);
  z-index: 10;
  background: var(--accent);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  text-align: center;
  min-width: 54px;
  cursor: pointer;
  transition: transform var(--ease-fast);
}

.score-badge:hover  { transform: scale(1.05); }
.score-badge:active { transform: scale(0.95); }

.score-badge__number {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--accent-text);
  line-height: 1;
  letter-spacing: -1px;
}

.score-badge__label {
  font-size: 9px;
  color: rgba(0, 0, 0, 0.55);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ---- Trick line overlay ---- */
.trick-line {
  position: absolute;
  bottom: 165px;
  left: var(--space-4);
  right: 72px;
  z-index: 10;
}

.trick-line__label {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-2);
}

.trick-line__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  row-gap: 6px;
}

.trick-tag {
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 10px;
  font-weight: var(--weight-medium);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.trick-connector {
  color: var(--accent);
  font-size: 12px;
  flex-shrink: 0;
  opacity: 0.7;
}

/* ---- User info ---- */
.reel-info {
  position: absolute;
  bottom: 72px;
  left: var(--space-4);
  right: 72px;
  z-index: 10;
}

.reel-user {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--gray-2);
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-username {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--white-literal);
}

.reel-caption {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.4;
  margin-bottom: var(--space-1);
}

.reel-spot {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.62);
}

.reel-spot i { font-size: 13px; }

/* ---- Music card ---- */
.music-track-wrap {
  position: absolute;
  top: 70px;
  right: calc(var(--space-4) - -65px);
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.music-track-card {
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, filter 0.18s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.music-track-card:active {
  transform: scale(0.96);
}

.music-track-card__cover {
  position: relative;
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
@supports (backdrop-filter: blur(8px)) {
  .music-track-card__cover {
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

.music-track-card__cover-image,
.music-track-card__cover-fallback {
  width: 100%;
  height: 100%;
  display: block;
}

.music-track-card__cover-image {
  object-fit: cover;
}

.music-track-card__cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(29, 185, 84, 0.35), rgba(0, 0, 0, 0.68));
  color: var(--white-literal);
  font-size: 20px;
}

.music-track-card__provider {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  color: #1db954;
  font-size: 12px;
}

.music-track-play-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--white-literal);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}
@supports (backdrop-filter: blur(8px)) {
  .music-track-play-btn {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

.music-track-play-btn i {
  font-size: 22px;
}

.music-play-btn.playing {
  background: rgba(29, 185, 84, 0.92);
}

/* ---- Estado tocando: indicativo sutil na capa ---- */
.spotify-cover-toggle.is-playing .music-track-card__cover {
  border-color: rgba(29, 185, 84, 0.95);
  box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.34), 0 14px 30px rgba(29, 185, 84, 0.18);
}

/* ---- Mini player Spotify INLINE (substitui a capa enquanto toca) ---- */
.spotify-inline-mini {
  position: relative;
  width: 300px;
  max-width: 80vw;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #121212;
  border: 1px solid rgba(29, 185, 84, 0.35);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38);
}

.spotify-inline-mini iframe {
  display: block;
  width: 100%;
  height: 80px;
  border: 0;
  background: #121212;
}

.spotify-inline-close {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.spotify-inline-close i {
  font-size: 15px;
}

.spotify-inline-close:hover,
.spotify-inline-close:active {
  transform: scale(1.08);
  background: rgba(29, 185, 84, 0.88);
  border-color: rgba(29, 185, 84, 1);
}

@media (max-width: 420px) {
  .spotify-inline-mini {
    width: 300px;
  }
  .spotify-inline-mini iframe {
    height: 152px;
  }
}

/* ---- Right action buttons ---- */
.reel-actions {
  position: absolute;
  right: var(--space-4);
  bottom: 90px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

@media (max-width: 420px) {
  .music-track-wrap {
    top: 132px;
    right: calc(var(--space-4) - 2px);
  }
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform var(--ease-fast);
}

.action-btn:active { transform: scale(0.90); }

.action-btn i {
  font-size: 26px;
  color: var(--white-literal);
  transition: color var(--ease-fast);
}

.action-btn.liked i { color: var(--accent); }

.action-btn span {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.65);
}

/* ---- Score sheet interior ---- */
.score-sheet-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  margin-bottom: 2px;
}

.score-sheet-sub {
  font-size: var(--text-sm);
  color: var(--muted-light);
  margin-bottom: var(--space-5);
  line-height: 1.4;
}

.score-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.score-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.score-row__name {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.70);
  width: 80px;
  flex-shrink: 0;
}

.score-row__bar {
  flex: 1;
  height: 3px;
  background: var(--gray-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.score-row__fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-row__value {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--accent);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.score-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-2);
}

.score-total__label {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
}

.score-total__value {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--accent);
  letter-spacing: -1px;
}
