/*
Theme Name: New Dev
Theme URI: https://github.com/newdev-theme
Author: New Dev
Description: Tema escuro para sites de anime, Layout completo com home, catálogo, página de anime, episódio e busca.
Version: 1.30.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newdev
Tags: dark, anime, streaming, entertainment, custom-menu, featured-images, post-thumbnails, custom-logo, responsive-layout
*/

/* ═══════════════════════════════════════════
   VARIÁVEIS / RESET
═══════════════════════════════════════════ */
:root {
  --bg:        #0d0f1a;
  --bg2:       #131625;
  --bg3:       #1a1e30;
  --bg4:       #222640;
  --bg5:       #2a2f4a;
  --accent:    #00d4ff;
  --accent2:   #a855f7;
  --red:       #e63946;
  --gold:      #f59e0b;
  --text:      #e8eaf6;
  --text2:     #8b92b8;
  --text3:     #4a5080;
  --border:    rgba(255,255,255,.07);
  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 4px 24px rgba(0,0,0,.5);
  --glow:      0 0 20px rgba(0,212,255,.15);
  --font:      'Rajdhani', 'Segoe UI', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

/* Força fundo escuro — sobrepõe qualquer estilo do WordPress */
html,
body,
body.wp-core-ui,
body.customize-support,
#page,
#content,
#main,
.site,
.site-content,
.wrap {
  background: var(--bg) !important;
  color: var(--text) !important;
}

body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Remove margens e paddings que o WP injeta */
.entry-content,
.entry-header,
.entry-footer,
.post-thumbnail,
.wp-block-group,
.wp-block-cover,
.wp-site-blocks,
.wp-block-template-part {
  all: unset !important;
}

/* Corrige fundo branco do container do WP em alguns temas */
#page { background: var(--bg) !important; }
.page-content, .entry-content { background: transparent !important; color: var(--text) !important; }

/* Remove barra de admin spacing */
html { margin-top: 0 !important; }
#wpadminbar { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }

/* Esconde widgets de chat de terceiros */
#crisp-chatbox,
.crisp-client,
iframe[src*="crisp"],
iframe[src*="tawk"],
iframe[src*="intercom"],
iframe[src*="zendesk"],
iframe[src*="drift"],
iframe[src*="freshchat"],
iframe[src*="chat"],
#tawkchat-minified-wrapper,
#tawkchat-container,
.intercom-lightweight-app,
#hubspot-messages-iframe-container,
[id*="crisp"],
[class*="crisp"],
[id*="tawk"],
[class*="tawk"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ═══════════════════════════════════════════
   LAYOUT BASE
═══════════════════════════════════════════ */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.main-content { flex: 1; padding: 30px 0; }

/* ═══════════════════════════════════════════
   HEADER / NAVBAR
═══════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13,15,26,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 60px;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 60px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.site-logo img { height: 36px; width: auto; }
.site-logo .logo-text {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Nav */
.main-nav { flex: 1; }
.main-nav .nav-list { display: flex; align-items: center; gap: 4px; }
.main-nav .nav-list li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--text2);
  border-radius: 8px;
  transition: all .2s;
}
.main-nav .nav-list li a:hover,
.main-nav .nav-list li.current-menu-item a {
  background: rgba(0,212,255,.08);
  color: var(--accent);
}
.main-nav .nav-list li a .nav-icon { font-size: 16px; }

/* Search no header */
.header-search {
  position: relative;
  width: 220px;
  flex-shrink: 0;
  overflow: visible !important;
}
.header-search input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 36px 7px 14px;
  color: var(--text);
  font-size: 13px;
  transition: border-color .2s, box-shadow .2s;
}
.header-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,212,255,.1);
}
.header-search input::placeholder { color: var(--text3); }
.header-search .search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: var(--text3);
  font-size: 15px;
  transition: color .2s;
}
.header-search .search-btn:hover { color: var(--accent); }

