/* Fundo desfocado quando modal aberto */

body.modal-open .blur-background {
  filter: blur(6px);
  transition: filter 0.3s ease;
  background-color: #fff;
}

/* HEADER */
.nav-link.active {
    color: #fff;
    font-weight: bold;
}

.navbar-brand {
    width: 150px;
}

/* IMAGENS */
#coverZoom {
  animation: zoomIn 0.25s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* EDITORA */
.publisher-hero {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.publisher-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.6);
  transform: scale(1.2);
}

.publisher-content {
  position: relative;
  z-index: 2;
  padding-top: 40px;
  color: white;
}

.publisher-logo {
  height: 140px;
  cursor: pointer;
  transition: transform .3s;
}

.publisher-logo:hover {
  transform: scale(1.1);
}

#publisherDescription {
    line-height: 1.7;
    font-size: 1.05rem;
    white-space: pre-line;
}

/* QUADRINHOS */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.comic-card {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    text-align: center; 
    border: #ffffff solid 1px;
    transition: all .2s linear;
}

.comic-card:hover {
    border: #ffc720 solid 1px;
}

.comic-card img {
    width: 100%;
    object-fit: cover;
}

.comic-hero {
    position: relative;
    height: auto;
    color: #fff;
    overflow: hidden;
}

.comic-image {
    object-fit: cover;
    cursor: pointer;
}

.comic-bg {
    position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.6);
  transform: scale(1.2);
}

#comicCoverBg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: -1;
  filter: blur(12px) brightness(0.6);
  background-size: cover;
  background-position: center;
}

/* PERSONAGENS */
.character-hero {
    position: relative;
    height: 420px;
    color: #fff;
    overflow: hidden;
}

.character-bg {
    position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.6);
  transform: scale(1.2);
}

.character-content {
    position: relative;
  z-index: 2;
  padding-top: 40px;
  color: white;
}

.character-image {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fff;
    cursor: pointer;
}

#characterHistory {
    line-height: 1.7;
    font-size: 1.05rem;
    white-space: pre-line;
}

/* CRIADORES */
.creator-hero {
    position: relative;
    height: 420px;
    color: #fff;
    overflow: hidden;
}

.creator-bg {
    position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.6);
  transform: scale(1.2);
}

.creator-content {
    position: relative;
  z-index: 2;
  padding-top: 40px;
  color: white;
}

.creator-image {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fff;
    cursor: pointer;
}

#creatorBio {
    line-height: 1.7;
    font-size: 1.05rem;
    white-space: pre-line;
}

.c-image {
    width: 100%;
    height: 80%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fff;
    cursor: pointer;
}


/* SEARCH */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    max-height: 420px;
    overflow-y: auto;
    z-index: 9999;
}

.search-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border-bottom: solid 1px #eee;
    transition: all .5s;
}

.search-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.search-item:hover {
    background: #f5f5f5;
}

.search-title {
    padding: 8px 12px;
    font-weight: bold;
    background: #f0f0f0;
    margin: 0;
}

.search-empty {
    padding: 12px;
    text-align: center;
    color: #888;
}


/* PERIL DO USUÁRIO */
.profile-page {
    max-width: 800px;
    margin: 40px auto;
}

.profile-card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Container do avatar */
.profile-avatar {
    width: 185px;
    height: 185px;
    margin-bottom: 12px;
}

@media (max-width: 480px) {
    .profile-avatar {
        height: 200px;
    }
}

.profile-avatar img {
    width: 100%;
    height: 100%px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #eee;
}

.profile-avatar img:hover {
    border: 3px solid rgb(165, 165, 165);
    transition: all .5s;
}


/* Avatar clicável */
.clickable {
    cursor: pointer;
}

/* Modal */
.avatar-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* Imagem ampliada */
.avatar-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0,0,0,.5);
}

/* Botão fechar */
.avatar-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    user-select: none;
}

/* Máscara circular VISUAL */
.cropper-view-box,
.cropper-face {
    border-radius: 50%;
}

