/* styles.css */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: url('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTBs93mTnwGce8iJEZMo4Rf_O3veATqrnkdSQ&s') no-repeat center center fixed;
    background-size: cover;
    color: white;
    font-size: 16px;
    opacity: 0.95;  /* 增加背景的透明度 */
    position: relative; /* 确保滤镜层在内容层之下 */
    overflow-x: hidden; /* 防止横向滚动 */
}

/* 添加黑色滤镜覆盖 */
body::after {
    content: '';
    position: absolute; /* 改为绝对定位 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* 黑色滤镜，透明度为0.7 */
    z-index: -1; /* 放置在背景层 */
}


/* 主页的基本样式 */
.landing-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
}

header {
    margin-bottom: 50px;
}

header h1 {
    font-size: 3rem;
    font-weight: bold;
}

header p {
    font-size: 1.5rem;
    margin-top: 10px;
}

.modules {
    display: flex;
    justify-content: space-between;
    width: 80%;
}

.module {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 50px 30px;
    border-radius: 15px;  /* 更圆的角 */
    cursor: pointer;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out, box-shadow 0.3s ease; /* 添加阴影过渡 */
    width: 30%;
    margin: 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
}

.module:hover {
    transform: scale(1.05);  /* 鼠标悬停时更大 */
    opacity: 0.9;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3); /* 悬停时阴影加重 */
}


.module h2 {
    font-size: 2rem;
}

/* 过渡动画效果 */
body.transitioning {
    overflow: hidden;
    animation: pageZoomOut 1s ease-in-out forwards;
}

@keyframes pageZoomOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(10);
        opacity: 0;
    }
}

.detail-page {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    min-height: 100vh;
}

.back-btn {
    background-color: #3498db;
    border: none;
    padding: 15px 25px;  /* 增大按钮大小 */
    border-radius: 8px;  /* 更大的圆角 */
    color: white;
    cursor: pointer;
    font-size: 1.2rem;  /* 增大文字大小 */
    position: absolute;
    top: 20px;
    left: 20px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.back-btn:hover {
    background-color: #2980b9;
    transform: scale(1.05); /* 悬停时轻微放大 */
}


.back-btn:hover {
    background-color: #2980b9;
}

.page-title {
    text-align: center;
    font-size: 3.5rem;  /* 加大标题文字 */
    margin-top: 80px;
    font-weight: bold;
    color: #f1c40f; /* 标题颜色 */
}


.causes-container {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
}

.causes-column {
    width: 45%;
    padding: 10px;
    overflow-y: auto;
    max-height: 500px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.causes-column h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #f1c40f;
}

.scrollable-content {
    overflow-y: auto;
    max-height: 400px;
}

ul {
    list-style: none;
}

.cause-item {
    display: flex;
    align-items: center;
    margin: 20px 0;
    border-radius: 15px;  /* 更圆的角 */
    padding: 20px;
    background: rgba(255, 255, 255, 0.2);  /* 更亮的背景 */
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* 添加阴影 */
}

.cause-item:hover {
    transform: scale(1.05);  /* 悬停时更大 */
    background-color: rgba(255, 255, 255, 0.3); /* 更亮的背景 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); /* 加强阴影效果 */
}


.cause-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 20px;
}

.cause-description h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.cause-description p {
    font-size: 1rem;
    line-height: 1.5;
}

/* 经过部分 */
/* 修改 .timeline 为带时间标记的时间轴 */
.timeline {
    position: relative;
    padding: 20px 0;
    margin-top: 50px;
    min-height: 100vh; /* 时间线贯穿页面 */
    overflow: hidden; /* 防止滚动条影响布局 */
}

/* 时间轴的主线 */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: #f1c40f;
    transform: translateX(-50%);
}

/* 在时间轴上标注年份 */
.timeline .year-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    font-weight: bold;
    color: #f1c40f;
    text-align: center;
}

/* 为了给时间添加“空隙”，在合适的位置上展示 */
.year-755 {
    top: 10%;
}

.year-756 {
    top: 30%;
}

.year-757 {
    top: 50%;
}

.year-758 {
    top: 70%;
}

.year-759 {
    top: 90%;
}

/* .timeline-event 样式保持不变，确保左右交替排列 */
.timeline-event {
    position: relative;
    width: 45%;
    margin: 40px 0;
    padding: 10px;
    cursor: pointer;
    display: inline-block;
}

/* 右边事件 */
.timeline-event.right {
    float: right;
    text-align: left;
    clear: both;
}

/* 左边事件 */
.timeline-event.left {
    float: left;
    text-align: right;
    clear: both;
}

/* 调整事件的内容框和时间的布局 */
.event-time {
    font-size: 1.2rem;
    font-weight: bold;
    color: #f1c40f;
    position: absolute;
    top: -30px; /* 时间位置在事件框上方 */
    left: 50%; /* 水平居中 */
    transform: translateX(-50%); /* 完全居中 */
    text-align: center;
    white-space: nowrap;
    z-index: 2;
}

/* 调整事件框的大小 */
.event-content {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 25px 30px;  /* 增大内边距 */
    border-radius: 8px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    color: white;
    display: inline-block;
    max-width: 85%;  /* 增加最大宽度 */
    word-wrap: break-word;
    font-size: 1.2rem;  /* 增加字体大小 */
    line-height: 1.8;  /* 增加行高 */
}

/* 事件框 hover 效果 */
.event-content:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.2);
}

/* 增大每个事件方框的大小 */
.content-box {
    background-color: rgba(255, 255, 255, 0.45);
    padding: 40px;
    border-radius: 15px;
    margin-top: 40px;
    font-size: 1.3rem;  /* 增大字体 */
    line-height: 1.8;
    max-width: 950px;  /* 增加最大宽度 */
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 调整标题和内容文字的大小 */
.event-content h4 {
    font-size: 1.4rem;  /* 增大标题字体 */
    margin-bottom: 12px;
    color: white;
}

.event-content p {
    font-size: 1.05rem;  /* 增大内容字体 */
    line-height: 1.6;
    color: white;
}

/* 页面容器 */
.results {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-top: 50px;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.result {
    width: 48%;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result-content ul {
    padding-left: 20px;
    line-height: 1.8;
}

.result-content li {
    font-size: 1.2rem;
    color: #333;
}

.result h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

/* 积极影响部分的样式 */
.good {
    background-color: #d4edda;
    border-left: 5px solid #28a745;
}

.good:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 255, 0, 0.2);
}

/* 消极影响部分的样式 */
.bad {
    background-color: #f8d7da;
    border-left: 5px solid #dc3545;
}

.bad:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.2);
}




/* 响应式设计 */
@media (max-width: 768px) {
    .timeline-event {
        width: 90%;
        float: none;
        margin: 20px auto;
        text-align: center;
    }

    .timeline::before {
        left: 50%;
    }

    .event-time {
        top: -30px; /* 小屏幕时间位置优化 */
    }
}