/* Login btn */
.btn-login {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff !important;
  padding: 7px 16px;
  border-radius: 20px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  transition: opacity .2s, transform .2s;
  flex-shrink: 0;
  -webkit-text-fill-color: #fff;
}
.btn-login:hover { opacity: .85; transform: translateY(-1px); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  color: var(--text);
  font-size: 22px;
  padding: 4px;
}

/* ═══════════════════════════════════════════
   HERO / BANNER HOME
═══════════════════════════════════════════ */
.hero-section {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg2);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: .35;
}
.hero-overlay {
  display: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 20px;
  width: 100%;
  max-width: 700px;
}
.hero-logo { width: 220px; margin: 0 auto 24px; }
.hero-logo img { width: 100%; }
.hero-section { overflow: visible !important; }
.hero-content { overflow: visible !important; }
.hero-search-wrap {
  position: relative;
  max-width: 580px;
  margin: 0 auto 24px;
  overflow: visible !important;
}
.hero-search-wrap input {
  width: 100%;
  background: rgba(19,22,37,.9);
  border: 1px solid rgba(0,212,255,.3);
  border-radius: 30px;
  padding: 14px 56px 14px 22px;
  color: var(--text);
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.hero-search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,212,255,.12);
}
.hero-search-wrap input::placeholder { color: var(--text3); }
.hero-search-wrap form {
  position: relative;
}
.hero-search-wrap .search-submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, opacity .2s;
  z-index: 2;
}
.hero-search-wrap .search-submit:hover { transform: translateY(-50%) scale(1.08); opacity: .9; }

/* Alfabeto */
.alpha-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  background: rgba(19,22,37,.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  max-width: 720px;
  margin: 0 auto;
}
.alpha-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  transition: all .15s;
}

/* ═══════════════════════════════════════════
   CARDS DE ANIME
═══════════════════════════════════════════ */
.anime-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: transform .25s, border-color .25s, box-shadow .25s;
  cursor: pointer;
}
.anime-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,212,255,.35);
  box-shadow: 0 12px 32px rgba(0,0,0,.5), var(--glow);
}
.anime-card .card-thumb {
  position: relative;
  padding-top: 142%;
  overflow: hidden;
}
.anime-card .card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.anime-card:hover .card-thumb img { transform: scale(1.07); }
.anime-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 45%, rgba(10,11,20,.98));
  pointer-events: none;
}
.anime-card .card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  transition: background .2s;
}
.anime-card:hover .card-play { background: rgba(0,0,0,.35); }
.anime-card .play-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0,212,255,.85);
  color: #0d0f1a;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .2s, transform .2s;
}
.anime-card:hover .play-icon { opacity: 1; transform: scale(1); }
.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: .5px;
  z-index: 2;
}
.card-badge.dub { background: #e63946; color: #fff; }
.card-badge.leg { background: #0ea5e9; color: #fff; }
.card-badge.film { background: var(--gold); color: #0d0f1a; }
.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(10,11,20,.85);
  color: var(--gold);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
  z-index: 2;
}
.anime-card .card-body { padding: 10px; }
.anime-card .card-title {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  transition: color .2s;
}
.anime-card:hover .card-title { color: var(--accent); }
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text3);
}
.card-meta span { display: flex; align-items: center; gap: 3px; }

/* ═══════════════════════════════════════════
   GRIDS / SEÇÕES
═══════════════════════════════════════════ */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  margin-top: 20px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text);
}
.section-title .title-icon {
  width: 4px;
  height: 22px;
  background: linear-gradient(var(--accent), var(--accent2));
  border-radius: 2px;
  flex-shrink: 0;
}
.see-more {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding: 5px 14px;
  border: 1px solid rgba(0,212,255,.3);
  border-radius: 20px;
  transition: all .2s;
}
.see-more:hover {
  background: rgba(0,212,255,.1);
  color: var(--accent);
  border-color: var(--accent);
}
.content-section { margin-bottom: 40px; }

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
}
.sidebar { display: flex; flex-direction: column; gap: 24px; margin-top: 40px; }
.widget {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.widget-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
}
.widget-title .w-icon { font-size: 16px; }
.widget-body { padding: 14px 18px; }

