/*
Theme Name: Dark Guild Fansub
Theme URI: https://example.com/
Author: OpenAI
Description: Tema personalizado para Dark Guild Fansub enfocado en novelas ligeras, mangas y lectura de capítulos.
Version: 4.0.0
Text Domain: dark-guild
*/

:root {
    --bg: #0d0d0f;
    --panel: #17171c;
    --panel-soft: #1e1f26;
    --line: #2b2d38;
    --text: #f4f1ea;
    --muted: #b6ad9c;
    --accent: #c9a227;
    --accent-2: #f0d372;
    --danger: #b64d4d;
    --success: #5e9a67;
    --radius: 18px;
    --shadow: 0 20px 40px rgba(0,0,0,.28);
    --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: linear-gradient(180deg, #0a0a0d 0%, #0f1014 100%);
    color: var(--text);
    font-family: "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { opacity: .92; }
.container { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.screen-reader-text { position: absolute; left: -9999px; }

.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(13,13,15,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    min-height: 78px;
}
.branding a { color: var(--text); }
.site-title { margin: 0; font-size: 1.5rem; }
.site-description { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.menu-toggle { display: none; }
.primary-menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.primary-menu a { color: var(--text); font-weight: 600; }

.hero {
    padding: 70px 0 36px;
}
.hero-grid, .content-grid, .meta-grid, .cards, .post-grid, .archive-grid, .detail-layout, .chapter-nav-grid {
    display: grid; gap: 24px;
}
.hero-grid { grid-template-columns: 1.4fr .9fr; align-items: start; }
.content-grid { grid-template-columns: minmax(0,1fr) 310px; }
.hero-card, .panel, .card, .reading-box, .entry-panel, .sidebar-widget, .meta-box {
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.07);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hero-card, .panel, .sidebar-widget, .entry-panel, .reading-box { padding: 26px; }
.eyebrow, .badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 11px; border-radius: 999px; background: rgba(201,162,39,.12);
    color: var(--accent-2); font-size: .85rem; font-weight: 700; letter-spacing: .02em;
}
.hero h1 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05; margin: 14px 0 16px; }
.hero p { color: var(--muted); }
.actions, .header-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.button, button, input[type="submit"] {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 18px; border-radius: 12px;
    background: var(--accent); color: #17120a; font-weight: 800; border: none; cursor: pointer;
}
.button.alt { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.12); }
.section { padding: 20px 0 34px; }
.section-header { display:flex; justify-content: space-between; gap:18px; align-items:end; margin-bottom: 20px; }
.section-header h2, .entry-title, .archive-title { margin: 0 0 8px; }
.section-header p, .muted { color: var(--muted); margin: 0; }

.card {
    overflow: hidden;
}
.cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.post-grid, .archive-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.card-body { padding: 18px; }
.card-title { margin: 0 0 8px; font-size: 1.1rem; }
.card-meta, .post-meta-list, .chips, .taxonomy-list {
    display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .9rem;
}
.chip, .taxonomy-list a, .post-meta-list span {
    display: inline-flex; align-items:center; padding: 5px 10px; border-radius: 999px;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.06); color: var(--muted);
}
.post-item { padding: 20px; }
.post-item h3 { margin-top: 0; }

