/* 基础样式 */
body {
    font-family: 'FangSong', 'STFangsong', 'KaiTi', 'STKaiti', serif;
    background: linear-gradient(135deg, #f7f3ee 0%, #f0ebe6 100%);
    color: #2c3338;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
}

/* 内容区域 */
.content {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
}

/* 栏目标题 */
.category-title {
    font-family: 'STSong', 'SimSun', serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #2c3338;
    text-align: center;
    margin: 0 0 30px;
    padding: 40px 0 20px;
    background: linear-gradient(45deg, #4a4a4a, #2c3338);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 使用提示 */
.usage-tips {
    text-align: center;
    color: #666666;
    font-size: 0.95rem;
    margin: -20px 0 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'FangSong', 'STFangsong', serif;
}

.usage-tips i {
    color: #8b7355;
}

/* 文章列表 */
.article-list, .recommended-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 文章项 */
.article-item, .recommended-item {
    background: linear-gradient(135deg, rgba(255, 252, 249, 0.95), rgba(255, 252, 249, 0.98));
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.08);
}

/* 文章标题行容器 */
.article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* 文章链接 */
.article-link {
    flex: 1;
    font-size: 1rem;
    color: #4a4a4a;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    padding: 5px 0;
    font-family: 'FangSong', 'STFangsong', serif;
}

/* 数字按钮 */
.article-number {
    min-width: 60px;
    text-align: center;
    background: linear-gradient(135deg, #8b7355, #a08563);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.2);
    user-select: none;
    transition: background 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 展开状态的按钮样式 */
.expanded .article-number {
    background: linear-gradient(135deg, #6b584a, #8b7355);
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.2);
}

/* 文章内容区域 */
.article-content {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 展开状态 */
.expanded .article-content {
    opacity: 1;
    transform: translateY(0);
}

/* 内容包装器 */
.content-wrapper {
    line-height: 1.3;
    color: #4a4a4a;
    font-family: 'FangSong', 'STFangsong', serif;
}

.content-wrapper p {
    margin: 4px 0;
    text-align: justify;
}

/* 签名样式 */
.signature {
    font-family: 'KaiTi', 'STKaiti', serif;
    color: #8b7355;
    text-align: right;
    font-style: italic;
}

/* 加载状态 */
.loading .article-content {
    opacity: 0.5;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* 主要操作按钮（复制和单独浏览） */
.primary-actions {
    display: flex;
    width: 100%;
    gap: 8px;
}

/* 次要操作按钮（评论和加入会员） */
.secondary-actions {
    display: flex;
    width: 100%;
    gap: 8px;
    margin-top: 8px;
}

.action-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    font-family: 'FangSong', 'STFangsong', serif;
}

/* 按钮样式 */
.copy-btn {
    background: linear-gradient(135deg, #8b7355, #a08563);
}

/* 单独浏览按钮的冷酷立体风格 */
.view-btn {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #ecf0f1;
    border: none;
    box-shadow: 
        0 4px 0 #1a252f,
        0 5px 5px rgba(0, 0, 0, 0.2),
        0 10px 15px rgba(0, 0, 0, 0.15),
        inset 0 -2px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
    position: relative;
    transform: translateY(-2px);
    transition: all 0.2s ease;
    overflow: visible;
}

.view-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 9px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.view-btn:hover {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    transform: translateY(-3px);
    box-shadow: 
        0 5px 0 #1a252f,
        0 6px 6px rgba(0, 0, 0, 0.2),
        0 12px 18px rgba(0, 0, 0, 0.15),
        inset 0 -2px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.view-btn:hover::after {
    opacity: 1;
}

.view-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 0 #1a252f,
        0 3px 3px rgba(0, 0, 0, 0.2),
        0 6px 10px rgba(0, 0, 0, 0.15),
        inset 0 -2px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .view-btn {
        background: linear-gradient(135deg, #1a252f, #2c3e50);
        box-shadow: 
            0 4px 0 #0f1924,
            0 5px 5px rgba(0, 0, 0, 0.3),
            0 10px 15px rgba(0, 0, 0, 0.2),
            inset 0 -2px 8px rgba(0, 0, 0, 0.3),
            inset 0 2px 4px rgba(255, 255, 255, 0.05);
    }

    .view-btn:hover {
        background: linear-gradient(135deg, #2c3e50, #1a252f);
        box-shadow: 
            0 5px 0 #0f1924,
            0 6px 6px rgba(0, 0, 0, 0.3),
            0 12px 18px rgba(0, 0, 0, 0.2),
            inset 0 -2px 8px rgba(0, 0, 0, 0.3),
            inset 0 2px 4px rgba(255, 255, 255, 0.05);
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .view-btn {
        transform: translateY(-1px);
        box-shadow: 
            0 3px 0 #1a252f,
            0 4px 4px rgba(0, 0, 0, 0.2),
            0 8px 12px rgba(0, 0, 0, 0.15);
    }
}

.comment-btn {
    background: linear-gradient(135deg, #a08563, #b39b83);
}

.vip-btn {
    background: linear-gradient(135deg, #8b7355, #a08563);
}

/* 加载更多按钮 */
.load-more {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 30px auto;
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b7355, #a08563);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'FangSong', 'STFangsong', serif;
}

/* 加载状态 */
.load-more.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loading .loader {
    display: flex;
}

.loading .button-text {
    display: none;
}

/* 提示框 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(139, 115, 85, 0.95);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    font-family: 'FangSong', 'STFangsong', serif;
}

.toast-success {
    background: #48bb78;
    color: white;
}

.toast-error {
    background: #f56565;
    color: white;
}

/* 随机推荐区域 */
.recommended-articles {
    margin-top: 30px;
}

.recommended-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #4a4a4a, #2c3338);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    font-weight: 700;
    font-family: 'STSong', 'SimSun', serif;
}

/* 统一列表样式 */
.recommended-item {
    background: linear-gradient(135deg, rgba(255, 252, 249, 0.95), rgba(255, 252, 249, 0.98));
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.08);
}

/* 确保推荐区域和主列表使用相同的布局 */
.recommended-item .article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.recommended-item .article-link {
    flex: 1;
    font-size: 1rem;
    color: #4a4a4a;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    padding: 5px 0;
    font-family: 'FangSong', 'STFangsong', serif;
}

.recommended-item .article-number {
    min-width: 60px;
    text-align: center;
    background: linear-gradient(135deg, #8b7355, #a08563);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.2);
    user-select: none;
    transition: background 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 展开状态的按钮样式统一 */
.recommended-item.expanded .article-number {
    background: linear-gradient(135deg, #6b584a, #8b7355);
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.2);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .content {
        margin: 10px;
        padding: 15px;
    }

    .article-item, .recommended-item {
        padding: 12px;
    }

    .article-header {
        gap: 10px;
    }

    .article-number {
        min-width: 50px;
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .article-link {
        font-size: 0.95rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .recommended-articles {
        padding: 20px;
        margin-top: 30px;
    }

    .view-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .view-btn::before {
        animation: none; /* 移动端禁用动画以提升性能 */
    }
}

/* 加载动画 */
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(66, 153, 225, 0.1);
    border-top-color: #4299e1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 按钮悬停效果 */
.article-number:hover,
.article-link:hover {
    opacity: 0.85;
}

.action-btn:hover {
    opacity: 0.9;
}

.load-more:hover {
    opacity: 0.9;
}

/* 移除之前的按钮悬停效果 */
.copy-btn:hover,
.view-btn:hover {
    /* 移除 transform 和 box-shadow 变化 */
    background: linear-gradient(135deg, #7b6345, #907553); /* 稍微深一点的颜色 */
    transform: none;
    box-shadow: none;
}

/* 错误提示样式 */
.error-message {
    text-align: center;
    padding: 20px;
    color: #e53e3e;
}

.error-message i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

/* 返回按钮 */
.back-to-article {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
}

.back-to-article a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.back-to-article a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-content {
    animation: fadeIn 0.3s ease-out;
}

/* 加载更多按钮动画 */
.load-more .loader-text {
    color: #fff;
    font-size: 0.9rem;
}

.load-more.error {
    animation: shake 0.5s ease-in-out;
    background: linear-gradient(135deg, #e53e3e 0%, #f56565 100%);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 优化移动端样式 */
@media (max-width: 480px) {
    .category-title {
        font-size: 1.4rem;
        padding: 30px 0 15px;
    }

    .usage-tips {
        font-size: 0.85rem;
    }

    .action-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .back-to-article {
        display: none;
    }

    .toast {
        width: 80%;
        font-size: 0.9rem;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .article-item:active,
    .recommended-item:active {
        background: rgba(255, 255, 255, 0.9);
    }

    .action-btn:active {
        transform: scale(0.98);
    }

    .load-more:active {
        transform: scale(0.98);
    }
}

/* 导航按钮区 */
.nav-buttons {
    display: flex;
    gap: 20px;
    margin: 30px auto;
    max-width: 600px;
    padding: 0 20px;
}

.nav-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.9), rgba(160, 133, 99, 0.9));
    color: #fff;
    font-family: 'FangSong', 'STFangsong', serif;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.15);
}

.nav-btn:hover {
    opacity: 0.9;
}

.nav-btn i {
    font-size: 1.2rem;
}

/* 老师介绍区 */
.teacher-section {
    margin: 40px auto;
    text-align: center;
    max-width: 220px; /* 控制整体宽度 */
}

/* 轮播容器 */
.teacher-slider {
    position: relative;
    width: 220px;  /* 减小尺寸 */
    height: 220px; /* 减小尺寸 */
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    /* 添加相框效果 */
    border: 8px solid #fff;
    box-shadow: 
        0 0 0 1px rgba(139, 115, 85, 0.2),
        0 4px 15px rgba(139, 115, 85, 0.15),
        inset 0 0 8px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.slider-container {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.5s ease;
}

.slide {
    width: 33.333%;
    height: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* 老师姓名 */
.teacher-name {
    font-family: 'STSong', 'SimSun', serif;
    font-size: 1.6rem; /* 稍微减小字号 */
    color: #8b7355;
    margin: 12px 0 0;
    position: relative;
    display: inline-block;
}

/* 添加装饰线 */
.teacher-name::before,
.teacher-name::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 15px;
    height: 1px;
    background: #8b7355;
    opacity: 0.6;
}

.teacher-name::before {
    right: 100%;
    margin-right: 10px;
}

.teacher-name::after {
    left: 100%;
    margin-left: 10px;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .teacher-slider {
        border-color: rgba(44, 40, 36, 0.8);
        box-shadow: 
            0 0 0 1px rgba(139, 115, 85, 0.3),
            0 4px 15px rgba(0, 0, 0, 0.3),
            inset 0 0 8px rgba(0, 0, 0, 0.2);
        background: rgba(44, 40, 36, 0.8);
    }

    .teacher-name {
        color: #a08563;
    }

    .teacher-name::before,
    .teacher-name::after {
        background: #a08563;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .teacher-section {
        max-width: 180px;
    }

    .teacher-slider {
        width: 180px;
        height: 180px;
        border-width: 6px;
    }

    .teacher-name {
        font-size: 1.4rem;
    }
}

/* 横幅区 */
.banner-section {
    margin: 40px auto;
    padding: 40px 20px;
    background: url('../images/ink-bg.jpg') center/cover;
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 252, 249, 0.9);
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-content p {
    font-family: 'STSong', 'SimSun', serif;
    font-size: 1.6rem;
    color: #4a4a4a;
    margin: 10px 0;
    text-shadow: 1px 1px 2px rgba(139, 115, 85, 0.1);
}

/* 版权区 */
.site-footer {
    margin-top: 60px;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.05), rgba(160, 133, 99, 0.05));
    text-align: center;
    border-top: 1px solid rgba(139, 115, 85, 0.1);
}

.footer-content p {
    font-family: 'FangSong', 'STFangsong', serif;
    color: #8b7355;
    margin: 5px 0;
    font-size: 0.95rem;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .nav-btn {
        background: linear-gradient(135deg, rgba(107, 88, 74, 0.9), rgba(139, 115, 85, 0.9));
    }

    .teacher-section {
        background: linear-gradient(135deg, rgba(44, 40, 36, 0.95), rgba(53, 48, 41, 0.98));
    }

    .teacher-info h3 {
        color: #a08563;
    }

    .teacher-info p {
        color: #d4c9bc;
    }

    .banner-section::before {
        background: rgba(44, 40, 36, 0.9);
    }

    .banner-content p {
        color: #d4c9bc;
    }

    .site-footer {
        background: linear-gradient(135deg, rgba(44, 40, 36, 0.1), rgba(53, 48, 41, 0.1));
        border-top-color: rgba(139, 115, 85, 0.2);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-buttons {
    flex-direction: column;
        gap: 15px;
    }

    .teacher-info h3 {
        font-size: 1.5rem;
    }

    .banner-content p {
        font-size: 1.3rem;
    }
}

/* AI制作说明文字 - 水墨风格 */
.ai-credit {
    text-align: center;
    margin: 25px auto;
    padding: 8px 15px;
    background: linear-gradient(135deg, rgba(44, 51, 56, 0.08), rgba(71, 78, 84, 0.08));
    border-radius: 15px;
    display: inline-block;
    font-family: 'FangSong', 'STFangsong', serif;
    color: rgba(44, 51, 56, 0.75);
    font-size: 0.85rem;
    max-width: fit-content;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid rgba(44, 51, 56, 0.1);
    letter-spacing: 0.5px;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .ai-credit {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.08));
        color: rgba(255, 255, 255, 0.75);
        border-color: rgba(255, 255, 255, 0.08);
    }
}

/* 额外操作按钮组 */
.extra-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

/* 水墨风格按钮样式 */
.book-btn {
    background: linear-gradient(135deg, #8b7355, #96806A);
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.2);
}

.course-btn {
    background: linear-gradient(135deg, #7D6B52, #8b7355);
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.2);
}

/* 按钮悬停效果 */
.book-btn:hover,
.course-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .book-btn {
        background: linear-gradient(135deg, #6b584a, #7D6B52);
    }
    
    .course-btn {
        background: linear-gradient(135deg, #5D4B3A, #6b584a);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .extra-actions {
        flex-direction: column;
        gap: 6px;
    }

    .extra-actions .action-btn {
        font-size: 0.9rem;
    }
} 