/* Widget gêneros */
.genre-list { display: flex; flex-direction: column; gap: 2px; }
.genre-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text2);
  transition: all .15s;
}
.genre-list a:hover { background: var(--bg3); color: var(--text); }
.genre-list a .genre-count {
  font-size: 11px;
  color: var(--text3);
  background: var(--bg4);
  padding: 1px 7px;
  border-radius: 10px;
}

/* Widget recentes */
.recent-list { display: flex; flex-direction: column; gap: 10px; }
.recent-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.recent-item:last-child { border-bottom: none; padding-bottom: 0; }
.recent-thumb {
  width: 52px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg4);
}
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-info { flex: 1; min-width: 0; }
.recent-title {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  line-height: 1.35;
  transition: color .2s;
}
.recent-item:hover .recent-title { color: var(--accent); }
.recent-ep { font-size: 11px; color: var(--text3); }

/* ═══════════════════════════════════════════
   PÁGINA SINGLE ANIME
═══════════════════════════════════════════ */
.anime-single { }
.anime-hero {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
.anime-poster {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--bg3);
}
.anime-poster img { width: 100%; height: 100%; object-fit: cover; }
.anime-info { display: flex; flex-direction: column; gap: 14px; }
.anime-title-main {
  font-family: var(--font);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .5px;
  line-height: 1.2;
  color: var(--text);
}
.anime-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.anime-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg4);
  color: var(--text2);
  border: 1px solid var(--border);
}
.anime-badge.genre { background: rgba(0,212,255,.1); color: var(--accent); border-color: rgba(0,212,255,.25); }
.anime-badge.year { background: rgba(168,85,247,.1); color: var(--accent2); border-color: rgba(168,85,247,.25); }
.anime-badge.score { background: rgba(245,158,11,.1); color: var(--gold); border-color: rgba(245,158,11,.25); }
.anime-badge.views { background: rgba(0,212,255,.08); color: var(--text2); border-color: var(--border); }
.anime-synopsis { font-size: 14px; line-height: 1.7; color: var(--text2); }
.anime-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  transition: all .2s;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #0d0f1a; }
.btn-primary:hover { opacity: .85; transform: translateY(-1px); color: #0d0f1a; }
.btn-outline { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg4); color: var(--text); border-color: var(--text3); }
.btn-fav { background: rgba(230,57,70,.1); color: var(--red); border: 1px solid rgba(230,57,70,.25); }
.btn-fav:hover { background: rgba(230,57,70,.2); color: var(--red); }

/* Seletor de temporada */
.season-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.season-selector label { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--text2); letter-spacing: .5px; }
.season-selector select { background: var(--bg4); border: 1px solid var(--border); border-radius: 6px; padding: 5px 12px; color: var(--text); font-size: 13px; cursor: pointer; }
.btn-sort {
  width: 32px; height: 32px; border-radius: 6px; background: var(--bg4);
  border: 1px solid var(--border); color: var(--text2); font-size: 15px;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.btn-sort:hover { background: var(--bg5); color: var(--text); }

/* Lista de episódios */
.episodes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.ep-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 6px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); font-family: var(--font); font-size: 13px;
  font-weight: 700; color: var(--text2); transition: all .15s; text-align: center; gap: 3px;
}
.ep-btn:hover, .ep-btn.current { background: rgba(0,212,255,.12); border-color: var(--accent); color: var(--accent); }
.ep-btn .ep-num { font-size: 15px; }
.ep-btn .ep-label { font-size: 9px; font-weight: 600; letter-spacing: .5px; color: var(--text3); }

