/* ==========================================================================
   4FUNNY — Feed de clipes (estilo YouTube) + Player em modal
   ========================================================================== */

.vault-main { padding: 36px 40px 64px; max-width: 1400px; margin: 0 auto; }

@media (max-width: 768px) { .vault-main { padding: 20px; } }

.vault-header { margin-bottom: 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.vault-header__title {
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.72) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.vault-header__subtitle { color: var(--text-dim); font-size: 14px; }

/* ===== TOOLBAR ===== */

.vault-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 12px 0;
}

.vault-toolbar__filters { display: flex; gap: 8px; }
.vault-toolbar__right { display: flex; gap: 8px; align-items: center; }

.admin-badge {
  font-family: var(--mono);
  font-size: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(95, 232, 198, 0.4);
  color: var(--teal);
  background: rgba(95, 232, 198, 0.08);
  display: none;
  align-items: center;
  gap: 6px;
}

.admin-badge.is-visible { display: inline-flex; }
.admin-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 6px var(--teal); }

/* ===== FEED GRID (estilo YouTube) ===== */

.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px 20px;
}

.clip-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: transparent;
  transition: transform 0.2s var(--ease);
  animation: cardIn 0.35s var(--ease) both;
}

@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.clip-card:hover { transform: translateY(-3px); }

.clip-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000 radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.clip-card__thumb video,
.clip-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.clip-card__play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 20, 0.0);
  opacity: 0;
  transition: opacity 0.2s var(--ease), background 0.2s var(--ease);
}

.clip-card:hover .clip-card__play-overlay {
  opacity: 1;
  background: rgba(6, 10, 20, 0.28);
}

.clip-card__play-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transform: scale(0.85);
  transition: transform 0.2s var(--ease);
}

.clip-card:hover .clip-card__play-icon { transform: scale(1); }

.clip-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #06131f;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.clip-card__badge--novo { background: var(--teal); }
.clip-card__badge--ace { background: var(--amber); }
.clip-card__badge--clutch { background: var(--purple); }

.clip-card__duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.clip-card__body {
  display: flex;
  gap: 12px;
  padding-top: 12px;
}

.clip-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #06131f;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.clip-card__info { flex: 1; min-width: 0; }

.clip-card__title {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.clip-card__meta {
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.5;
}

.clip-card__meta-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.clip-card__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }

.clip-card__delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 107, 107, 0.4);
  background: rgba(10, 14, 24, 0.7);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 2;
}

.clip-card:hover .clip-card__delete { opacity: 1; }
.clip-card__delete:hover { background: rgba(255, 107, 107, 0.25); }

/* ===== EMPTY / SKELETON STATES ===== */

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  color: var(--text-faint);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
}

.empty-state__icon { width: 46px; height: 46px; margin: 0 auto 16px; color: var(--text-faint); }
.empty-state__text { font-size: 15px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.empty-state__hint { font-size: 12.5px; }

.skeleton-card { display: flex; flex-direction: column; gap: 12px; }
.skeleton-thumb { aspect-ratio: 16/9; border-radius: var(--radius-md); }
.skeleton-line { height: 12px; border-radius: 6px; }
.skeleton-line--60 { width: 60%; }
.skeleton-line--40 { width: 40%; }
.skeleton-body { display: flex; gap: 12px; }
.skeleton-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }

/* ===== WATCH MODAL (player teatro) ===== */

.watch-modal { display: flex; flex-direction: column; max-height: 88vh; }

@media (min-width: 900px) {
  .watch-modal { flex-direction: row; max-height: 82vh; }
}

.watch-modal__player-col {
  flex: 1 1 62%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #000;
}

.watch-modal__video-wrap {
  position: relative;
  background: #000;
  width: 100%;
}

.watch-modal__video-wrap video {
  width: 100%;
  max-height: 60vh;
  display: block;
  background: #000;
}

@media (min-width: 900px) {
  .watch-modal__video-wrap video { max-height: 82vh; }
}

.watch-modal__details { padding: 18px 22px; overflow-y: auto; }

.watch-modal__title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 10px; line-height: 1.4; }

.watch-modal__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 14px;
}

.watch-modal__author { display: flex; align-items: center; gap: 10px; }

.watch-modal__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #06131f;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.watch-modal__author-name { font-size: 14px; font-weight: 700; color: var(--text); }
.watch-modal__author-time { font-size: 12px; color: var(--text-faint); }

.watch-modal__actions { display: flex; gap: 8px; }

.action-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.action-btn:hover { background: var(--glass-bg-hover); transform: translateY(-1px); }
.action-btn svg { width: 16px; height: 16px; }

.action-btn--liked { color: var(--danger); border-color: rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.08); }
.action-btn--saved { color: var(--teal); border-color: rgba(95, 232, 198, 0.4); background: rgba(95, 232, 198, 0.08); }

.watch-modal__caption { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-bottom: 18px; white-space: pre-wrap; word-break: break-word; }

/* ===== COMMENTS ===== */

.comments__title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 14px; }

.comment-form { display: flex; gap: 10px; margin-bottom: 18px; }

.comment-form__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 13px;
  flex-shrink: 0;
}

.comment-form__fields { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.comment-list { display: flex; flex-direction: column; gap: 14px; }

.comment-item { display: flex; gap: 10px; }

.comment-item__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.comment-item__body { flex: 1; min-width: 0; }
.comment-item__head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 2px; }
.comment-item__author { font-size: 12.5px; font-weight: 700; color: var(--text); }
.comment-item__time { font-size: 11px; color: var(--text-faint); }
.comment-item__text { font-size: 13px; color: var(--text-dim); line-height: 1.5; word-break: break-word; }

.comments__empty { color: var(--text-faint); font-size: 12.5px; padding: 12px 0; }

/* ===== SIDEBAR (relacionados) ===== */

.watch-modal__side {
  flex: 1 1 38%;
  min-width: 0;
  border-left: 1px solid var(--glass-border);
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

@media (max-width: 899px) {
  .watch-modal__side { border-left: none; border-top: 1px solid var(--glass-border); max-height: 40vh; }
}

.related__title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 12px; }

.related-list { display: flex; flex-direction: column; gap: 12px; }

.related-item {
  display: flex;
  gap: 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 6px;
  transition: background 0.2s;
}

.related-item:hover { background: rgba(255, 255, 255, 0.05); }

.related-item__thumb {
  width: 120px;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  position: relative;
}

.related-item__thumb video { width: 100%; height: 100%; object-fit: cover; }

.related-item__info { min-width: 0; flex: 1; }
.related-item__title { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.related-item__meta { font-size: 11px; color: var(--text-faint); }

/* ===== UPLOAD MODAL ===== */

.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 26px 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-dim);
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 16px;
}

.file-drop:hover { border-color: var(--accent); background: rgba(94, 178, 255, 0.05); }
.file-drop svg { width: 30px; height: 30px; color: var(--text-faint); }
.file-drop.has-file { border-color: var(--teal); color: var(--teal); }

.progress-bar { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.progress-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--teal)); border-radius: 3px; transition: width 0.3s var(--ease); }

.login-hint { font-size: 12px; color: var(--text-faint); margin-top: 14px; text-align: center; }

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
  .vault-header__title { font-size: 28px; }
  .clips-grid { grid-template-columns: 1fr; }
  .vault-toolbar { flex-direction: column; align-items: stretch; }
  .vault-toolbar__right { justify-content: space-between; }
  .related-item__thumb { width: 96px; }
}
