/*
Theme Name:   NoirStream
Theme URI:    https://seudominio.com/noirstream
Author:       Seu Nome
Author URI:   https://seudominio.com
Description:  Video theme optimized for mobile and SEO, with black background
Version:      1.0
License:      GPLv2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  noirstream
Tags:         responsive, videos, seo, dark
*/

/* ==================================================
   Reset básico e tipografia
   ================================================== */
html, body, div, span, applet, object, iframe,
h2, h3, h4, h5, h6, p, blockquote, pre,
a, img, small, strike, strong, sub, sup,
var, b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: baseline;
}
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.4;
  background-color: #000;
  color: #fff;
}

/* ==================================================
   Container global
   ================================================== */
.container {
  width: 100%;
  max-width: 1600px; /* reduzido para alinhar largura do site com header */
  margin: 0 auto;
  padding: 0 20px;
}

/* --------------------------------------------------
   Index layout: sidebar + main grid
   -------------------------------------------------- */
.site-index-layout {
  max-width: 1600px; /* ampliado para tornar o conteúdo mais largo */
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
}

/* ==================================================
   Header
   ================================================== */
.site-header.container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.header-left {
  display: flex;
  align-items: center;
}
.site-title {
  font-size: 1.8rem;
  margin: 0;
  line-height: 1;
}
.site-title .title-red {
  color: red;
  margin-right: -2px; /* remove visual gap between parts */
}
.site-title .title-white {
  color: #fff;
}

/* Search form styling - horizontally centered in header */
.header-search {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 12px;
  width: 600px;
  max-width: 90vw;
}
.header-search form {
  position: relative;
  width: 100%;
}
.header-search input[type="search"] {
  width: 100%;
  padding: 8px 48px 8px 16px;
  border-radius: 20px;
  border: none;
  outline: none;
  font-size: 1rem;
}
.header-search button {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
}
.header-search button svg {
  fill: #e535ab;
  width: 24px;
  height: 24px;
}

/* Custom header subtext - inline in header */
.header-text {
  position: relative; /* volta ao fluxo do header */
  margin-left: 12px;  /* spacing next to search field */
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  z-index: 1;
}

/* Navigation dividers & links */
.nav-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin: 0.5rem 0;
}
.header-nav {
  text-align: center;
  flex: 1;
}
.header-nav-list {
  list-style: none;
  display: flex;
  gap: 3rem;
  padding: 0;
  margin: 0;
}
.header-nav-list li a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem; /* larger menu links */
  transition: color 0.2s ease;
}
.header-nav-list li a:hover {
  color: #e535ab;
}

/* Sidebar (Top Categories) */
.site-sidebar {
  width: 15%;
  padding: 10px;
}
.sidebar-title {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  font-weight: normal;
  display: flex;
  align-items: center;
}
.sidebar-title .sidebar-icon {
  margin-right: 6px;
  fill: red;
}
.sidebar-title .sidebar-text {
  color: red;
}
.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.category-list li {
  margin-bottom: 0.3rem;
}
.category-list a {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}
.category-list a:hover {
  color: #e535ab;
}
.view-more-cats {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #e535ab;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s ease;
}
.view-more-cats:hover {
  background: #d12f96;
}

/* Main Content: Video Grid */
.site-posts-grid {
  width: 85%;
  padding: 10px;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.video-item {
  background: #000;
  padding: 6px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
.video-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.video-thumb {
  position: relative;
  display: block;
}
.video-thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}
.video-thumb:hover img {
  transform: scale(1.05);
}
.video-thumb::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0);
  transition: background 0.3s ease;
}
.video-thumb:hover::after {
  background: rgba(0,0,0,0.5);
}
.video-thumb .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-size: 2rem;
  color: #fff;
}
.video-thumb:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.thumb-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  padding: 1px 3px;
  background: rgba(0,0,0,0.7);
  font-size: 0.75rem;
  border-radius: 2px;
  z-index: 2;
}
.video-title {
  margin: 4px 0 2px;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.2;
}
.video-title a {
  color: #fff;
  text-decoration: none;
}
.video-stats {
  font-size: 0.75rem;
  display: flex;
  gap: 6px;
}

