* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "STKaiti", "KaiTi", "楷体", Georgia, serif;
    background-color: #2b2520;
    color: #e8dcc8;
    line-height: 1.8;
    padding: 40px 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #3d3630;
    padding: 60px 80px;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #4a4035;
    position: relative;
}

.language-switch {
    text-align: right;
    margin-bottom: 18px;
}

.lang-btn {
    display: inline-block;
    padding: 6px 12px;
    margin-left: 6px;
    color: #c9b896;
    background-color: transparent;
    border: 1px solid #6b5d4f;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "STKaiti", "KaiTi", "楷体", Georgia, serif;
}

.lang-btn:hover {
    background-color: #4a4238;
    border-color: #c9b896;
}

.lang-btn.active {
    background-color: #6b5d4f;
    color: #f5ecd7;
}

header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #6b5d4f;
}

h1 {
    font-size: 2.5rem;
    font-weight: normal;
    color: #f5ecd7;
    margin-bottom: 15px;
    letter-spacing: 8px;
}

.subtitle {
    font-size: 1rem;
    color: #c9b896;
    letter-spacing: 3px;
}

.library-list {
    list-style: none;
    margin-top: 40px;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.library-item {
    border-bottom: 1px solid #564d42;
    padding: 25px 0;
    transition: all 0.3s ease;
}

.library-item:last-child {
    border-bottom: none;
}

.library-item:hover {
    background-color: #4a4238;
    padding-left: 15px;
}

.library-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.item-number {
    display: inline-block;
    width: 40px;
    font-size: 0.9rem;
    color: #b39b7a;
}

.item-title {
    font-size: 1.4rem;
    color: #f5ecd7;
    margin-bottom: 8px;
}

.item-title-en {
    font-family: "Georgia", serif;
    font-size: 0.95rem;
    color: #c9b896;
    font-style: italic;
    margin-left: 50px;
}

.item-desc {
    font-size: 0.95rem;
    color: #d4c5b0;
    margin-left: 50px;
    margin-top: 5px;
}

.item-desc-en {
    font-family: "Georgia", serif;
    font-size: 0.85rem;
    color: #b5a68f;
    font-style: italic;
    margin-left: 50px;
    margin-top: 3px;
}

footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #564d42;
    font-size: 0.9rem;
    color: #b39b7a;
}

.decoration {
    text-align: center;
    color: #6b5d4f;
    margin: 20px 0;
    font-size: 1.2rem;
    letter-spacing: 10px;
}

.pagination {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
}

.pagination button {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 5px;
    color: #c9b896;
    background-color: transparent;
    border: 1px solid #6b5d4f;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "STKaiti", "KaiTi", "楷体", Georgia, serif;
    font-size: 1rem;
}

.pagination button:hover {
    background-color: #4a4238;
    border-color: #c9b896;
}

.pagination button.active {
    background-color: #6b5d4f;
    color: #f5ecd7;
    border-color: #6b5d4f;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
}

body.lang-zh .zh-only {
    display: block;
}

body.lang-zh .en-only {
    display: none;
}

body.lang-en .zh-only {
    display: none;
}

body.lang-en .en-only {
    display: block;
}

@media (max-width: 768px) {
    .container {
        padding: 40px 30px;
    }

    h1 {
        font-size: 2rem;
        letter-spacing: 5px;
    }

    .item-title {
        font-size: 1.2rem;
    }

    .item-title-en,
    .item-desc,
    .item-desc-en {
        margin-left: 30px;
    }

    .item-number {
        width: 30px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