.detail-layout { grid-template-columns: 320px minmax(0,1fr); align-items: start; }
.cover-frame { position: sticky; top: 100px; }
.cover-frame img { width: 100%; border-radius: 18px; box-shadow: var(--shadow); }
.meta-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 20px 0; }
.meta-box { padding: 18px; }
.meta-box strong { display: block; color: var(--muted); margin-bottom: 6px; font-size: .9rem; }
.synopsis { margin-top: 20px; }
.notice-bar {
    margin: 16px 0 0; padding: 12px 14px; border-radius: 12px;
    background: rgba(201,162,39,.1); border: 1px solid rgba(201,162,39,.2);
}
.notice-bar.locked {
    background: rgba(182,77,77,.12); border-color: rgba(182,77,77,.25); color: #ffd3d3;
}
.index-panel ul, .volume-list, .chapter-list, .simple-list { list-style: none; margin: 0; padding: 0; }
.index-panel li, .simple-list li { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.index-panel li:last-child, .simple-list li:last-child { border-bottom: 0; }

.reading-shell { width: min(920px, calc(100% - 24px)); margin: 42px auto 60px; }
.single-reading .site-main { padding-top: 0; }
.reading-box { padding: 34px; }
.reading-box .entry-title { font-size: clamp(1.7rem, 4vw, 2.7rem); }
.reading-box .entry-content { font-size: 1.08rem; }
.reading-box .entry-content p { margin: 0 0 1.15em; }
.chapter-navigation, .chapter-nav-grid {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-top: 32px;
}
.chapter-navigation > div:last-child { text-align: right; }

.archive-hero, .page-hero { padding: 42px 0 18px; }
.sidebar-widget h3 { margin-top: 0; }
.search-form { display: flex; gap: 10px; }
.search-form input[type="search"] {
    flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04); color: var(--text); padding: 0 14px;
}
.site-footer { padding: 36px 0; margin-top: 36px; border-top: 1px solid rgba(255,255,255,.06); color: var(--muted); }

.comment-respond, .comments-area { margin-top: 30px; }
.comment-list { list-style: none; padding: 0; }
.comment-body {
    background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
    border-radius: 14px; padding: 16px; margin-bottom: 12px;
}

.admin-note {
    margin-top: 18px; color: var(--muted); font-size: .95rem;
    padding: 14px 16px; border-radius: 12px; background: rgba(94,154,103,.08); border: 1px solid rgba(94,154,103,.16);
}

@media (max-width: 980px) {
    .hero-grid, .content-grid, .detail-layout { grid-template-columns: 1fr; }
    .cover-frame { position: static; }
}

@media (max-width: 760px) {
    .topbar { flex-wrap: wrap; padding: 14px 0; }
    .menu-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        min-height: 42px; padding: 0 14px; border-radius: 10px;
        border: 1px solid rgba(255,255,255,.12); background: transparent; color: var(--text);
    }
    .main-navigation { width: 100%; }
    .main-navigation ul { display: none; flex-direction: column; padding: 12px 0 0; }
    .main-navigation.is-open ul { display: flex; }
    .chapter-navigation, .chapter-nav-grid { grid-template-columns: 1fr; }
    .chapter-navigation > div:last-child { text-align: left; }
}


/* Version 3 additions */
.badge-lock {
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:4px 10px;
    border-radius:999px;
    background: rgba(201,162,39,.14);
    border:1px solid rgba(201,162,39,.35);
}
.reading-shell { padding: 26px 0 50px; }
.reading-wrapper { width:min(920px, calc(100% - 32px)); margin:0 auto; }
.chapter-navigation {
    display:grid;
    grid-template-columns:1fr auto 1fr;
    gap:12px;
    align-items:center;
    margin:22px 0;
}
.chapter-navigation.top { margin-top:10px; }
.chapter-navigation > div:last-child { text-align:right; }
.chapter-content { font-size:1.08rem; line-height:1.9; }
.locked-panel { border:1px solid rgba(201,162,39,.25); margin-top:24px; }
.notice-patreon {
    margin-top:16px;
    padding:14px 16px;
    background:rgba(201,162,39,.10);
    border:1px solid rgba(201,162,39,.28);
    border-radius:12px;
}
.notice-patreon a { margin-left:10px; font-weight:600; }

.manga-reader { display:flex; flex-direction:column; gap:18px; }
.reader-toolbar, .reader-pagination {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}
.reader-actions { display:flex; gap:10px; flex-wrap:wrap; }
.manga-pages { display:grid; gap:18px; }
.manga-reader[data-reader-mode="paginated"] .manga-page { display:none; }
.manga-reader[data-reader-mode="paginated"] .manga-page.is-active { display:block; }
.manga-page {
    background:#0f1014;
    border:1px solid var(--line);
    border-radius:16px;
    overflow:hidden;
}
.manga-page img { width:100%; height:auto; }
.reader-counter { color:var(--muted); font-weight:600; }

@media (max-width: 720px) {
    .chapter-navigation {
        grid-template-columns:1fr;
    }
    .chapter-navigation > div:last-child { text-align:left; }
}