/* Responsividade */
@media (max-width: 1280px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .site-index-layout {
    flex-direction: column;
  }
  .site-sidebar,
  .site-posts-grid {
    width: 100%;
    padding: 8px;
  }
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================================================
   Pagination Buttons
   ================================================== */
/* Center pagination container */
.nav-links, .pagination {
  text-align: center;
  margin: 2rem 0;
}

.page-numbers,
.page-numbers a {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  color: #fff;
  width: 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  margin: 0 6px;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.1rem;
  transition: background 0.2s ease;
}
.page-numbers.current {
  background: #e535ab;
}
.page-numbers:hover {
  background: rgba(229,53,171,0.8);
}
.page-numbers.dots {
  background: transparent;
  color: rgba(255,255,255,0.5);
}
/* Prev/Next rectangular buttons */
.page-numbers.prev,
.page-numbers.next {
  width: auto;
  padding: 0 20px;
  border-radius: 24px;
}

/* Hide heading "Paginação de posts" (screen-reader text) */
.pagination .screen-reader-text,
.nav-links .screen-reader-text {
  display: none;
}

.page-numbers,
.page-numbers a {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  color: #fff;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  margin: 0 6px;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.2s ease;
}
.page-numbers.current {
  background: #e535ab;
}
.page-numbers:hover {
  background: rgba(229,53,171,0.8);
}
.page-numbers.dots {
  background: transparent;
  color: rgba(255,255,255,0.5);
}

/* ==================================================
   Single Post Layout - CORRIGIDO
   ================================================== */
/* Layout principal para single posts - mantém a mesma estrutura da index */
.single .site-index-layout {
  max-width: 1600px; /* mesma largura máxima da index */
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px; /* mesmo gap da index */
}

/* Sidebar no single post - mantém a mesma largura da index */
.single .site-sidebar {
  width: 15%; /* mesma largura da index */
  padding: 10px; /* mesmo padding da index */
}

/* Conteúdo principal no single post - mantém a mesma largura da index */
.single .site-posts-grid {
  width: 85%; /* mesma largura da index */
  padding: 10px; /* mesmo padding da index */
}

/* Responsividade para single posts - igual à index */
@media (max-width: 768px) {
  .single .site-index-layout {
    flex-direction: column;
  }

  .single .site-sidebar,
  .single .site-posts-grid {
    width: 100%;
    padding: 8px;
  }
}

.single-video-embed iframe,
.single-video-embed video {
  width: 100%;
  height: auto;
  display: block;
}

.single-interaction-bar {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  background: #000;
}

.single-interaction-bar svg {
  fill: #fff;
}

.interaction-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.views-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  color: #fff;
}

.like-dislike {
  display: flex;
  gap: 12px;
}
.like-btn, .dislike-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 8px 22px;
  border-radius: 30px;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}
.like-btn:hover, .dislike-btn:hover {
  background: rgba(229,53,171,0.8);
}
.like-count, .dislike-count {
  background: rgba(0,0,0,0.4);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
}

.interaction-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-left: auto;
}
.report-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 8px 22px;
  border-radius: 30px;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}
.report-btn:hover {
  background: rgba(229,53,171,0.8);
}

.comments-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  color: #fff;
}

@media (max-width: 768px) {
  .single-interaction-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .interaction-left,
  .interaction-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* ==================================================
   Responsive Video Embed (Single Post)
   ================================================== */
.single-video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
}
.single-video-embed iframe,
.single-video-embed video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Thin divider line */
.section-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin: 24px 0;
}

/* Description */
.single-description {
  font-size: 1rem;
  line-height: 1.6;
  color: #ddd;
  margin-bottom: 24px;
}

/* Taxonomy chips */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.chip {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 4px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s ease;
}
.chip:hover {
  background: rgba(229,53,171,0.8);
}

/* Agrupamento de categorias e tags */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* Categoria: vermelho */
.cat-chip {
  background: red;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s ease;
}
.cat-chip:hover {
  background: #b30000;
}

/* Tag: fundo translúcido */
.tag-chip {
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s ease;
}
.tag-chip:hover {
  background: rgba(229,53,171,0.8);
}

/* ===============================
   Comentários - NoirStream
   =============================== */
.comments-area {
  background: #111;
  padding: 20px;
  border-radius: 12px;
  margin-top: 2rem;
  color: #fff;
}
.comments-title {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: red;
}
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment-list li.comment {
  margin-bottom: 1.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 1rem;
}
.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.comment-author .avatar {
  border-radius: 50%;
  width: 48px;
  height: 48px;
}
.comment-author .fn {
  font-weight: bold;
  font-size: 0.95rem;
}
.comment-meta {
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 8px;
}
.comment-content {
  font-size: 0.95rem;
  line-height: 1.5;
}
.comment-reply-link {
  font-size: 0.85rem;
  color: #e535ab;
}
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  background: #222;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 12px;
}
.submit-btn {
  background: red;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}
.submit-btn:hover {
  background: #c40000;
}
@media (max-width: 768px) {
  .comments-area {
    padding: 16px;
  }
  .submit-btn {
    width: 100%;
  }
}

/* ================================
   PÁGINA DE CATEGORIAS UNIFICADA
   ================================ */

.categories-archive {
  padding: 40px 20px;
  color: #fff;
  text-align: center;
}

