
/* Estilos para o trailer */
.manga-trailer {
    margin: 30px 0;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 10px;
}

.trailer-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text);
    position: relative;
    padding-left: 30px;
}

.trailer-title:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23ff375f' stroke='%23ff375f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='5 3 19 12 5 21 5 3'%3E%3C/polygon%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.trailer-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Estilos para imagem de fundo */
.manga-header.has-background {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    border-radius: 10px;
    overflow: hidden;
    padding: 0;
    margin-bottom: 30px;
}

.manga-header-overlay {
    background: rgba(10, 10, 18, 0.85);
    backdrop-filter: blur(3px);
    padding: 30px;
    display: flex;
    gap: 30px;
}

.manga-header.has-background .manga-title {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.manga-header.has-background .manga-cover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.manga-header.has-background .manga-tag {
    background-color: rgba(30, 30, 480,0,0.7);
}

.manga-header.has-background .manga-tag {
    background-color: rgba(30, 30, 48, 0.8);
    backdrop-filter: blur(5px);
}

.manga-header.has-background .start-reading-btn {
    box-shadow: 0 4px 15px rgba(255, 55, 95, 0.4);
}

/* Novos estilos para a lista de capítulos */
.chapters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.chapters-count {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.chapters-view-toggle {
    display: flex;
    gap: 10px;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 4px;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle-btn.active {
    background-color: var(--primary);
    color: #000;
}

.view-toggle-btn svg {
    width: 16px;
    height: 16px;
}

.chapters-container {
    position: relative;
}

.chapters-container.list-mode .chapters-grid {
    display: none;
}

.chapters-container.grid-mode .chapters-list {
    display: none;
}

.chapters-container.grid-mode .chapters-grid {
    display: grid;
}

.chapters-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    background-color: var(--card-bg);
}

.chapter-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
    position: relative;
}

.chapter-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chapter-icon {
    color: var(--primary);
}

.chapter-details {
    display: flex;
    flex-direction: column;
}

.chapter-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chapter-number {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}

.chapter-new-tag {
    background-color: var(--button-bg);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    animation: blink 1s infinite alternate;
    text-transform: uppercase;
}

.chapter-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.read-button {
    background-color: rgba(255, 55, 95, 0.1);
    color: var(--button-bg);
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.read-button:hover {
    background-color: var(--button-bg);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 55, 95, 0.3);
}

/* Estilo para visualização em grid */
.chapters-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.chapter-grid-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chapter-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.chapter-grid-link {
    display: block;
    padding: 15px;
    height: 100%;
}

.chapter-grid-number {
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text);
}

.chapter-grid-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chapter-grid-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .manga-trailer {
        padding: 15px;
    }
    
    .trailer-title {
        font-size: 1.2rem;
    }
    
    .manga-header-overlay {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    
    .manga-header.has-background .manga-cover {
        margin-bottom: 20px;
    }
    
    .chapters-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}


