/* 故事页面样式 */

/* 页面头部 */
.page-header {
    background: linear-gradient(120deg, rgba(138, 20, 23, 0.95), rgba(179, 26, 29, 0.88));
    color: white;
    padding: 110px 0 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0) 60%),
                radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0) 55%);
    opacity: 0.9;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    letter-spacing: 0.1em;
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2.2rem;
    position: relative;
    z-index: 1;
    letter-spacing: 0.05em;
}

.breadcrumb {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.8rem;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.8;
}

/* 故事统计 */
.story-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
}

.stat-item i {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 分类导航 */
.category-nav {
    background: #fff;
    padding: 22px 0;
    box-shadow: 0 18px 40px rgba(47, 28, 25, 0.08);
    position: sticky;
    top: 78px;
    z-index: 100;
    border-bottom: 1px solid rgba(179, 26, 29, 0.12);
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.category-tab {
    background: rgba(179, 26, 29, 0.08);
    border: 1px solid transparent;
    padding: 12px 26px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 0.04em;
}

.category-tab:hover {
    background: rgba(179, 26, 29, 0.12);
    transform: translateY(-2px);
}

.category-tab.active {
    background: linear-gradient(135deg, rgba(138, 20, 23, 0.95), rgba(179, 26, 29, 0.85));
    color: white;
    box-shadow: 0 18px 35px rgba(179, 26, 29, 0.2);
}

/* 故事展示区域 */
.stories-section {
    padding: 70px 0;
    background: var(--secondary-color);
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* 故事卡片 */
.story-card {
    background: var(--surface-color);
    border-radius: 26px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: all 0.35s ease;
    border: var(--card-border);
    position: relative;
}

.story-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 32px 60px rgba(47, 28, 25, 0.2);
}

.story-number {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(138, 20, 23, 0.95), rgba(179, 26, 29, 0.85));
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 12px 28px rgba(179, 26, 29, 0.3);
}

.story-content {
    padding: 32px;
}

.story-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.story-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.story-category {
    background: rgba(179, 26, 29, 0.12);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.story-time {
    color: var(--muted-text);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.story-time::before {
    content: '⏱️';
    font-size: 0.8rem;
}

.story-excerpt {
    color: var(--muted-text);
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(179, 26, 29, 0.08);
    color: var(--primary-dark);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    border: 1px solid rgba(179, 26, 29, 0.2);
}

.btn-read-story {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    border: none;
    padding: 12px 26px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 12px 28px rgba(179, 26, 29, 0.24);
}

.btn-read-story:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(179, 26, 29, 0.3);
}

/* 加载更多按钮 */
.load-more {
    text-align: center;
    margin-top: 40px;
}

.btn-load-more {
    background: white;
    border: 1px solid rgba(179, 26, 29, 0.3);
    color: var(--primary-dark);
    padding: 15px 34px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-load-more:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(179, 26, 29, 0.26);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 24px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 35px 80px rgba(47, 28, 25, 0.25);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid rgba(179, 26, 29, 0.12);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    padding: 25px 30px;
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 32px;
}

.story-meta-modal {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.story-meta-modal span {
    background: rgba(179, 26, 29, 0.08);
    color: var(--primary-dark);
    padding: 6px 15px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
}

.story-content-modal {
    line-height: 1.85;
    color: var(--text-color);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.story-tags-modal {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.story-tags-modal .tag {
    background: rgba(179, 26, 29, 0.12);
    color: var(--primary-dark);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-footer {
    padding: 22px 32px;
    border-top: 1px solid rgba(179, 26, 29, 0.12);
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.btn-share, .btn-bookmark {
    background: rgba(179, 26, 29, 0.08);
    border: 1px solid rgba(179, 26, 29, 0.18);
    color: var(--primary-dark);
    padding: 12px 22px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-share:hover, .btn-bookmark:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    border-color: transparent;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .story-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .category-tabs {
        gap: 10px;
    }
    
    .category-tab {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .story-content {
        padding: 20px;
    }
    
    .story-title {
        font-size: 1.2rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 60px 0 30px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .stories-section {
        padding: 40px 0;
    }
    
    .story-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-content {
        margin: 5% auto;
        max-height: 90vh;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.story-card {
    animation: fadeInUp 0.6s ease forwards;
}

.story-card:nth-child(1) { animation-delay: 0.1s; }
.story-card:nth-child(2) { animation-delay: 0.2s; }
.story-card:nth-child(3) { animation-delay: 0.3s; }
.story-card:nth-child(4) { animation-delay: 0.4s; }
.story-card:nth-child(5) { animation-delay: 0.5s; }
.story-card:nth-child(6) { animation-delay: 0.6s; }

/* 滚动条样式 */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(138, 20, 23, 0.95), rgba(179, 26, 29, 0.85));
}