/* ═══════════════════════════════════════════
   PÁGINA DO EPISÓDIO / PLAYER
═══════════════════════════════════════════ */
.player-section { margin-bottom: 24px; }
.player-wrap {
  background: #000; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 16/9; position: relative; border: 1px solid var(--border);
}
.player-wrap iframe, .player-wrap video { width: 100%; height: 100%; border: none; display: block; }
.player-options-bar { display: flex; align-items: center; gap: 8px; padding: 12px 0; flex-wrap: wrap; }
.player-options-bar .bar-label { font-family: var(--font); font-size: 12px; font-weight: 700; color: var(--text3); letter-spacing: .5px; text-transform: uppercase; }
.player-opt-btn {
  display: flex; align-items: center; gap: 6px; padding: 6px 14px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 20px;
  font-size: 12px; font-weight: 600; color: var(--text2); transition: all .15s;
}
.player-opt-btn:hover, .player-opt-btn.active { background: rgba(0,212,255,.12); border-color: var(--accent); color: var(--accent); }
.player-opt-btn .opt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text3); flex-shrink: 0; }
.player-opt-btn.active .opt-dot { background: var(--accent); }

/* Info do episódio */
.episode-info { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 20px; }
.ep-breadcrumb { font-size: 12px; color: var(--text3); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.ep-breadcrumb a { color: var(--text3); }
.ep-breadcrumb a:hover { color: var(--accent); }
.ep-title-main { font-family: var(--font); font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.ep-nav { display: flex; gap: 10px; margin-top: 14px; }

/* ═══════════════════════════════════════════
   EPISÓDIOS RECENTES (HOME)
═══════════════════════════════════════════ */
.recent-episodes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ep-card {
  display: flex; gap: 12px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px; transition: all .2s; align-items: flex-start;
}
.ep-card:hover { background: var(--bg3); border-color: rgba(0,212,255,.2); }
.ep-card .ep-thumb { width: 64px; height: 86px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: var(--bg4); }
.ep-card .ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-card .ep-info { flex: 1; min-width: 0; }
.ep-card .ep-anime {
  font-family: var(--font); font-size: 12px; font-weight: 700; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 5px; line-height: 1.35; transition: color .2s;
}
.ep-card:hover .ep-anime { color: var(--accent); }
.ep-card .ep-number { font-size: 11px; color: var(--text3); display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.ep-card .ep-type { display: inline-block; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 4px; background: rgba(0,212,255,.12); color: var(--accent); letter-spacing: .5px; }

/* ═══════════════════════════════════════════
   COMUNIDADE / REDES SOCIAIS
═══════════════════════════════════════════ */
.community-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 32px; text-align: center; }
.community-title { font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text3); margin-bottom: 16px; }
.social-btns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.social-btn { display: flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 8px; font-family: var(--font); font-size: 13px; font-weight: 700; letter-spacing: .5px; color: #fff; transition: all .2s; }
.social-btn:hover { transform: translateY(-2px); opacity: .9; color: #fff; }
.social-btn.discord { background: #5865f2; }
.social-btn.telegram { background: #26a5e4; }
.social-btn.youtube { background: #ff0000; }
.social-btn.twitter { background: #1da1f2; }

/* ═══════════════════════════════════════════
   PAGINAÇÃO
═══════════════════════════════════════════ */
.pagination { display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 32px; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; font-family: var(--font); font-size: 13px; font-weight: 700; background: var(--bg2); border: 1px solid var(--border); color: var(--text2); transition: all .15s; }
.pagination .page-numbers:hover, .pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #0d0f1a; }
.pagination .prev, .pagination .next { width: auto; padding: 0 12px; }

/* ═══════════════════════════════════════════
   BUSCA
═══════════════════════════════════════════ */
.search-header { margin-bottom: 24px; }
.search-header h1 { font-family: var(--font); font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.search-header p { color: var(--text2); font-size: 14px; }
.search-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-btn { padding: 6px 16px; border-radius: 20px; font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .5px; background: var(--bg2); border: 1px solid var(--border); color: var(--text2); transition: all .15s; }
.filter-btn:hover, .filter-btn.active { background: rgba(0,212,255,.1); border-color: var(--accent); color: var(--accent); }

/* ═══════════════════════════════════════════
   CALENDÁRIO
═══════════════════════════════════════════ */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.calendar-day { }
.calendar-day-title { font-family: var(--font); font-size: 13px; font-weight: 800; letter-spacing: .5px; color: var(--accent); text-transform: uppercase; padding: 10px 0; border-bottom: 2px solid rgba(0,212,255,.25); margin-bottom: 12px; }
.calendar-anime-item { display: flex; gap: 8px; padding: 7px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; transition: all .15s; }
.calendar-anime-item:hover { border-color: rgba(0,212,255,.25); background: var(--bg3); }
.calendar-thumb { width: 36px; height: 50px; border-radius: 5px; overflow: hidden; flex-shrink: 0; background: var(--bg4); }
.calendar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.calendar-info { flex: 1; min-width: 0; }
.calendar-title { font-size: 11px; font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 3px; line-height: 1.3; }
.calendar-ep { font-size: 10px; color: var(--text3); }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.site-footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 40px 0 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-brand .footer-logo { font-family: var(--font); font-size: 22px; font-weight: 700; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 10px; }
.footer-brand p { font-size: 13px; color: var(--text3); line-height: 1.6; }
.footer-col h4 { font-family: var(--font); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text2); margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: var(--text3); transition: color .15s; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom { padding-top: 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-bottom p { font-size: 12px; color: var(--text3); }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 32px; height: 32px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--border); color: var(--text3); font-size: 15px; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: #0d0f1a; }

/* ═══════════════════════════════════════════
   UTILITÁRIOS
═══════════════════════════════════════════ */
.loading-spinner { width: 40px; height: 40px; border: 3px solid var(--bg4); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text3); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-family: var(--font); font-size: 18px; font-weight: 700; color: var(--text2); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }
.skeleton { background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.tag-leg { background: rgba(0,212,255,.12); color: var(--accent); }
.tag-dub { background: rgba(230,57,70,.12); color: var(--red); }
.tag-hd { background: rgba(245,158,11,.12); color: var(--gold); }

/* ═══════════════════════════════════════════
   RESPONSIVO
═══════════════════════════════════════════ */

@media (max-width: 1024px) {
  .content-with-sidebar { grid-template-columns: 1fr 240px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .calendar-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {

  /* HEADER */
  .site-header { height: 56px; }
  .header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 14px; gap: 10px; }
  .site-logo { flex: 1; }
  .site-logo .logo-text { font-size: 18px; }
  .main-nav { display: none; }
  .header-search { display: none; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: rgba(255,255,255,.06); border-radius: 8px; font-size: 20px; flex-shrink: 0; }
  .btn-login { padding: 6px 12px; font-size: 12px; flex-shrink: 0; }

  /* LAYOUT */
  .container { padding: 0 12px; }
  .content-with-sidebar { grid-template-columns: 1fr; overflow: hidden; width: 100%; }
  .content-main { min-width: 0; width: 100%; overflow: hidden; }

  /* HOME — SEÇÕES */
  section.content-section { }
  .content-section { margin-bottom: 28px; }
  .section-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px }
  .section-title { font-size: 17px; flex: 1; min-width: 0; }
  .see-more { white-space: nowrap; font-size: 12px; padding: 4px 10px; flex-shrink: 0; }

  /* HERO */
  .hero-section { min-height: 340px; padding: 20px 0 14px; }
  .hero-content { padding: 20px 14px; }
  .hero-logo { width: 140px; margin-bottom: 14px; }
  .hero-search-wrap input { padding: 12px 50px 12px 18px; font-size: 14px; }

@media (max-width: 480px) {
  .site-logo .logo-text { font-size: 15px; }
  .hero-section { min-height: 280px; }
  .hero-logo { width: 120px; }

/* Mobile nav aberto */
.main-nav.open {
  display: block;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: rgba(13,15,26,.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 8px 0 16px;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
}
.main-nav.open .nav-list {
  flex-direction: column;
  padding: 0 16px;
  gap: 10px;
}
.main-nav.open .nav-list li a {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.main-nav.open .nav-list li a:hover,
.main-nav.open .nav-list li.current-menu-item a {
  background: rgba(0,212,255,.1);
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   PLAYER ENGINE
═══════════════════════════════════════════ */
.player-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}
.player-wrap iframe, .player-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-options-bar {
  display: flex; align-items: center; gap: 8px; background: var(--bg2);
  border: 1px solid var(--border); border-top: none; padding: 10px 14px;
  border-radius: 0 0 10px 10px; flex-wrap: wrap; min-height: 46px;
}
.bar-label { font-size: 11px; color: var(--text3); font-weight: 600; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.player-opt-btn { display: inline-flex; align-items: center; gap: 5px; background: var(--bg3); border: 1px solid var(--border); color: var(--text2); padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .15s; white-space: nowrap; }
.player-opt-btn:hover { border-color: var(--accent); color: var(--accent); }
.player-opt-btn.active { background: var(--accent); border-color: var(--accent); color: #0d0f1a; }
.opt-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.player-section { margin-bottom: 24px; }


/* ═══════════════════════════════════════════
   ANIME HERO BLOCK — Desktop base
═══════════════════════════════════════════ */
.anime-hero-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  margin-bottom: 24px;
  align-items: start;
}
.anime-hero-block > div:first-child {
  max-width: 130px;
}

/* ═══════════════════════════════════════════
   ANIME CONTENT GRID — Desktop base
═══════════════════════════════════════════ */
.anime-content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.anime-hero { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: start; }
.anime-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ═══════════════════════════════════════════
   MOBILE — Anime Page Layout
   Ordem: Poster → Info → Episódios → Similares
   DEVE VIR POR ÚLTIMO no arquivo
═══════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Hero: flex coluna — poster em cima, info embaixo */
  .anime-hero-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    gap: 14px;
    margin-bottom: 16px;
  }
  .anime-hero-block > div:first-child {
    width: 160px;
    flex-shrink: 0;
  }
  .anime-hero-block > div:last-child {
    width: 100%;
    text-align: center;
  }
  .anime-hero-block h1,
  .anime-hero-block .anime-title-main {
    font-size: 20px !important;
    text-align: center;
  }
  .anime-hero-block .anime-badges {
    justify-content: center;
  }
  .anime-hero-block .anime-actions {
    justify-content: center;
  }

  /* Content grid: flex coluna — eps depois similares */
  .anime-content-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }
  .anime-content-grid > div:first-child {
    width: 100%;
    order: 1;
  }
  .anime-content-grid > aside {
    width: 100%;
    order: 2;
    display: block;
  }
}

@media (max-width: 480px) {
  .anime-hero-block > div:first-child {
    width: 140px;
  }
  .anime-hero-block h1,
  .anime-hero-block .anime-title-main {
    font-size: 18px !important;
  }
}

/* ═══════════════════════════════════════════
   ANIME POSTER WRAP — responsivo
═══════════════════════════════════════════ */
.anime-poster-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--bg4);
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  flex-shrink: 0;
}
.anime-poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Desktop: poster 200px à esquerda, info à direita */
@media (min-width: 769px) {
  .anime-hero-block {
    display: grid !important;
    grid-template-columns: 200px 1fr !important;
    gap: 28px !important;
    align-items: start !important;
    flex-direction: unset !important;
  }
  .anime-poster-wrap {
    width: 200px !important;
    max-width: 200px !important;
  }
}

/* Mobile: poster centralizado em cima, info embaixo */
@media (max-width: 768px) {
  .anime-poster-wrap {
    width: 160px !important;
    max-width: 160px !important;
    margin: 0 auto;
  }
}
