/* TruyenAI Mobile Reader & Single Story Detail Styling */
.truyenai-reader-wrapper.theme-light {
    background-color: #fbf9f5 !important;
    color: #2d3748 !important;
}

.truyenai-reader-wrapper.theme-sepia {
    background-color: #f4ecd8 !important;
    color: #2d3748 !important;
}

.truyenai-reader-wrapper.theme-dark {
    background-color: #1a202c !important;
    color: #e2e8f0 !important;
}

.theme-light .header-bar,
.theme-light .bottom-nav-bar {
    background-color: rgba(251, 249, 245, 0.95) !important;
    border-color: rgba(45, 55, 72, 0.1) !important;
    color: #2d3748 !important;
}

.theme-sepia .header-bar,
.theme-sepia .bottom-nav-bar {
    background-color: rgba(244, 236, 216, 0.95) !important;
    border-color: rgba(45, 55, 72, 0.1) !important;
    color: #2d3748 !important;
}

.theme-dark .header-bar,
.theme-dark .bottom-nav-bar {
    background-color: rgba(26, 32, 44, 0.95) !important;
    border-color: rgba(226, 232, 240, 0.1) !important;
    color: #e2e8f0 !important;
}

.theme-light .modal-panel {
    background-color: #ffffff !important;
    color: #2d3748 !important;
}

.theme-sepia .modal-panel {
    background-color: #efe5cd !important;
    color: #2d3748 !important;
}

.theme-dark .modal-panel {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

/* Reading content paragraph spacing */
.truyenai-content p {
    margin-bottom: 1.25em;
    line-height: 1.75;
}

/* Hide default WordPress theme headers/footers if reader full mode active */
body.truyenai-full-mode #masthead,
body.truyenai-full-mode header.site-header,
body.truyenai-full-mode footer.site-footer,
body.truyenai-full-mode #colophon {
    display: none !important;
}

/* Single Story Detail Page Scoped CSS - High Contrast Guarantee */
.truyenai-story-hero {
    background: linear-gradient(135deg, #0b0f19 0%, #1e1b4b 50%, #0f172a 100%) !important;
    color: #ffffff !important;
    border-radius: 1.5rem !important;
    padding: 2.5rem 2rem !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.truyenai-story-hero-title {
    font-size: 2.25rem !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

@media (min-width: 768px) {
    .truyenai-story-hero-title {
        font-size: 3rem !important;
    }
}

.truyenai-story-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.25) !important;
    border: 1px solid rgba(165, 180, 252, 0.4) !important;
    color: #c7d2fe !important;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.truyenai-story-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #f1f5f9 !important;
    font-size: 0.75rem;
    font-weight: 700;
}

.truyenai-stats-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

.truyenai-stats-label {
    color: #94a3b8 !important;
    font-size: 0.7rem !important;
    text-transform: uppercase;
    font-weight: 600;
    display: block;
}

.truyenai-stats-val {
    color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
}

.truyenai-btn-read-first {
    padding: 0.85rem 1.75rem !important;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    border-radius: 1rem !important;
    text-decoration: none !important;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.5) !important;
    transition: all 0.2s ease !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.truyenai-btn-read-first:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.6) !important;
    color: #ffffff !important;
}

.truyenai-btn-read-latest {
    padding: 0.85rem 1.75rem !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    border-radius: 1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(8px);
}

.truyenai-btn-read-latest:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}
