/* 全局背景和字体设置 */
body {
    font-family: 'Roboto', sans-serif;
    background: #121212; /* 深黑背景 */
    color: #fff; /* 白色字体 */
    margin: 0;
    padding: 0;
    line-height: 1.6;
    padding-bottom: 80px; /* 增加底部空间避免遮挡 */
    overflow-x: hidden; /* 防止水平滚动条 */
}

/* 页头 */
header {
    background: linear-gradient(135deg, #000, #444); /* 黑色到深灰渐变 */
    padding: 20px 0;
    text-align: center;
    color: #c8a000; /* 暗金色字体 */
    animation: fadeInHeader 1s ease-out;
}

header h1 {
    font-size: 3.5rem;
    margin: 0;
    letter-spacing: 3px;
    font-weight: 700;
}

header .btn-back {
    background: linear-gradient(135deg, #c8a000, #d4af37); /* 暗金色渐变 */
    color: #121212;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.2rem;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    animation: fadeInBtn 1.5s ease-out 0.5s forwards;
}

header .btn-back:hover {
    background: linear-gradient(135deg, #d4af37, #c8a000);
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
}

/* 提示信息 */
.alert {
    margin: 20px auto;
    max-width: 800px;
    padding: 15px;
    font-size: 1.2rem;
    text-align: center;
    border-radius: 10px;
    background-color: #333;
    color: #c8a000;
    opacity: 0;
    animation: fadeInAlert 1s ease-out 1s forwards;
}

/* 历史摘抄列表 */
.note-list {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    opacity: 0;
    animation: fadeInNotes 1.2s ease-out 1s forwards;
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    width: 100%;
}

/* 卡片设计 */
.card {
    background-color: #1e1e1e; /* 深灰色背景 */
    border: 2px solid #c8a000; /* 暗金色边框 */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 300px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    animation: fadeInCard 0.7s ease-out forwards;
}

.card:hover {
    transform: translateY(-12px) scale(1.05);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    background-color: #333; /* 暗灰色背景渐变效果 */
}

/* 卡片头部 */
.card-header {
    background: linear-gradient(135deg, #333, #444); /* 深灰渐变 */
    padding: 20px;
    text-align: center;
    border-bottom: 2px solid #c8a000;
}

.note-date {
    font-size: 1rem;
    color: #c8a000; /* 暗金色日期 */
}

.note-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #c8a000;
    margin-top: 10px;
}

/* 卡片内容 */
.card-body {
    padding: 25px;
    text-align: center;
}

.card-body p {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.6;
}

.card-body .btn-view {
    display: inline-block;
    background: linear-gradient(135deg, #c8a000, #d4af37); /* 暗金色渐变 */
    color: #121212;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: transform 0.3s ease, background 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    animation: fadeInBtnView 0.9s ease-out 1.2s forwards;
}

.card-body .btn-view:hover {
    background: linear-gradient(135deg, #d4af37, #c8a000);
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
}

/* 分页按钮 */
.pagination {
    text-align: center;
    margin-top: 40px;
    font-size: 1.1rem;
    color: #c8a000; /* 暗金色分页文字 */
    opacity: 0;
    animation: fadeInPagination 0.8s ease-out 1.5s forwards;
}

.pagination a, .pagination span {
    color: #c8a000;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.pagination a:hover {
    background-color: #d4af37;
    transform: scale(1.1);
}

.pagination span {
    color: #ccc;
}

/* 底部版权 */
footer {
    background-color: #121212;
    color: #c8a000; /* 暗金色文字 */
    text-align: center;
    padding: 20px 0;
    position: relative; /* 改为相对定位 */
    width: 100%;
    left: 0;
    margin-top: 40px; /* 增加上外边距，避免与内容重叠 */
    opacity: 0;
    animation: fadeInFooter 1.5s ease-out 2s forwards;
}

footer p {
    font-size: 1.2rem;
    margin: 0;
}

footer a {
    color: #c8a000;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 自定义动画效果 */
@keyframes fadeInHeader {
    0% { opacity: 0; transform: translateY(-50px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInBtn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInAlert {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInNotes {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInCard {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInBtnView {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes fadeInPagination {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInFooter {
    0% { opacity: 0; transform: translateY(50px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 自适应设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    .cards-container {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 90%;
        max-width: 400px;
    }

    .pagination a, .pagination span {
        font-size: 1rem;
    }

    footer p {
        font-size: 1rem;
    }
}
