/* ─── Reset ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #1a1a1a;
  --bg2:       #242424;
  --bg3:       #2e2e2e;
  --bg4:       #333;
  --red:       #e50000;
  --red-hover: #ff1a1a;
  --text:      #f0f0f0;
  --muted:     #888;
  --border:    #333;
  --radius:    4px;
}

html { font-size: 15px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }

/* ─── Header ───────────────────────────────── */
header {
  background: #111;
  border-bottom: 2px solid var(--red);
}

.header-top {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;  /* adicione essa linha */
}
/* Logo estilo XVideos */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
}
.logo-x {
  background: var(--red);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 1.2rem;
  font-weight: 900;
  margin-right: 1px;
}
.logo-rest {
  color: #fff;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 1px;
}
.logo:hover .logo-x { background: var(--red-hover); }

/* Nav links */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--text);
  background: var(--bg3);
}

/* ─── Main ─────────────────────────────────── */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px;
  flex: 1;
  width: 100%;
}

/* ─── Page header ──────────────────────────── */
.page-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-size: 1.25rem;
  font-weight: bold;
}
.total-count {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ─── Grid de vídeos ───────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.video-card {
  background: var(--bg2);
  border: 1px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s;
  cursor: pointer;
}
.video-card:hover { border-color: var(--red); }

.card-thumb {
  position: relative;
  background: var(--bg3);
  aspect-ratio: 16/9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.video-card:hover .card-thumb img { transform: scale(1.04); }

.thumb-placeholder {
  font-size: 2.2rem;
  color: var(--red);
  opacity: .6;
}
.video-card:hover .thumb-placeholder { opacity: 1; }

.card-duration {
  position: absolute;
  bottom: 5px;
  right: 6px;
  background: rgba(0,0,0,.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 2px;
  z-index: 1;
}

.card-info { padding: 8px 8px 10px; }
.card-title {
  font-size: 0.85rem;
  font-weight: normal;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
  color: var(--text);
}
.video-card:hover .card-title { color: #fff; }

.card-meta {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--muted);
}
.card-rating { color: #f5a623; }

/* ─── Página de vídeo ──────────────────────── */
.video-page { max-width: 980px; margin: 0 auto; }

.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.player-wrap iframe { width: 100%; height: 100%; border: none; }

.video-title {
  font-size: 1.15rem;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.meta-row {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.meta-item.rating { color: #f5a623; font-weight: bold; }

/* ─── Tags ─────────────────────────────────── */
.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.tags-label {
  color: var(--muted);
  font-size: 0.82rem;
  margin-right: 4px;
}
.tag {
  background: var(--bg3);
  border: 1px solid var(--bg4);
  color: var(--text);
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 0.8rem;
  transition: background .15s, border-color .15s, color .15s;
}
.tag:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.tag-highlight { color: var(--red); }

/* ─── Tags cloud ───────────────────────────── */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
}
.tag-cloud { font-size: 0.88rem; }
.tag-count {
  background: var(--red);
  color: #fff;
  border-radius: 2px;
  padding: 1px 6px;
  font-size: 0.72rem;
  margin-left: 4px;
}

/* ─── Relacionados / Mais vídeos ───────────── */
.related-section {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
}
.related-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.related-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1rem;
  background: var(--red);
  border-radius: 2px;
}

/* ─── Paginação ────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.page-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 7px 18px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.88rem;
  transition: background .15s, border-color .15s;
}
.page-btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.page-info { color: var(--muted); font-size: 0.88rem; }

/* ─── Footer ───────────────────────────────── */
footer {
  background: #111;
  border-top: 1px solid var(--border);
  padding: 20px 16px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-logo { font-size: 1rem; }
.footer-copy { color: var(--muted); font-size: 0.8rem; }

/* ─── Responsivo ───────────────────────────── */
@media (max-width: 768px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .header-nav .nav-link { padding: 6px 8px; font-size: 0.82rem; }
  .logo-rest { display: none; }
}
@media (max-width: 480px) {
  .header-top { gap: 16px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .card-info { padding: 6px; }
  .card-title { font-size: 0.8rem; }
}
