:root{
  --bg: #0a0e1a;
  --bg-elevated: #10162a;
  --bg-card: #131a30;
  --border: #232b45;
  --text: #eef1fb;
  --text-muted: #8b93ac;
  --accent: #6d6bf7;
  --accent-hover: #5b59e6;
  --accent-soft: rgba(109,107,247,.15);
  --gold: #f5c451;
  --danger: #ef5a6f;
  --success: #4fd1a5;
  --radius: 12px;
  --radius-lg: 18px;
  font-size: 15px;
}
*{ box-sizing: border-box; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height:100vh;
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
button, input, textarea, select{ font-family:inherit; }

.layout{ display:flex; min-height:100vh; }

/* --- Sidebar --- */
.sidebar{
  width: 236px;
  flex-shrink:0;
  background: var(--bg-elevated);
  border-right:1px solid var(--border);
  padding: 20px 14px;
  display:flex;
  flex-direction:column;
  gap: 22px;
  position: sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
  scrollbar-width:thin;
}
.sidebar::-webkit-scrollbar{ width:5px; }
.sidebar::-webkit-scrollbar-thumb{ background:var(--border); border-radius:999px; }
.brand{ display:flex; align-items:center; gap:10px; padding:0 8px; font-size:19px; font-weight:700; }
.brand .logo-mark{
  width:30px; height:30px; border-radius:9px;
  background: linear-gradient(135deg, var(--accent), #9b6bf7);
  display:flex; align-items:center; justify-content:center; font-size:16px;
}
.nav{ display:flex; flex-direction:column; gap:2px; }
.nav a{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px; border-radius: var(--radius);
  color: var(--text-muted); font-size:14.5px; font-weight:500;
}
.nav a:hover{ background: var(--bg-card); color: var(--text); }
.nav a.active{ background: var(--accent-soft); color: var(--accent); }
.nav-section-label{ font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:#5b6483; margin:10px 0 2px 12px; }

.vip-card{
  margin-top:auto;
  background: linear-gradient(160deg, #1b1440, #241a54);
  border:1px solid #362a7a;
  border-radius: var(--radius-lg);
  padding:16px;
}
.vip-card h4{ margin:8px 0 4px; font-size:14px; }
.vip-card p{ margin:0 0 12px; font-size:12.5px; color:var(--text-muted); line-height:1.4; }

/* --- Topbar --- */
.topbar{
  display:flex; align-items:center; gap:16px;
  padding:14px 26px; border-bottom:1px solid var(--border);
  background: var(--bg);
  position:sticky; top:0; z-index:5;
}
.search-box{
  flex:1; max-width:520px; display:flex; align-items:center; gap:8px;
  background: var(--bg-card); border:1px solid var(--border);
  border-radius:999px; padding:9px 16px; color: var(--text-muted);
}
.search-box input{ background:none; border:none; outline:none; color:var(--text); width:100%; font-size:14px; }
.search-suggestions{
  position:absolute; top:calc(100% + 8px); left:0; right:0;
  background:var(--bg-card); border:1px solid var(--border); border-radius:14px;
  overflow:hidden; z-index:60; box-shadow:0 12px 32px rgba(0,0,0,.45); max-height:360px; overflow-y:auto;
}
.search-suggestion-item{ display:flex; gap:10px; align-items:center; padding:9px 14px; border-bottom:1px solid var(--border); color:var(--text); }
.search-suggestion-item:last-child{ border-bottom:none; }
.search-suggestion-item:hover{ background:var(--accent-soft); }
.search-suggestion-item img{ width:34px; height:48px; object-fit:cover; border-radius:5px; flex-shrink:0; }
.search-suggestion-item .titulo{ font-size:13.5px; }
.search-suggestion-item .tipo{ font-size:11px; color:var(--text-muted); }
.topbar-right{ display:flex; align-items:center; gap:16px; margin-left:auto; }
.icon-btn{
  width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background: var(--bg-card); border:1px solid var(--border); color:var(--text-muted); position:relative; cursor:pointer;
}
.badge-dot{ position:absolute; top:-2px; right:-2px; background:var(--danger); color:#fff; font-size:10px; border-radius:999px; padding:1px 5px; }
.user-chip{ display:flex; align-items:center; gap:8px; cursor:pointer; }
.avatar{ width:34px; height:34px; border-radius:50%; object-fit:cover; background:var(--bg-card); border:1px solid var(--border); }

.content{ flex:1; padding: 26px; max-width: 98%; }

/* --- Cards / grids --- */
.card{ background: var(--bg-card); border:1px solid var(--border); border-radius: var(--radius-lg); padding:18px; }
.grid{ display:grid; gap:16px; }
.grid-5{ grid-template-columns: repeat(5, 1fr); }
.grid-6{ grid-template-columns: repeat(6, 1fr); }
/* Capas (pôsteres) sempre do mesmo tamanho, em qualquer página, independente da largura da tela */
.grid-posters{ grid-template-columns: repeat(auto-fill, 180px); justify-content:start; }
.grid-posters .poster-card{ width:180px; }
.grid-4{ grid-template-columns: repeat(4, 1fr); }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }

.poster-card{ border-radius: var(--radius); overflow:hidden; background:var(--bg-card); border:1px solid var(--border); }
.poster-card img{ aspect-ratio:2/3; object-fit:cover; width:100%; }
.poster-card .info{ padding:10px 12px; }
.poster-card .info h4{ margin:0 0 4px; font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.poster-card .info .meta{ font-size:12px; color:var(--text-muted); }

.pill{ display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:999px; background:var(--bg); border:1px solid var(--border); font-size:12px; color:var(--text-muted); }
.pill.accent{ background:var(--accent-soft); color:var(--accent); border-color:transparent; }
.pill.gold{ background:rgba(245,196,81,.15); color:var(--gold); border-color:transparent; }

.btn{ display:inline-flex; align-items:center; gap:8px; justify-content:center; padding:11px 18px; border-radius:10px; border:1px solid var(--border); background:var(--bg-card); color:var(--text); font-size:14px; font-weight:600; cursor:pointer; transition:.15s; }
.btn:hover{ filter:brightness(1.1); }
.btn-primary{ background:var(--accent); border-color:var(--accent); }
.btn-primary:hover{ background:var(--accent-hover); }
.btn-ghost{ background:transparent; }
.btn-sm{ padding:7px 12px; font-size:13px; }
.btn-danger{ background:var(--danger); border-color:var(--danger); }

.section-title{ display:flex; align-items:center; justify-content:space-between; margin:28px 0 14px; }
.section-title h3{ margin:0; font-size:17px; }
.section-title a{ font-size:13px; color:var(--accent); }

/* --- Progress bar --- */
.progress{ height:6px; border-radius:999px; background:var(--bg); overflow:hidden; }
.progress > div{ height:100%; background: linear-gradient(90deg, var(--accent), #9b6bf7); }

/* --- Forms --- */
.form-field{ display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.form-field label{ font-size:13px; color:var(--text-muted); }
.form-field input, .form-field textarea, .form-field select{
  background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:11px 13px; color:var(--text); outline:none; font-size:14px;
}
.form-field input:focus, .form-field textarea:focus{ border-color:var(--accent); }
.auth-shell{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.auth-card{ width:100%; max-width:400px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg); padding:32px; }

/* --- Comments (com badges ao lado, conforme referência) --- */
.comment{ display:flex; gap:12px; padding:14px 0; border-bottom:1px solid var(--border); }
.comment:last-child{ border-bottom:none; }
.comment .avatar{ width:38px; height:38px; }
.comment-body{ flex:1; }
.comment-header{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.comment-author{ font-weight:600; font-size:14px; }
.comment-time{ font-size:12px; color:var(--text-muted); }
.comment-badges{ display:flex; align-items:center; gap:4px; }
.comment-badges .mini-badge{
  width:18px; height:18px; border-radius:5px;
  display:flex; align-items:center; justify-content:center; font-size:10px;
  background: var(--accent-soft); color: var(--accent); border:1px solid rgba(109,107,247,.3);
}
.comment-badges .mini-badge[data-rarity="lendario"]{ background: rgba(245,196,81,.18); color:var(--gold); border-color: rgba(245,196,81,.35); }
.comment-badges .mini-badge[data-rarity="epico"]{ background: rgba(155,107,247,.18); color:#b79bff; border-color: rgba(155,107,247,.35); }
.comment-text{ margin:6px 0 0; font-size:14px; line-height:1.5; color:#d6dbf0; }
.comment-actions{ display:flex; gap:14px; margin-top:8px; font-size:12.5px; color:var(--text-muted); }
.comment-actions span:hover{ color:var(--text); text-decoration:underline; }

/* --- Reader (mangá) --- */
.reader-page{ background:#000; display:flex; justify-content:center; padding:12px 0; }
.reader-page img{ max-width:720px; width:100%; }

.empty-state{ text-align:center; padding:60px 20px; color:var(--text-muted); }

/* --- Layout de página com coluna lateral (ex: início) --- */
.page-with-side{ 
  display: flex;
  flex-direction: row-reverse;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
} 
.page-main{ 
  flex: 1;
  min-width: 0; 
}
.page-side{ 
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.secao-largura-total{ width: 100%; }

@media (max-width: 1200px){ 
  .page-side{ display: none; } 
}

/* Layout simples de 2 colunas (perfil, anime, etc.) — sem o truque de float da home,
   que só faz sentido quando existe uma seção depois que precisa "escapar" pra largura total. */
.duas-colunas{ display:flex; gap:20px; align-items:flex-start; }
.duas-colunas .coluna-principal{ flex:1; min-width:0; }
.duas-colunas .coluna-lateral{ width:300px; flex-shrink:0; display:flex; flex-direction:column; gap:16px; }
@media (max-width:1100px){ .duas-colunas{ flex-direction:column; } .duas-colunas .coluna-lateral{ width:100%; } }
@media (max-width: 1200px){ .page-side{ display:none; } }

.progress-ring-label{ display:flex; justify-content:space-between; font-size:12px; color:var(--text-muted); margin-bottom:6px; }

/* --- Carrossel horizontal (ex: Continuar assistindo) --- */
.carousel-wrap{ position:relative; }
.carousel{ display:flex; gap:14px; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:4px; scrollbar-width:thin; }
.carousel::-webkit-scrollbar{ height:6px; }
.carousel::-webkit-scrollbar-thumb{ background:var(--border); border-radius:999px; }
.carousel-nav{ width:32px; height:32px; border-radius:50%; background:var(--bg-card); border:1px solid var(--border); color:var(--text); display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; }
.carousel-nav:hover{ background:var(--accent-soft); color:var(--accent); }

.thumb-card{ flex:0 0 240px; scroll-snap-align:start; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.thumb-card .thumb-img-wrap{ position:relative; }
.thumb-card img{ width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.thumb-card .thumb-progress{ position:absolute; left:0; right:0; bottom:0; height:4px; background:rgba(255,255,255,.25); }
.thumb-card .thumb-progress > div{ height:100%; background:var(--accent); }
.thumb-card .thumb-ep-badge{ position:absolute; top:6px; right:6px; background:rgba(10,14,26,.85); font-size:11px; padding:2px 7px; border-radius:6px; }
.thumb-card .info{ padding:9px 11px; }
.thumb-card .info h4{ margin:0 0 3px; font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.thumb-card .info .meta{ font-size:11.5px; color:var(--text-muted); }
.carousel .poster-card{ flex:0 0 180px; scroll-snap-align:start; }

/* --- Chat --- */
.chat-shell{ display:flex; gap:16px; height:calc(100vh - 120px); }
.chat-canais{ width:220px; flex-shrink:0; overflow-y:auto; }
.chat-canal-item{ display:flex; align-items:center; gap:8px; padding:9px 12px; border-radius:10px; color:var(--text-muted); font-size:13.5px; cursor:pointer; }
.chat-canal-item:hover{ background:var(--bg-card); color:var(--text); }
.chat-canal-item.ativo{ background:var(--accent-soft); color:var(--accent); font-weight:600; }
.chat-canal-item .contagem{ margin-left:auto; font-size:11px; color:var(--text-muted); }
.chat-principal{ flex:1; display:flex; flex-direction:column; min-width:0; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; }
.chat-banner{
  padding:18px 22px; border-bottom:1px solid var(--border);
  background: linear-gradient(120deg, rgba(109,107,247,.18), rgba(155,107,247,.08));
}
.chat-banner h2{ margin:0 0 4px; font-size:19px; display:flex; align-items:center; gap:8px; }
.chat-banner p{ margin:0; font-size:13px; color:var(--text-muted); }
.chat-mensagens{ flex:1; overflow-y:auto; padding:16px 22px; display:flex; flex-direction:column; gap:2px; }
.chat-msg-grupo{ display:flex; gap:12px; padding:6px 0; }
.chat-msg-grupo .avatar{ width:38px; height:38px; margin-top:2px; }
.chat-msg-grupo .conteudo{ flex:1; min-width:0; }
.chat-msg-grupo .cabecalho{ display:flex; align-items:baseline; gap:8px; margin-bottom:2px; }
.chat-msg-grupo .autor{ font-weight:600; font-size:14px; }
.chat-msg-grupo .hora{ font-size:11px; color:var(--text-muted); }
.chat-msg-linha{ font-size:14px; line-height:1.5; color:#d6dbf0; word-break:break-word; }
.chat-msg-linha img{ max-width:260px; border-radius:10px; margin-top:6px; border:1px solid var(--border); }
.chat-composer{ display:flex; align-items:center; gap:8px; padding:14px 18px; border-top:1px solid var(--border); }
.chat-composer input[type="text"]{ flex:1; background:var(--bg); border:1px solid var(--border); border-radius:999px; padding:11px 16px; color:var(--text); outline:none; font-size:14px; }
.chat-composer .icon-btn{ background:var(--bg); }
.chat-lateral{ width:280px; flex-shrink:0; overflow-y:auto; }

/* --- Comunidade --- */
.com-layout{ display:grid; grid-template-columns:260px 1fr 300px; gap:20px; align-items:start; }
@media (max-width:1300px){ .com-layout{ grid-template-columns:1fr 300px; } .com-coluna-esq{ display:none; } }
@media (max-width:980px){ .com-layout{ grid-template-columns:1fr; } .com-coluna-dir{ display:none; } }
.com-banner{
  border-radius:var(--radius-lg); overflow:hidden; padding:20px; min-height:150px; display:flex; flex-direction:column; justify-content:flex-end;
  background: linear-gradient(0deg, rgba(10,14,26,.9), rgba(20,15,50,.4)), linear-gradient(135deg, #2a1f5c, #171233);
}
.com-banner h3{ margin:0 0 4px; font-size:18px; }
.com-banner p{ margin:0 0 12px; font-size:12.5px; color:var(--text-muted); }
.com-nav{ display:flex; flex-direction:column; gap:2px; margin-top:14px; }
.com-nav-item{ display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:10px; color:var(--text-muted); font-size:13.5px; cursor:pointer; }
.com-nav-item:hover{ background:var(--bg-card); color:var(--text); }
.com-nav-item.ativo{ background:var(--accent-soft); color:var(--accent); font-weight:600; }
.com-topico-item{ display:flex; justify-content:space-between; align-items:center; padding:7px 0; font-size:13px; color:var(--text-muted); cursor:pointer; }
.com-topico-item:hover{ color:var(--accent); }
.com-post{ margin-bottom:16px; }
.com-post-header{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.com-post-acoes{ display:flex; gap:20px; color:var(--text-muted); font-size:13px; margin-top:10px; }
.com-post-acoes span{ display:flex; align-items:center; gap:6px; cursor:pointer; }
.com-post-acoes span:hover{ color:var(--text); }
.com-post-acoes span.ativo{ color:var(--accent); }
.com-hashtags{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.com-tabs{ display:flex; gap:6px; margin-bottom:12px; }
.com-tabs button{ flex:1; }
.com-user-card{ display:flex; align-items:center; gap:10px; padding:8px 0; }
.com-user-card .info{ flex:1; min-width:0; }
.com-user-card .info strong{ display:block; font-size:13.5px; }
.com-user-card .info span{ font-size:11.5px; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:block; }

/* --- Perfil --- */
.perfil-banner{ height:220px; border-radius:var(--radius-lg); background-size:cover; background-position:center; position:relative; margin-bottom:56px; background-color:var(--bg-card); }
.perfil-avatar-wrap{ position:absolute; left:28px; bottom:-46px; }
.perfil-avatar-wrap img{ width:110px; height:110px; border-radius:50%; border:4px solid var(--bg); object-fit:cover; background:var(--bg-card); }
.perfil-avatar-wrap .coroa{ position:absolute; top:-6px; right:-2px; font-size:20px; }
.perfil-tabs{ display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:20px; overflow-x:auto; }
.perfil-tabs button{ padding:10px 16px; background:none; border:none; color:var(--text-muted); font-size:14px; font-weight:600; cursor:pointer; border-bottom:2px solid transparent; white-space:nowrap; }
.perfil-tabs button.ativo{ color:var(--accent); border-bottom-color:var(--accent); }
.perfil-mini-avatares{ display:flex; }
.perfil-mini-avatares img{ width:32px; height:32px; border-radius:50%; border:2px solid var(--bg-card); object-fit:cover; margin-left:-10px; }
.perfil-mini-avatares img:first-child{ margin-left:0; }
.perfil-info-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-top:14px; }
.perfil-info-grid div{ font-size:12.5px; }
.perfil-info-grid .rotulo{ color:var(--text-muted); display:block; margin-bottom:2px; }

/* --- Dropdown de status (Assistindo/Completo/Planejo/Abandonado/Favorito) --- */
.status-dropdown{ position:relative; display:inline-block; }
.status-menu{ position:absolute; top:calc(100% + 8px); left:0; background:var(--bg-card); border:1px solid var(--border); border-radius:12px; padding:6px; min-width:220px; z-index:60; box-shadow:0 12px 30px rgba(0,0,0,.45); }
.status-menu-item{ padding:10px 12px; border-radius:8px; font-size:13.5px; cursor:pointer; display:flex; align-items:center; gap:9px; color:var(--text); }
.status-menu-item:hover{ background:var(--bg); }
.status-menu-item.ativo{ background:var(--accent-soft); color:var(--accent); font-weight:600; }
.status-menu-divisor{ height:1px; background:var(--border); margin:5px 2px; }

/* --- Spoiler (conteúdo borrado até clicar) --- */
.spoiler-wrap{ position:relative; border-radius:10px; overflow:hidden; cursor:pointer; min-height:90px; }
.spoiler-wrap .spoiler-content{ filter: blur(14px); user-select:none; transition:.15s; min-height:90px; }
.spoiler-wrap.revelado .spoiler-content{ filter:none; user-select:auto; cursor:auto; }
.spoiler-overlay{
  position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px; background:rgba(10,14,26,.55); font-weight:600; font-size:13px; text-align:center; padding:10px;
}
.spoiler-wrap.revelado .spoiler-overlay{ display:none; }
.spoiler-tag{ background:var(--danger); color:#fff; padding:3px 10px; border-radius:999px; font-size:11px; letter-spacing:.03em; }

/* --- Lightbox (clicar na imagem abre grande) --- */
.yp-lightbox{ position:fixed; inset:0; background:rgba(0,0,0,.85); z-index:200; display:flex; align-items:center; justify-content:center; padding:32px; cursor:zoom-out; }
.yp-lightbox img{ max-width:100%; max-height:100%; border-radius:8px; box-shadow:0 10px 40px rgba(0,0,0,.5); }
.clicavel{ cursor:zoom-in; }

.mobile-menu-btn{ display:none; }

@media (max-width: 980px){
  .sidebar{
    position:fixed; top:0; left:-260px; width:236px; height:100vh; z-index:100;
    transition: left .2s ease; box-shadow: 4px 0 24px rgba(0,0,0,.4);
  }
  .sidebar.aberta{ left:0; }
  .sidebar-overlay{ display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:99; }
  .sidebar-overlay.ativo{ display:block; }
  .mobile-menu-btn{ display:flex; }
  .grid-5{ grid-template-columns: repeat(3,1fr); }
  .grid-6{ grid-template-columns: repeat(3,1fr); }
  .grid-4{ grid-template-columns: repeat(2,1fr); }
}

/* Efeito de hover no Avatar (Estilo YouTube) */
.avatar-editavel {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
}

.avatar-editavel .avatar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  border-radius: 50%;
  z-index: 2;
}

.avatar-editavel:hover .avatar-overlay {
  opacity: 1;
}

/* Efeito de hover no Banner de fundo */
.banner-editavel {
  cursor: pointer;
  position: relative;
}

.banner-editavel .banner-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  z-index: 2;
}

.banner-editavel:hover .banner-overlay {
  opacity: 1;
}

.avatar-editavel:hover .avatar-overlay {
    opacity: 1 !important;
  }
  .banner-editavel .banner-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 2;
  }
  .banner-editavel:hover .banner-overlay {
    opacity: 1;
  }

  /* Força o container do spoiler a se comportar como elemento de texto inline */
.spoiler-container, [data-spoiler] {
  display: inline !important;
  vertical-align: baseline;
}

/* Garante que o botão ou a caixa do spoiler fechado não quebrem a linha da frase */
.spoiler-wrap {
  display: inline-flex !important;
  align-items: center !important;
  vertical-align: baseline !important;
  min-height: unset !important;
  height: auto !important;
  padding: 0 4px !important;
  margin: 0 2px !important;
  border-radius: 4px !important;
  background: var(--bg-alt) !important;
  overflow: hidden !important;
  cursor: pointer !important;
  user-select: none !important;
  position: relative !important;
}

.spoiler-wrap .spoiler-content {
  filter: blur(4px);
  transition: filter 0.2s ease;
  color: transparent !important;
  display: inline-block !important;
  line-height: 1.2 !important;
}

.spoiler-wrap.revelado .spoiler-content {
  filter: none !important;
  color: var(--text) !important;
}

.spoiler-wrap .spoiler-overlay {
  height: 20px;
  position: absolute !important;
  inset: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--bg-alt) !important;
}

.spoiler-wrap.revelado .spoiler-overlay {
  display: none !important;
}

/* --- Spoiler Flexível para Textos e Imagens --- */
.spoiler-wrap {
  display: inline-flex !important;
  align-items: center !important;
  position: relative !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  cursor: pointer !important;
  background: var(--border) !important;
  vertical-align: middle !important;
  margin: 2px 4px !important;
  max-width: 100%;
}

.spoiler-wrap .spoiler-content {
  filter: blur(10px);
  user-select: none;
  transition: filter 0.2s ease;
  display: inline-flex !important;
  align-items: center;
}

/* Garante que imagens dentro do spoiler respeitem o limite do card */
.spoiler-wrap .spoiler-content img {
  max-width: 100%;
  max-height: 250px;
  display: block;
  border-radius: 4px;
}

.spoiler-wrap.revelado .spoiler-content {
  filter: none;
  user-select: auto;
  cursor: auto;
}

.spoiler-wrap .spoiler-overlay {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(10, 14, 26, 0.85) !important;
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
  z-index: 2;
}

.spoiler-wrap.revelado .spoiler-overlay {
  display: none !important;
}

.spoiler-wrap .spoiler-content {
    
  min-height: 25px !important;
}


/* =====================================================================
   RESPONSIVO — tablet e celular
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; }
.layout { overflow-x: clip; }
img, video, iframe, canvas { max-width: 100%; }
.mobile-only { display: none; }

/* --- tablet e abaixo: coluna lateral desce para baixo do conteúdo --- */
@media (max-width: 1200px) {
  .page-with-side { flex-direction: column-reverse; }
  .page-with-side .page-side {
    display: grid; width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}
@media (max-width: 1100px) {
  .duas-colunas { flex-direction: column; align-items: stretch; }
  .duas-colunas > * { min-width: 0; width: 100%; }
}

@media (max-width: 980px) {
  .content { padding: 18px 16px; max-width: 100%; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-3 > *, .grid-2 > * { grid-column: auto !important; }
  table { display: block; max-width: 100%; overflow-x: auto; }
  .section-title { flex-wrap: wrap; gap: 8px; }
  .status-menu { max-width: 90vw; }
}

/* --- celular --- */
@media (max-width: 640px) {
  :root { font-size: 14.5px; }
  .content { padding: 14px 12px 28px; }
  .card { padding: 14px; border-radius: 14px; }

  /* topo: só o essencial */
  .topbar { padding: 8px 10px; gap: 8px; }
  .search-box { padding: 8px 12px; min-width: 0; }
  .topbar-right { gap: 8px; }
  .user-chip > span:not(.moldura-avatar) { display: none; }
  .topbar #btn-sair { display: none; }
  .topbar-right .btn-sm { padding: 7px 10px; }
  .mobile-only { display: flex; }
  .topbar .notif-painel { position: fixed; left: 8px; right: 8px; top: 62px; width: auto; max-height: 70vh; }
  .search-suggestions { position: fixed; left: 8px; right: 8px; top: 62px; max-height: 65vh; }

  /* textos e botões fáceis de tocar */
  input, select, textarea { font-size: 16px !important; }   /* o iPhone não dá zoom ao digitar */
  .btn { min-height: 40px; }
  .btn-sm { min-height: 36px; }
  .content h1 { font-size: clamp(22px, 6.5vw, 30px) !important; }
  .content h2 { font-size: clamp(18px, 5.5vw, 24px); }

  /* coluna lateral da home (Sua jornada, Ranking, anúncio): oculta no celular */
  .page-with-side .page-side { display: none; }

  /* grades */
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .grid-posters { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
  .grid-posters .poster-card { width: auto; }
  .poster-card .info { padding: 8px 10px; }

  /* carrosséis: deslizar com o dedo */
  .carousel { gap: 10px; }
  .carousel .poster-card { flex-basis: 128px; }
  .thumb-card { flex-basis: 210px; }
  .carousel-nav { display: none; }

  /* capas dos cabeçalhos (anime, mangá, filme/série) */
  .content img[style*="width:200px"], .content img[style*="width: 200px"] { width: 130px !important; }
  .lightbox-fechar, .yp-lightbox { padding: 12px; }
}

/* telas pequenas */
@media (max-width: 380px) {
  .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .topbar-right .btn-sm.btn-primary { display: none; }
}

/* telas de toque: o que só aparecia ao passar o mouse fica sempre visível */
@media (hover: none) {
  .carousel-nav { display: none; }
}

/* --- chat no celular e tablet: canais viram uma faixa de "pílulas" no topo --- */
@media (max-width: 980px) {
  .chat-shell { flex-direction: column; gap: 10px; height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 420px; }
  .chat-canais { width: 100% !important; flex: 0 0 auto; display: flex; flex-direction: row; align-items: center; gap: 6px; overflow-x: auto; padding: 8px 10px; scrollbar-width: none; }
  .chat-canais::-webkit-scrollbar { display: none; }
  .chat-canais .nav-section-label, .chat-canais > div[style*="padding:10px 12px"] { display: none; }
  .chat-canais .chat-canal-item { flex: 0 0 auto; white-space: nowrap; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; }
  .chat-canais .chat-canal-item.ativo { border-color: var(--accent); }
  .chat-principal { flex: 1; min-height: 0; }
  .chat-banner { padding: 10px 14px; }
  .chat-banner p { display: none; }
  .chat-banner h2 { font-size: 16px; margin: 0; }
  .chat-mensagens { padding: 10px 12px; }
  .chat-msg-grupo { gap: 10px; }
  .chat-msg-grupo .conteudo { word-break: break-word; }
  .chat-composer { padding: 8px 10px; gap: 6px; }
  .chat-composer .icon-btn { width: 36px; height: 36px; flex-shrink: 0; }
  .chat-composer input[type="text"] { min-width: 0; padding: 10px 14px; }
}
