/* =============================================================
   card.css — Puntazo · Tarjeta universal de video
   ============================================================= */

.video-card {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  padding: 16px 16px 14px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
  position: relative;
  transition: border-color .2s ease;
}
.video-card:hover { border-color: rgba(255,255,255,.16); }

/* ── Header: label + rxn preview ── */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.card-time {
  font-size: 1.45rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1;
  flex: 1;
}

.card-rxn-preview {
  display: flex;
  gap: 3px;
  font-size: 1.05rem;
  min-height: 24px;
  align-items: center;
  flex-shrink: 0;
}

/* ── has-rank: medalla arriba, label centrado, sin solapamiento ── */
/*
  Cuando hay medalla (mejores.html), el card-top cambia:
  - La medalla se saca del flujo absoluto y pasa a ser el primer hijo del card-top
  - El label (club / jugador) se centra
  - Las reacciones van al final
*/
.video-card.has-rank .rank-badge {
  position: static;          /* quitar el absolute */
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
}

.video-card.has-rank .card-top {
  justify-content: flex-start;
}

.video-card.has-rank .card-time {
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
  flex: 1;
  letter-spacing: 0;
  /* Truncar si el nombre es largo */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* card-hero-name: se oculta en has-rank porque el nombre ya está en card-time */
.video-card.has-rank .card-hero-name {
  display: none !important;
}

/* ── Hero name slot (perfil, clip, jugador) ── */
.card-hero-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: rgba(234,242,255,.80);
  margin: -4px 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,79,200,.12);
  border: 1px solid rgba(11,124,255,.18);
  display: none; /* reactions.js lo muestra cuando hay claim */
  align-items: center;
  gap: 6px;
}

/* ── Subtítulo (club·cancha) ── */
.card-subtitle {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(234,242,255,.60);
  margin-bottom: 10px;
  margin-top: -4px;
}

/* ── Video ── */
.video-wrap {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,.35);
}
.video-wrap video { width: 100%; display: block; border-radius: 10px; }

/* ── Action pills ── */
.action-pills {
  display: flex;
  gap: 8px;
  margin: 12px 0 6px;
  flex-wrap: wrap;
}

.action-pill {
  flex: 1;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(234,242,255,.75);
  font-size: 1.05rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-weight: 700;
  transition: all .18s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: nowrap;
}

.action-pill:hover {
  background: rgba(255,255,255,.11);
  border-color: rgba(255,255,255,.22);
  color: #eaf2ff;
  transform: translateY(-1px);
}
.action-pill:active { transform: scale(0.93); }

/* 💾 azul cuando guardado */
.action-pill.is-saved {
  background: rgba(0,79,200,.22);
  border-color: rgba(11,124,255,.45);
  color: #7eb8ff;
  box-shadow: 0 0 18px rgba(0,79,200,.18);
}
.action-pill.is-saved:hover {
  background: rgba(0,79,200,.30);
  border-color: rgba(11,124,255,.60);
  color: #a8d0ff;
}

/* Fullscreen activo */
.action-pill.is-active {
  background: rgba(0,79,200,.18);
  border-color: rgba(11,124,255,.35);
  color: #eaf2ff;
}

/* ── Rank badge (solo para cuando no es has-rank, fallback) ── */
.rank-badge {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 8;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
}
.rank-badge.top1 { background:rgba(255,190,0,.22); border-color:rgba(255,190,0,.48); color:#ffe89a; }
.rank-badge.top2 { background:rgba(180,180,180,.18); border-color:rgba(200,200,200,.38); color:#d8d8d8; }
.rank-badge.top3 { background:rgba(180,100,30,.22); border-color:rgba(200,120,40,.38); color:#e09060; }

/* ── Grids ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
  gap: 20px;
}

/* ── Tabs (perfil.html) ── */
.pz-tabs { display:flex; gap:8px; margin-bottom:24px; border-bottom:1px solid rgba(255,255,255,.08); }
.pz-tab-btn {
  padding:10px 20px; border-radius:999px 999px 0 0; border:1px solid transparent;
  background:transparent; color:rgba(234,242,255,.55); font-family:inherit;
  font-size:.88rem; font-weight:700; cursor:pointer; transition:all .18s;
}
.pz-tab-btn:hover { color:#eaf2ff; }
.pz-tab-btn.active { color:#fff; background:rgba(0,79,200,.18); border-color:rgba(11,124,255,.30); border-bottom-color:transparent; }
.pz-tab-pane { display:none; }
.pz-tab-pane.active { display:block; }

/* ── Empty state ── */
.empty-state { text-align:center; padding:60px 20px; color:rgba(234,242,255,.55); }
.empty-state .empty-icon { font-size:48px; margin-bottom:14px; }
.empty-state h3 { font-size:1.1rem; font-weight:800; margin-bottom:8px; color:#eaf2ff; }
.empty-state p { font-size:.90rem; max-width:320px; margin:0 auto; }

/* ── Skeletons ── */
.skeleton-card { border-radius:18px; background:rgba(255,255,255,.055); border:1px solid rgba(255,255,255,.10); overflow:hidden; animation:pz-shimmer 1.6s infinite; }
.skeleton-thumb { width:100%; padding-top:56.25%; background:rgba(255,255,255,.04); }
.skeleton-body { padding:16px; }
.skeleton-line { height:12px; border-radius:6px; background:rgba(255,255,255,.06); margin-bottom:10px; }
.skeleton-line.short { width:55%; }
@keyframes pz-shimmer { 0%,100%{opacity:1} 50%{opacity:.55} }

/* ── Botón borrar comentario ── */
.pz-comment-delete {
  background:transparent; border:none; font-size:13px; opacity:.40;
  cursor:pointer; padding:2px 4px; border-radius:6px; transition:opacity .15s,background .15s; line-height:1;
}
.pz-comment-delete:hover { opacity:.90; background:rgba(255,60,40,.12); }

@media(max-width:560px){
  .cards-grid { grid-template-columns:1fr; }
  .card-time { font-size:1.25rem; }
  .video-card.has-rank .card-time { font-size:.95rem; }
  .action-pill { font-size:.95rem; padding:.5rem .65rem; }
}
