
body {
    
    font-family: "LXGW WenKai Mono GB", "宋体", serif;
    font-weight: normal;
    font-display: swap; /* 确保文字始终可见 */
    background-color: #f5f5f5;
    color: #333;
    padding: 15px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 1px;
    padding: 1px 0;
}

h1 {
    font-size: 1.3rem;
    margin-bottom: 4px;
    color: #333;
}

.search-box {
    margin: 5px auto 15px;
    max-width: 600px;
    padding: 0 10px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    width: calc(25% - 12px);
    min-width: 0;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    aspect-ratio: 9/18;
    display: flex;
    flex-direction: column;
    flex-grow: 0;
    flex-shrink: 0;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-img {
    height: 83%;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.card-content {
    padding: 8px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    color: #666;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    padding: 2px 0;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 15px 0;
    color: #666;
    font-size: 0.8rem;
}

.loading {
    text-align: center;
    padding: 15px;
    font-size: 1rem;
    color: #666;
    width: 100%;
}

/* Soso搜索框样式 */
.soso-search {
    margin: 30px auto 15px;
    max-width: 600px;
    padding: 0 10px;
}

.soso-search-box {
    display: flex;
    width: 100%;
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.soso-search-input {
    flex: 1;
    padding: 0 15px;
    border: none;
    outline: none;
    font-size: 14px;
}

.soso-search-button {
    width: 80px;
    background-color: #f2f2f2;
    border: none;
    border-left: 1px solid #ddd;
    cursor: pointer;
    color: #666;
    font-size: 14px;
}

.soso-search-button:hover {
    background-color: #e6e6e6;
}

/* 修改后的侧边栏样式 - 右侧悬浮模式 */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 250px;
    background-color: #333;
    color: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar-header {
    padding: 15px;
    background-color: #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 1.2rem;
    margin: 0;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    padding: 12px 15px;
    border-bottom: 1px solid #444;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-menu li:hover {
    background-color: #444;
}

.sidebar-toggle {
    position: fixed;
    right: 10px;
    top: 10px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle.open {
    right: 260px;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .card {
        width: calc(25% - 12px);
    }
}

@media (max-width: 992px) {
    .card {
        width: calc(33.33% - 10px);
    }
}

@media (max-width: 768px) {
    .card {
        width: calc(50% - 8px);
    }
    h1 {
        font-size: 1rem;
    }
    .sidebar {
        width: 200px;
    }
    .sidebar-toggle.open {
        right: 210px;
    }
    .search-box input {
        padding: 8px 12px; 
        font-size: 13px; 
        border-radius: 20px; 
    }
}

@media (max-width: 480px) {
    .card {
        width: calc(50% - 5px);
    }
    .card-container {
        gap: 10px;
    }
    .card-title {
        font-size: 0.75rem;
    }
    .card-desc {
        font-size: 0.65rem;
        line-height: 1;
    }
    .card-img {
        height: 83%;
    }
    .sidebar {
        width: 180px;
    }
    .sidebar-toggle.open {
        right: 190px;
    }
        .search-box input {
        padding: 6px 10px; 
        font-size: 12px;  
        border-radius: 18px; 
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); 
    }
}

/* 新增侧边栏菜单项样式 */
.sidebar-menu a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 12px 15px;
    margin: -12px -15px; /* 抵消li的padding */
}

.sidebar-menu a:hover {
    color: #ddd;
}

.menu-divider {
    color: #aaa;
    font-size: 0.8rem;
    padding-top: 20px;
    position: relative;
}

.menu-divider::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 15px;
    right: 15px;
    height: 1px;
    background-color: #555;
}