/* Escurece o fundo fora do círculo */
.cropper-modal {
    opacity: 0.6;
}

/* Evita scroll estranho durante o crop */
.cropper-container {
    max-width: 100% !important;
}

/* Área ativa maior para toque */
.cropper-face {
    cursor: move;
}

.profile-info {
    display: block;
}

.profile-info h2 {
    margin: 0 0 8px;
}

.profile-info .bio {
    margin-bottom: 12px;
    color: #555;
}

.favorites-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
}

.favorite-box{
    background:#f8f9fa;
    border-radius:8px;
    padding:10px;
}

.stats-cards{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
}

.stat-card{
    background:white;
    border-radius:10px;
    padding:20px;
    text-align:center;
    box-shadow:0 2px 6px rgba(0,0,0,0.08);
}

.stat-card h2{
    font-weight:700;
}

.stats-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:30px;
}

.stats-panel{
    background:white;
    border-radius:10px;
    padding:20px;
    box-shadow:0 2px 6px rgba(0,0,0,0.08);
}

.text-muted {
    font-size: 0.85rem;
    color: #999;
}

.edit-btn {
    margin-top: 5px;
    margin-left: 15px;
    padding: 5px 9px;
    border-radius: 6px;
    border: none;
    background: #222;
    color: #fff;
    cursor: pointer;
}

.edit-btn:hover {
    background: #000;
}

.auth-container {
    max-width: 400px;
    margin: 60px auto;
    padding: 32px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    text-align: center;
}

.auth-container h2 {
    margin-bottom: 24px;
}

.auth-container form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-container input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.auth-container button {
    padding: 10px;
    border-radius: 6px;
    border: none;
    background: #222;
    color: #fff;
    cursor: pointer;
}

.auth-container button:hover {
    background: #000;
}

.auth-link {
    margin-top: 16px;
    font-size: 0.9rem;
}

/* REVIEW */
.stars {
  font-size: 30px;
  cursor: pointer;
  color: #ccc;
  user-select: none;
}

.stars span {
  transition: color 0.2s;
}

.stars span.active {
  color: gold;
}

.stars-display {
  font-size: 20px;
  color: #ccc;
}

.stars-display .filled {
  color: gold;
}

