﻿/* 名句页面样式 */
:root {
    --primary-color: #4e8cbb;
    --primary-dark: #3a7cb2;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-color: #f5f5f5;
    --border-color: #e6d8b6;
    --hover-color: #b89b5b;
    --section-bg: #f9f6ec;
    --card-shadow: 0 2px 12px rgba(180,160,100,0.10);
}

.g-bd {
    background-color: var(--bg-color);
}

.mingju-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 筛选区域样式 */
.filter-section {
    background: var(--section-bg);
    border-radius: 14px;
    padding: 24px 28px 18px 28px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.filter-header {
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.filter-header h2 {
    font-size: 19px;
    color: #7c5c1e;
    margin: 0;
    font-weight: bold;
    letter-spacing: 1px;
}

/* 筛选组样式 */
.filter-group {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.filter-options-container {
    display: flex;
    flex-wrap: wrap;
    overflow: visible;
    flex: 1;
}

.filter-label {
    margin-right: 8px;
    flex-shrink: 0;
    color: var(--text-light);
    font-weight: bold;
    white-space: nowrap;
    font-size: 14px;
}

.filter-group a {
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 3px;
    padding: 6px 12px;
    background: #fff;
    color: var(--text-light);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e0d9c8;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-group a:hover {
    background: linear-gradient(135deg, #f5f2e9, #ede8da);
    color: var(--text-color);
}

.filter-group a.active {
    background: linear-gradient(to right, #8b6b4a, #d5b788);
    color: #fff;
}

/* PC端隐藏展开按钮 */
.expand-btn {
    display: none;
}

/* 名句列表样式 */
.mingju-list {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(180,160,100,0.12);
    padding: 0;
    overflow: hidden;
    position: relative;
}

.mingju-list::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #b89b5b, #e6d8b6);
}

.mingju-item {
    border-bottom: 1px solid #f3e9d6;
    padding: 10px;
    margin: 0;
    transition: all 0.3s ease;
    background: #fff;
}

.mingju-item:last-child {
    border-bottom: none;
}

.mj-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.mj-row .text {
    flex: 1;
    margin: 0 20px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    font-weight: 500;
}

.mj-row .text a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 2px 0;
}

.mj-row .text a:hover,
.mingju-item:hover .mj-row .text a {
    color: var(--primary-color);
}

.mj-row .info {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(243, 233, 214, 0.4);
    padding: 6px 15px;
    border-radius: 20px;
    margin: 0;
}

.mj-row .info span.author {
    color: #7c5c1e;
    font-weight: 500;
}

.mj-row .info span.dynasty {
    color: #a1845c;
}

.mj-row .info span.source {
    color: #888;
}

.mj-row .info span.hits {
    background: linear-gradient(90deg, #f3e9d6 0%, #e6d8b6 100%);
    color: #7c5c1e;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-left: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mj-row .info span.hits i {
    font-size: 14px;
    color: #b89b5b;
}

.mj-row .info span:not(:last-child)::after {
    content: "•";
    color: #d5b788;
    margin: 0 8px;
    position: absolute;
    right: -12px;
}

.mj-row .info span.hits::after {
    display: none;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 35px 0 25px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination a:hover {
    background: var(--section-bg);
    color: #7c5c1e;
    border-color: #b89b5b;
}

.pagination a.active {
    background: linear-gradient(to right, #8b6b4a, #d5b788);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(180,160,100,0.25);
}

.pagination .ellipsis {
    border: none;
    background: none;
}

/* 名句列表标题栏样式 */
.mingju-header {
    background: #fff;
    color: black;
    margin: 5px 0;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}



.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.page-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 16px;
}

.total-count em {
    font-style: normal;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.page-indicator {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 移动端样式 */
@media (max-width: 768px) {
    .filter-section {
        padding:5px;
        border-radius: 10px;
    }

    .mingju-header {
        padding: 20px 0;
        margin: 20px 0;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .page-info {
        flex-direction: column;
        gap: 10px;
    }
    
    /* 移动端筛选区域 */
    .filter-group {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        margin-bottom: 8px;
        width: 100%;
        overflow: hidden;
        min-height: 28px;
    }
    
    .filter-options-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        overflow: hidden;
        flex: 1;
        transition: all 0.3s ease;
        align-items: center;
        min-height: 24px;
    }
    
    .filter-group.expanded .filter-options-container {
        flex-wrap: wrap !important;
        overflow: visible;
        min-height: 24px;
    }
    
    .filter-group.expanded {
        min-height: 28px;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
    }
    
    .filter-label {
        margin-right: 0px;
        flex-shrink: 0;
        color: #333;
        font-weight: 500;
        font-size: 12px;
        white-space: nowrap;
        line-height: 1;
    }
    
    .filter-group a {
        margin-right: 1px;
        margin-bottom: 1px;
        padding: 5px 5px;
        font-size: 12px;
        color: #19537D !important;
        background-color: #f0f6ff;
        border: 1px solid #19537D;
        border-radius: 4px;
        text-decoration: none;
        white-space: nowrap;
        flex-shrink: 0;
        transition: all 0.3s ease;
        font-weight: 500;
        min-height: 24px;
        display: inline-flex;
        align-items: center;
    }
    
    .filter-group a:hover,
    .filter-group a:active {
        background-color: #19537D;
        color: #fff !important;
    }
    
    .expand-btn {
        margin-left: 4px;
        padding: 4px 8px;
        font-size: 12px;
        color: #19537D;
        background-color: #fff;
        border: 1px solid #19537D;
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex !important;
        align-items: center;
        gap: 2px;
        font-weight: 500;
        flex-shrink: 0;
        white-space: nowrap;
        min-width: 45px;
        min-height: 24px;
    }
    
    .expand-btn:hover {
        background-color: #19537D;
        color: #fff;
    }
    
    .expand-icon {
        font-size: 10px;
        transition: transform 0.3s ease;
    }

    .mingju-item {
        padding: 15px;
    }

    .mingju-item:hover {
        padding-left: 20px;
    }

    .mj-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .mj-row .text {
        font-size: 17px;
        margin-right: 0;
    }

    .mj-row .info {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .mj-row {
        gap: 10px;
    }

    .mj-row .text {
        font-size: 16px;
        width: 100%;
    }

    .mj-row .info {
        padding: 4px 12px;
        font-size: 12px;
    }

    .mj-row .info span:not(:last-child)::after {
        margin: 0 5px;
        right: -9px;
    }

    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 14px;
    }
}