/* Story Page Desktop Enhancement */
/* Applied only on screens >= 769px */

@media (min-width: 769px) {

    /* ===== NARROWER CONTENT for better readability ===== */
    .container.main-content {
        max-width: 960px;
        margin: 20px auto 40px;
    }

    .breadcrumb {
        max-width: 960px;
    }

    /* ===== STORY INFO - Better proportions ===== */
    .story-info {
        grid-template-columns: 180px 1fr;
        gap: 24px;
        padding: 24px;
        border-radius: 16px;
        margin-bottom: 16px;
        min-height: auto;
    }

    .story-cover {
        width: 180px;
        height: 250px;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
        border: none;
    }

    .story-cover img {
        border-radius: 12px;
    }

    .story-title {
        font-size: 24px;
        margin-bottom: 8px;
    }

    /* Hide chapter count & views from meta (already in stats bar) */
    .story-meta .meta-item:nth-child(2),
    .story-meta .meta-item:nth-child(3) {
        display: none;
    }

    /* Hide rating section inside story hero (already in stats bar) */
    .story-details .rating-section {
        display: none !important;
    }

    /* Hide rating form when it has hidden class (prevent story-comments.css override) */
    .rating-form-container.hidden {
        display: none !important;
    }

    .story-meta {
        gap: 12px;
        margin-bottom: 12px;
    }

    .meta-item {
        font-size: 13px;
    }

    .story-tags {
        margin-bottom: 12px;
    }

    /* ===== STATS + ACTION - Inline row ===== */
    .story-stats-bar {
        padding: 14px 0;
        margin-bottom: 12px;
        border-radius: 12px;
    }

    .stat-value {
        font-size: 22px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-stars {
        font-size: 14px;
    }

    /* ===== ACTION BAR - Compact, balanced ===== */
    .story-action-bar {
        gap: 10px;
        margin-bottom: 20px;
    }

    .story-action-bar .btn-favorite,
    .story-action-bar .btn-read {
        height: 42px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
        flex: 1 !important;
        padding: 0 16px !important;
    }

    .story-action-bar .btn-favorite {
        font-weight: 500 !important;
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border) !important;
        color: var(--text) !important;
    }

    .story-action-bar .btn-favorite:hover {
        border-color: var(--primary) !important;
        color: var(--primary) !important;
    }

    .story-action-bar .btn-read {
        font-weight: 600 !important;
    }

    /* ===== DESCRIPTION - Tighter, truncated ===== */
    .story-description {
        padding: 20px 24px;
        margin-bottom: 20px;
        border-radius: 14px;
    }

    .story-description .description-content {
        max-height: 120px;
        overflow: hidden;
        position: relative;
    }

    .story-description.open .description-content {
        max-height: none;
        overflow: visible;
    }

    .story-description .desc-toggle-btn {
        display: inline-block;
        background: none;
        border: none;
        color: var(--primary);
        font-size: 13px;
        cursor: pointer;
        padding: 8px 0 0;
        font-weight: 500;
    }

    .section-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .description-content {
        font-size: 14px;
        line-height: 1.75;
    }

    /* ===== TWO-COLUMN: Chapters + Related ===== */
    .desktop-two-col {
        display: grid;
        grid-template-columns: 1fr 280px;
        gap: 16px;
        align-items: start;
    }

    .desktop-main-col {
        min-width: 0;
    }

    .desktop-side-col {
        min-width: 0;
    }

    /* ===== TOC BUTTON ===== */
    .toc-button-section {
        margin-bottom: 16px;
    }

    .toc-popup-btn {
        padding: 12px 18px;
        font-size: 14px;
        border-radius: 12px;
    }

    /* ===== CHAPTER SECTION ===== */
    .chapter-section {
        border-radius: 14px;
        margin-bottom: 16px;
    }

    .chapter-header {
        padding: 14px 20px;
    }

    .chapter-header .section-title {
        font-size: 15px;
    }

    #latestChaptersList .chapter-item {
        padding: 10px 20px;
    }

    /* ===== RELATED SECTIONS in sidebar ===== */
    .desktop-side-col .related-section {
        border-radius: 14px;
        margin-bottom: 16px;
    }

    .desktop-side-col .related-header {
        padding: 14px 18px 0;
    }

    .desktop-side-col .related-header .section-title {
        font-size: 14px;
    }

    .desktop-side-col .related-list-item {
        padding: 10px 18px;
    }

    .desktop-side-col .related-list-title {
        font-size: 13px;
    }

    /* ===== COMMENTS & RATING MODALS - Same width ===== */
    .rating-modal-card {
        max-width: 540px;
    }

    .comments-section-wrapper.modal-open .comments-section {
        max-width: 540px;
        max-height: 80vh;
    }
}