.review {
  border-bottom: 1px solid #ddd;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

/* FOOTER */
.site-footer {
    background: #111;
    color: #ccc;
    padding: 30px 0;
    margin-top: 50px;
}

.site-footer a {
    color: #aaa;
    margin: 0 10px;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

/* EDITOR DE TEXTO */
.ql-container {
    height: 100px;
}


/* SÉRIES */
.series-navigation-container {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.series-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px;
  transition: all 0.2s ease;
  max-width: 85%;
}

.series-nav-btn:hover {
    color: #000;
  background: #f8f9fa;
  transform: translateY(-2px);
  text-decoration: none;
}

.series-nav-thumb {
  width: 60px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.series-nav-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .series-nav-btn {
    max-width: 100%;
    width: 100%;
  }
}

.comic-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-left: 8px;
  vertical-align: middle;
  transition: all 0.2s ease;
}

/* 🔥 Edição Única */
.comic-badge.one-shot {
  background: linear-gradient(135deg, #ff4d4d, #b30000);
  color: white;
  box-shadow: 0 2px 6px rgba(179, 0, 0, 0.3);
}

/* 📘 Annual */
.comic-badge.annual {
  background: linear-gradient(135deg, #1e90ff, #0047ab);
  color: white;
}

/* ⭐ Special */
.comic-badge.special {
  background: linear-gradient(135deg, #f4c430, #c49102);
  color: #222;
}

/* esconder */
.hidden {
  display: none;
}

/* =========================
   BOTÕES COLEÇÃO ANIMAÇÃO
========================= */

.collection-btn {
  transition: all 0.3s ease;
}

.collection-btn.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

.collection-btn.fade-in {
  opacity: 1;
  transform: scale(1);
}

.collection-btn.success-pulse {
  animation: pulseSuccess 0.4s ease;
}

@keyframes pulseSuccess {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.collection-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* SLIDER HOME */

/* =========================================
   FEATURED HERO (SLIDER PRINCIPAL)
========================================= */

.featured {
    position: relative;
    min-height: 600px;
    padding: 60px 0 40px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Fundo desfocado (backdrop) */
.featured-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    filter: blur(5px) brightness(0.65);

    opacity: 1;
    transition: opacity 0.6s ease, transform 0.8s ease;
}

/* Overlay escuro por cima do backdrop */
.featured-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at center,
        rgba(15, 23, 42, 0.3) 0%,
        rgba(15, 23, 42, 0.85) 70%,
        rgba(15, 23, 42, 1) 100%
    );
    z-index: 2;
}

/* efeito leve de troca */
.featured.is-changing .featured-backdrop {
    opacity: 0.35;
    transform: scale(1.12);
}

/* Conteúdo acima do fundo */
.featured .container {
    position: relative;
    z-index: 3;
}

/* CAPA DO QUADRINHO */
.featured-cover {
    width: 100%;
    max-width: 260px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.featured-cover:hover {
    transform: scale(1.03);
}

.featured-cover.is-changing {
    opacity: 0;
    transform: scale(0.97);
}

/* META (ano, gênero etc) */
.featured-meta {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* TÍTULO */
.featured-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
}

/* DESCRIÇÃO */
.featured-description {
    font-size: 1.1rem;
    color: #cbd5e1;
    max-width: 650px;
}

/* BOTÕES */
.featured-buttons .btn {
    border-radius: 10px;
    font-weight: 600;
}

.featured-buttons .btn-warning {
    background: #facc15;
    border: none;
    color: #111827;
}

.featured-buttons .btn-warning:hover {
    background: #eab308;
}

/* =========================================
   THUMBNAILS + NAVEGAÇÃO
========================================= */

.featured-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* setas */
.featured-arrow {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.featured-arrow:hover {
    background: rgba(255,255,255,0.18);
    transform: scale(1.05);
}

/* container das thumbs */
.featured-thumbs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px;
    max-width: 70%;
    scrollbar-width: none;
}

.featured-thumbs::-webkit-scrollbar {
    display: none;
}

/* thumbnail individual */
.featured-thumb {
    width: 70px;
    height: 100px;
    flex: 0 0 auto;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
    opacity: 0.6;
}

.featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}

.featured-thumb.active {
    border-color: #facc15;
    opacity: 1;
}

/* =========================================
   RESPONSIVIDADE
========================================= */

@media (max-width: 992px) {
    .featured-title {
        font-size: 2.2rem;
        text-align: center;
    }

    .featured-description {
        text-align: center;
        margin: 0 auto;
    }

    .featured-buttons {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .featured-cover {
        max-width: 200px;
    }
}

@media (max-width: 576px) {
    .featured {
        padding: 40px 0;
        min-height: 520px;
    }

    .featured-thumbs {
        max-width: 100%;
    }

    .featured-arrow {
        width: 38px;
        height: 38px;
    }
}

.featured-backdrop {
    opacity: 1;
    transition: opacity 0.8s ease-in-out, background-image 0.8s ease-in-out;
}

.featured.fade-out {
    opacity: 0;
}

.featured.fade-in {
    opacity: 1;
}

/* animação leve na troca da capa */
.featured-cover {
    transition: opacity 0.4s ease, transform 0.3s ease;
}

.featured-cover.changing {
    opacity: 0;
    transform: scale(0.98);
}


/* HERO */
        .hero{
            position:relative;
            height:500px;
            display:flex;
            align-items:center;
            background-size:cover;
            background-position:center;
        }

        .hero-overlay{
            position:absolute;
            inset:0;
            background:linear-gradient(to top, #0f172a 10%, transparent 80%);
        }

        .hero-content{
            position:relative;
            z-index:2;
        }

        .hero-title{
            font-size:3rem;
            font-weight:bold;
        }

        /* CARDS */
        .comic-card-home{
            background:#1e293b;
            border:none;
            border-radius:12px;
            overflow:hidden;
            border: 1px solid #1e293b;
            transition: border .1s linear;
            cursor:pointer;
        }

        .comic-card-home:hover{
            
            border: 1px solid #fbbf24;       
            box-shadow:0 5px 5px rgba(0,0,0,0.5);
        }

        .comic-cover{

            height:260px;
            object-fit:cover;
        }

        .section-title{

            font-size:1.6rem;
            font-weight:bold;
            margin-bottom:20px;

        }

        .horizontal-scroll{

            display:flex;
            gap:15px;
            overflow-x:auto;
            padding-bottom:10px;

        }

        .horizontal-scroll::-webkit-scrollbar{
            height:8px;
        }

        .horizontal-scroll::-webkit-scrollbar-thumb{
            background:#334155;
            border-radius:10px;
        }

        .rating{

            color:#fbbf24;
            font-weight:bold;
        }

.rating-badge {

    position: absolute;
    top: 8px;
    right: 8px;

    background: rgba(0,0,0,0.85);
    color: #FFD700;

    font-weight: bold;
    font-size: 0.85rem;

    padding: 4px 8px;
    border-radius: 6px;

    backdrop-filter: blur(4px);

}

.rating-circle {

    position: absolute;
    top: 66%;
    right: 8px;

    width: 42px;
    height: 42px;

    background: #081c22;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

}

.rating-circle svg {

    width: 42px;
    height: 42px;
    transform: rotate(-90deg);

}

.circle-bg {

    fill: none;
    stroke: #204529;
    stroke-width: 3;

}

.circle-progress {

    fill: none;
    stroke-width: 3;
    stroke-linecap: round;

}

.circle-text {

    position: absolute;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;

}

/* GRÁFICOS */
.chart-container {
      width: 100%;
      margin-bottom: 60px;
      background: white;
      padding: 20px;
      border-radius: 10px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

.rank-chart{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.rank-item{
    display:flex;
    align-items:center;
    gap:10px;
}

.rank-avatar{
    width:32px;
    height:32px;
    border-radius:50%;
    object-fit:cover;
}

.rank-label{
    width:140px;
    font-size:14px;
}

.rank-bar-container{
    flex:1;
    height:14px;
    background:#eee;
    border-radius:6px;
    overflow:hidden;
}

.rank-bar{
    height:100%;
    background:#3b82f6;
    width:0%;
    border-radius:6px;
    transition:width 0.8s ease;
}

.rank-value{
    width:30px;
    text-align:right;
    font-size:13px;
}

/* SINOPSE */
.comic-synopsis {
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
}

.synopsis-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 4;   /* número de linhas visíveis */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.synopsis-toggle {
    display: inline-block;
    margin-top: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0d6efd;
    cursor: pointer;
}

.synopsis-toggle:hover {
    text-decoration: underline;
}

/* CONTAINER */
.synopsis-box {
    position: relative;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ddd;
}

/* TEXTO */
.synopsis-text {
    max-height: 120px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease;
}

/* EXPANDIDO */
.synopsis-text.expanded {
    max-height: 1000px;
}

/* GRADIENTE FADE */
.synopsis-text::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    pointer-events: none;
}

/* REMOVE GRADIENTE QUANDO EXPANDIDO */
.synopsis-text.expanded::after {
    display: none;
}

/* BOTÃO */
.synopsis-toggle {
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fd7c0c;
    cursor: pointer;
    display: inline-block;
}

.synopsis-toggle:hover {
    color: #ffbb55;
    text-decoration: none;
}

.navbar-avatar{
    width:32px;
    height:32px;
    border-radius:50%;
    object-fit:cover;
    border:2px solid rgba(255,255,255,.25);
    flex-shrink:0;
}