/* Chapter panel 2026 — card grid inspired by requested layout */
.manga-chapters{background:linear-gradient(180deg,rgba(13,20,34,.96),rgba(8,14,25,.98));border:1px solid rgba(122,147,190,.22);border-radius:18px;padding:20px;box-shadow:0 22px 60px rgba(0,0,0,.24)}
.chapter-panel-toolbar{padding:0 0 16px;margin:0 0 16px;border-bottom:1px solid rgba(137,157,190,.14);gap:16px;flex-wrap:wrap}
.chapters-heading-wrap{display:flex;align-items:center;gap:10px;min-width:max-content}.chapters-title{display:flex;align-items:center;gap:9px;margin:0;color:#f4f7ff;font-size:1.34rem;letter-spacing:.02em;text-transform:uppercase}.chapters-title-icon{display:inline-grid;place-items:center;color:#b8c7e6;font-size:1rem}.chapters-total{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:24px;padding:0 8px;border:1px solid rgba(143,165,204,.22);border-radius:999px;color:#8fa2c5;background:#111a2b;font-size:.72rem;font-weight:800}
.chapters-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex:1}.chapter-search-box{position:relative;display:flex;align-items:center;min-width:220px;max-width:260px;flex:1}.chapter-search-box input{width:100%;height:40px;padding:0 38px 0 13px;border:1px solid rgba(128,151,190,.28);border-radius:13px;background:#09111f;color:#eef4ff;outline:none;font-size:.78rem;font-weight:600;letter-spacing:.02em}.chapter-search-box input:focus{border-color:rgba(255,66,129,.7);box-shadow:0 0 0 3px rgba(255,66,129,.09)}.chapter-search-box svg{position:absolute;right:13px;color:#8da0c1;pointer-events:none}.chapters-view-toggle{gap:3px;padding:3px;border:1px solid rgba(128,151,190,.22);border-radius:13px;background:#0a1220}.view-toggle-btn{min-height:34px;padding:0 11px;border-radius:10px;color:#9eabc3;font-size:.72rem;font-weight:800;text-transform:uppercase}.view-toggle-btn.active{background:linear-gradient(135deg,rgba(238,66,105,.34),rgba(176,57,125,.22));color:#fff;border:1px solid rgba(255,104,142,.45);box-shadow:inset 0 0 18px rgba(255,56,115,.08)}.chapter-add-button{display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 17px;border-radius:13px;background:#18243a;color:#f3f7ff;font-size:.76rem;font-weight:800;transition:.2s}.chapter-add-button:hover{background:#22314c;color:#fff;transform:translateY(-1px)}
.chapters-container.grid-mode .chapters-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0}.chapter-grid-item{position:relative;min-height:116px;padding:0;border:1px solid rgba(125,149,190,.26);border-radius:15px;background:linear-gradient(145deg,#0d1626,#0a111d);box-shadow:none;overflow:hidden}.chapter-grid-item:before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:3px;border-radius:0 4px 4px 0;background:#657ba5}.chapter-grid-item:hover{transform:translateY(-2px);border-color:rgba(145,170,215,.43);box-shadow:0 12px 30px rgba(0,0,0,.22)}.chapter-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:17px 15px 12px}.chapter-grid-number{display:flex;align-items:center;gap:8px;margin:0;color:#f1f5ff;min-width:0}.chapter-grid-number strong{font-size:1rem;white-space:nowrap}.chapter-status-dot{width:10px;height:10px;border:3px solid #667b9d;border-radius:50%;background:#bdcae0;box-shadow:0 0 0 3px rgba(111,133,171,.13)}.chapter-new-tag{animation:none;border-radius:999px;padding:3px 7px;background:linear-gradient(135deg,#ff3f70,#c92966);font-size:.58rem}.chapter-grid-date{flex:none;display:inline-flex;align-items:center;height:24px;padding:0 8px;border:1px solid rgba(132,156,198,.28);border-radius:999px;color:#c5d0e5;background:#101a2a;font-size:.64rem;font-weight:800;white-space:nowrap}.chapter-grid-title{padding:0 15px 8px;margin:0;color:#8294b2;font-size:.72rem}.chapter-card-actions{display:flex;gap:7px;padding:0 15px 15px;flex-wrap:wrap}.chapter-action{display:inline-flex;align-items:center;gap:6px;min-height:31px;padding:0 11px;border:1px solid rgba(128,151,190,.28);border-radius:999px;background:#0b1422;color:#dce7f8;font-size:.72rem;font-weight:750;transition:.2s}.chapter-action:hover{color:#fff;background:#152239;border-color:rgba(158,180,218,.42)}.chapter-delete-action{color:#ffc2ce;border-color:rgba(255,92,128,.34)}.chapter-delete-action:hover{background:rgba(162,40,70,.18);border-color:rgba(255,92,128,.58);color:#ffd8e0}.chapter-edit-action{color:#d5e1f6}.chapters-load-more-wrap{display:flex;justify-content:center;margin-top:20px}.chapters-load-more{min-height:40px;padding:0 18px;border:0;border-radius:999px;background:#18243a;color:#dce5f6;font-size:.76rem;font-weight:800;cursor:pointer;transition:.2s}.chapters-load-more:hover{background:#22314c;color:#fff;transform:translateY(-1px)}.chapter-search-empty{padding:30px;text-align:center;color:#8294b2}.chapters-list .chapter-item.is-search-hidden,.chapter-grid-item.is-search-hidden{display:none!important}
@media(max-width:1100px){.chapters-container.grid-mode .chapters-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.chapter-search-box{min-width:180px}}
@media(max-width:820px){.manga-chapters{padding:15px;border-radius:14px}.chapter-panel-toolbar{align-items:flex-start}.chapters-toolbar-actions{width:100%;justify-content:flex-start;flex-wrap:wrap}.chapter-search-box{order:1;max-width:none;min-width:100%;width:100%}.chapters-view-toggle{order:2}.chapter-add-button{order:3}.chapters-container.grid-mode .chapters-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.chapters-container.grid-mode .chapters-grid{grid-template-columns:1fr}.chapters-title{font-size:1.08rem}.chapter-card-top{padding:15px 13px 10px}.chapter-card-actions{padding:0 13px 13px}.chapters-toolbar-actions{gap:8px}.view-toggle-btn{padding:0 9px}.chapter-add-button{padding:0 12px}}


/* Infinite loading: always respect native hidden state and expose status. */
#sr-load-chapters[hidden],.sr-reader-chapters button[hidden] { display:none!important; }
#sr-chapter-status { text-align:center; color:var(--text-secondary,#9eabc3); font-size:.85rem; }
