/* ================================
   响应式样式
   ================================ */

/* 响应式 */
@media (max-width: 1024px) {
    .app-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        padding: 2rem 1.5rem 1rem;
    }

    .content-area {
        width: 100%;
        padding: 1.5rem;
    }

    .post-item {
        display: block;
        position: relative;
        padding: 0.6rem 0;
    }

    .post-date {
        display: block;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .post-title {
        display: block;
        margin-left: 0;
        font-size: 1.3rem;
        margin-bottom: 1.8rem;
    }

    .post-category {
        display: block;
        position: absolute;
        bottom: 1rem;
        right: 0;
        text-align: right;
        width: auto;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .book-row {
        grid-template-columns: 1fr 80px 140px 40px;
    }

    .hide-category {
        display: none;
    }
}

@media (min-width: 768px) {
    :root {
        --content-font-size: 1.3rem;
    }

    .post-content-body h1 {
        font-size: 1.9rem;
    }

    .post-content-body h2 {
        font-size: 1.65rem;
    }

    .post-content-body h3 {
        font-size: 1.45rem;
    }

    .post-content-body h4 {
        font-size: 1.35rem;
    }
}

@media (max-width: 680px) {
    .book-row {
        grid-template-columns: 1fr 80px 40px;
    }

    .hide-category,
    .hide-reading-time {
        display: none;
    }

    .mobile-book-meta {
        display: block;
    }

    /* 移动端表格优化 */
    .post-content-body table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .post-content-body th,
    .post-content-body td {
        padding: 0.5em 0.6em;
    }
}

@media (min-width: 681px) {
    .mobile-book-meta {
        display: none;
    }
}

@media (max-width: 480px) {
    .book-row {
        grid-template-columns: 1fr 50px 40px;
        gap: 0.5rem;
        font-size: 1rem;
    }

    .hide-category,
    .hide-reading-time,
    .hide-rating {
        display: none;
    }

    .mobile-star {
        display: block;
    }
}

@media (min-width: 481px) {
    .mobile-star {
        display: none;
    }
}

@media (max-width: 480px) {
    .pagination {
        gap: 4px;
        margin-top: 2rem;
    }

    .page-btn {
        padding: 4px 8px;
        min-width: 32px;
        font-size: 12px;
    }

    .page-ellipsis {
        padding: 4px 4px;
        min-width: 24px;
        font-size: 12px;
    }

    .footer-beian .flex {
        row-gap: 0.5rem !important;
    }
}

@media (max-width: 380px) {
    .pagination {
        gap: 3px;
    }

    .page-btn {
        padding: 3px 6px;
        min-width: 28px;
        font-size: 11px;
    }

    .page-ellipsis {
        padding: 3px 2px;
        min-width: 20px;
        font-size: 11px;
    }
}

/* 打印样式 */
@media print {
    .paper-texture {
        display: none;
    }

    body {
        background: white;
    }

    .app-wrapper {
        box-shadow: none;
        background: none;
    }

    .sidebar {
        position: relative;
        height: auto;
        border-right: none;
    }

    .content-area {
        width: 100%;
        padding: 0;
    }

    .modal-overlay,
    .search-container,
    .pagination,
    .copy-toast {
        display: none !important;
    }
}
