body {
    font-family: Arial, sans-serif;
    line-height: 1.6;   /*设置行高*/
    margin: 0;
    padding: 0;
    background-color: #f7f7f7;
    color: #333;
}

header {
    background: linear-gradient(135deg, #8A2BE2, #4B0082);
    color: #fff;
    padding: 1rem 0; /*设置头部上下内边距*/
    text-align: center; /*文本居中*/
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);/*添加阴影*/
}



.logo {
    font-size: 1.5rem;
}

nav ul {
    list-style: none; /*移除列表项的默认样式符号*/
    padding: 0;
}

nav ul li {
    display: inline; /*将导航项设置为行内元素*/
    margin: 0 10px;  /*设置导航项的左右外边距*/
}

nav ul li a {
    color: #fff;
    text-decoration: none;/*去下划线*/
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    margin-bottom: 20px; /*设置标题下方外边距*/
}

.story-section {
    display: flex;     /*弹性布局*/ 
    align-items: center;
    margin-bottom: 20px;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    justify-content: space-between;   /*故事部分项目水平分布*/
    gap: 20px;     /*故事部分内项目之间的间距*/
}

.story-section img {
    width: 45%;
    height: auto;
    border-radius: 8px;
}

.story-section p {
    width: 50%;
    margin: 0;
}

footer {
    text-align: center;
    padding: 10px;
    background-color: #333;
    color: #fff;
    position: fixed;
    width: 100%;
    bottom: 0;
}

/* 互动剧情入口样式 */
.interactive-banner {
    background: linear-gradient(135deg, #8A2BE2, #4B0082);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.interactive-banner p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.interactive-btn {
    display: inline-block;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.interactive-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #fff;
}

@media (max-width: 768px) {
    main {
        padding: 18px 14px 36px;
    }

    h2 {
        margin: 6px 0 18px;
        font-size: clamp(1.6rem, 7vw, 2rem);
    }

    .interactive-banner {
        margin-bottom: 20px;
        padding: 18px 14px;
    }

    .interactive-btn {
        width: 100%;
        min-height: 46px;
    }

    .story-section,
    .story-section.reverse {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 12px;
        margin-bottom: 16px;
    }

    .story-section img,
    .story-section p {
        width: 100%;
    }

    .story-section img {
        order: -1;
        max-height: 280px;
        object-fit: cover;
    }

    .story-section p {
        font-size: 0.96rem;
        line-height: 1.85;
        text-align: justify;
        overflow-wrap: anywhere;
    }
}
