/* =========================================
   LEGENDARY SINGLE MANGA PAGE (Mobile First)
   ========================================= */

:root {
    --ls-bg: #050000;
    --ls-surface: #120505;
    --ls-accent: #ff0055;
    --ls-accent-glow: rgba(255, 0, 85, 0.4);
    --ls-text: #eee;
    --ls-text-muted: #999;
}

/* --- HERO SECTION --- */
.legendary-single-page {
    direction: ltr !important;
    text-align: left !important;
}

.legendary-hero {
    position: relative;
    overflow: hidden;
    padding-bottom: 40px;
    background: var(--ls-bg);
    direction: ltr;
}

.lh-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70%;
    z-index: 0;
}

.lh-backdrop-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px) opacity(0.3) grayscale(0.5);
    mask-image: linear-gradient(to bottom, black, transparent);
}

.lh-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Mobile Layout: Stacked */
@media (min-width: 768px) {
    .lh-container {
        flex-direction: row;
        align-items: flex-start;
        padding-top: 80px;
    }
}

/* Poster */
.lh-poster-wrap {
    flex-shrink: 0;
    width: 200px;
    margin: 0 auto;
    /* Center on mobile */
    position: relative;
}

.lh-poster {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.lh-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lh-poster-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--ls-accent);
    color: white;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 4px;
    box-shadow: 0 4px 10px var(--ls-accent-glow);
}

@media (min-width: 768px) {
    .lh-poster-wrap {
        width: 260px;
        margin: 0;
    }
}

/* Info */
.lh-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center !important;
    direction: ltr !important;
}

@media (min-width: 768px) {
    .lh-info {
        text-align: left !important;
    }
}

.lh-title {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.2;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Meta Data Row */
.lh-meta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Mobile Center */
    gap: 15px;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .lh-meta-row {
        justify-content: flex-start;
    }
}

.lh-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ls-text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 50px;
}

.lh-meta-item i {
    color: var(--ls-accent);
}

/* Genres */
.lh-genres {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

@media (min-width: 768px) {
    .lh-genres {
        justify-content: flex-start;
    }
}

.lh-genre-tag {
    font-size: 12px;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    transition: 0.2s;
}

.lh-genre-tag:hover {
    border-color: var(--ls-accent);
    color: white;
    background: rgba(255, 0, 85, 0.1);
}

/* Action Buttons */
.lh-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

@media (min-width: 768px) {
    .lh-actions {
        justify-content: flex-start;
    }
}

.btn-lgnd {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    font-size: 14px;
}

.btn-lgnd.primary {
    background: linear-gradient(45deg, #ff0055, #ff5500);
    box-shadow: 0 5px 20px var(--ls-accent-glow);
}

.btn-lgnd.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--ls-accent-glow);
}

.btn-lgnd.glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-lgnd.glass:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- STORY SECTION --- */
.lh-story {
    background: var(--ls-surface);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 20px;
    position: relative;
}

.lh-story-content {
    font-size: 14px;
    line-height: 1.8;
    color: #ddd;
    text-align: left !important;
    direction: ltr !important;
    max-height: 100px;
    /* Collapsed height */
    overflow: hidden;
    position: relative;
    transition: max-height 0.5s ease;
}

.lh-story-content.expanded {
    max-height: 2000px;
    /* Arbitrary large number */
}

.lh-story-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--ls-surface));
    pointer-events: none;
    transition: opacity 0.3s;
}

.lh-read-more {
    display: block;
    width: 100%;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    color: var(--ls-accent);
    padding: 10px;
    margin-top: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

/* --- CHAPTERS SECTION --- */
.lh-chapters-sec {
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.lh-sec-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ch-list-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ch-item {
    background: var(--ls-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: 0.2s;
    text-decoration: none;
}

.ch-item:hover {
    border-color: var(--ls-accent);
    background: rgba(255, 0, 85, 0.05);
    transform: translateX(5px);
}

.ch-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ch-num {
    font-weight: 700;
    color: white;
    font-size: 15px;
}

.ch-date {
    font-size: 11px;
    color: gray;
}

.ch-action {
    color: var(--ls-accent);
    font-size: 14px;
}

.load-more-ch-btn {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.2s;
}

.load-more-ch-btn:hover {
    background: var(--ls-accent);
    border-color: var(--ls-accent);
}

/* Hidden chapters class */
.ch-hidden {
    display: none;
}