.categories-archive .page-title {
  font-size: 2rem;
  margin-bottom: 30px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  justify-items: center;
}

.category-box {
  text-decoration: none;
  color: #fff;
  width: 100%;
  max-width: 300px;
  transition: transform 0.2s ease;
}
.category-box:hover {
  transform: scale(1.03);
}

/* Estilo padronizado da thumb */
.category-box img {
  width: 100%;
  height: 170px;               /* altura fixa para todas */
  object-fit: cover;           /* recorta sem distorcer */
  display: block;
  border-radius: 4px;
}

.category-info {
  padding: 8px 0;
  text-align: center;
}

.category-info h2 {
  font-size: 1rem;
  margin-bottom: 4px;
  font-weight: 500;
}

.category-info span {
  font-size: 0.85rem;
  color: #aaa;
}

/* ========================
   Tags A-Z Archive Layout
   ======================== */
.tags-archive.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

.tags-archive .page-title {
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: center;
  color: #fff;
}

/* Navegação alfabética no topo */
.tags-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  background: #1a1a1a;
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 30px;
  font-size: 1rem;
}
.tags-nav strong {
  color: red;
}
.tags-nav a {
  color: #fff;
  text-decoration: none;
}
.tags-nav a:hover {
  color: red;
}

/* Grid de colunas de tags */
.tags-columns {
  column-count: 4;
  column-gap: 40px;
}

.tags-columns section {
  break-inside: avoid;
  margin-bottom: 30px;
  display: inline-block;
  width: 100%;
}

.tags-columns section h2 {
  color: red;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.tags-columns ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.tags-columns li {
  margin-bottom: 6px;
}
.tags-columns li a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
}
.tags-columns li a:hover {
  color: #e535ab;
}

/* Responsivo: reduz número de colunas conforme o tamanho da tela */
@media (max-width: 1024px) {
  .tags-columns {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .tags-columns {
    column-count: 1;
  }

  .tags-nav {
    font-size: 0.9rem;
    gap: 6px;
  }
}

/* ===================
   Search Results Page
   =================== */

.search-results-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
  background: #000;
  color: #fff;
}

.search-header {
  text-align: center;
  margin-bottom: 30px;
}
.search-header h1 {
  font-size: 2rem;
  color: #fff;
}

/* Grid responsivo de resultados */
.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  align-items: start;
}

/* Cada resultado */
.search-item {
  background: #000;
  padding: 0;
  color: #fff;
  border: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Thumb */
.search-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* Título */
.search-item h2 {
  font-size: 1rem;
  margin: 8px 0 4px;
  color: #fff;
  text-align: center;
}

/* Meta (views, likes) */
.search-item .meta {
  font-size: 0.85rem;
  color: #aaa;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px;
}

.search-item .meta svg {
  vertical-align: middle;
  margin-right: 4px;
  fill: #aaa;
}

.search-item .meta span {
  display: inline-flex;
  align-items: center;
}

/* Links padrão */
a {
  color: #fff;
  text-decoration: none;
}
a:hover {
  color: #e535ab;
}

/* Responsivo */
@media (max-width: 768px) {
  .search-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .search-grid {
    grid-template-columns: 1fr;
  }
}

.like-btn.voted, .dislike-btn.voted {
  opacity: 0.6;
  pointer-events: none;
}

/* === Related Videos Section === */
#related-videos-container {
  margin-top: 2rem;
}
.related-title {
  font-size: 1.5rem;
  color: red;
  margin-bottom: 1rem;
  text-align: left;
}
.load-more-wrapper {
  text-align: center;
  margin-top: 1rem;
}
.load-more-btn {
  background: #e535ab;
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.load-more-btn:hover {
  background: #d12f96;
}
@media (max-width: 768px) {
  .load-more-btn {
    width: 100%;
  }
}

/* Estilos para vídeos relacionados */
.related-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #fff;
}

#related-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.video-item {
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.video-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.video-item:hover .video-thumbnail img {
  transform: scale(1.05);
}

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.video-info {
  padding: 1rem;
}

.video-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #888;
}

.stat-views,
.stat-likes {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.load-more-wrapper {
  text-align: center;
  margin-top: 2rem;
}

.load-more-btn {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.load-more-btn:hover:not(:disabled) {
  background: #b91c1c;
}

.load-more-btn:disabled {
  background: #666;
  cursor: not-allowed;
}

/* Responsivo */
@media (max-width: 768px) {
  #related-videos-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
  }
  
  .video-thumbnail {
    height: 140px;
  }
  
  .video-info {
    padding: 0.75rem;
  }
  
  .video-title {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  #related-videos-grid {
    grid-template-columns: 1fr;
  }
  
  .video-thumbnail {
    height: 180px;
  }
}

