*{
    padding:0;
    margin:0;

}
body{
    background-color: rgba(15, 49, 128, 0.922);
}
h1, h4, p, blockquote {
    color: aliceblue;
}

/*border: 5px darkgray dashed;*/
header {
    background-color: rgba(3, 30, 94, 0.764);
    padding: 20px;
    text-align: center;
    background-image: url(images/微信图片_20251120211255_242_39-modified.png);
    background-position: 65% 50%;
    background-size:contain;
    background-repeat: no-repeat;
    position: relative;
}
/* 添加半透明遮罩调整整体透明度 */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(19, 3, 72, 0.38); /* 调整遮罩透明度 */
    z-index: 1;
}

/* 确保文字在遮罩上方 */
header h1,
header blockquote {
    position: relative;
    z-index: 2;
}

header h1 {
    color: #3b66d3;
    font-size: 2rem;
    margin-bottom: 10px;
}
header blockquote {
    color: #bbbdd8c8;
    font-style: italic;
    font-size: 1rem;
    margin: 0;
}
nav {
    /*background-color: rgba(3, 59, 162, 0.725);*/
    background: linear-gradient(to right, rgba(3, 59, 162, 0.8), rgba(20, 120, 200, 0.7));
    padding: 10px;
    border-radius: 4px;
}

nav li{
    color: rgba(5, 6, 90, 0);
    flex: 1;
    text-align: center;
}

nav a {
    color: rgba(255, 255, 255, 0.757);
    text-decoration: none;
    padding: 12px 0;
    display: block;
    transition: background-color 0.3s;
    border-radius: 5px;
    font-size: 17px;
}

nav ul li a:hover {
    text-decoration:underline;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-around;

}


main {
    padding: 20px;
    margin-bottom: 10px;
    background-image: url(images/微信图片_20251120195559_240_39.jpg);
    background-size:cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
}

.welcome {
    margin-top: 100px;
    margin-bottom: 100px;
    text-align: center;
    justify-content: center;
    text-shadow: 0 0 9px rgba(255, 255, 255, 0.8),
                 0 0 18px rgba(255, 255, 255, 0.6),
                 0 0 27px rgba(255, 255, 255, 0.4);
}
 
.welcome h4 {
    margin-bottom: 15px;
}

.welcome p {
    line-height: 1.6;
    background-color: #4e5c9f79;
    border-radius: 8px;
}
.welcome h3{
    margin-top: 20px;
}
.lian {
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
    background-color: rgba(110, 143, 205, 0.344);
    margin-top: 50px;
    margin-bottom: 100px;
    padding: 30px;
    padding-left: 50px;
    table-layout: auto;
    justify-content: center;
    border-radius: 8px;
}
.lian table{
    color: aliceblue;
    margin: 0 auto;
}
.lian tr{
    background-image: url(images/8202ba1024c4c1bcd21d60cc3664837e-modified.png);
    background-position: 0% 60%;
    background-size:contain;
    background-repeat: no-repeat;
    position: relative;
}

/* 图片轮播容器 */
.image-section {
    text-align: center;
    margin: 30px 0;
}

.slideshow {
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.slides {
    display: flex;
    width: 300%; /* 3张图片 = 300% */
    animation: slide 12s infinite; /* 总时长 = 图片数量 × 4秒 */
}

.slide {
    width: 33.333%; /* 100% ÷ 图片数量 */
}

.slide img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}


/* 轮播动画 */
@keyframes slide {
    0% { transform: translateX(0); }
    33% { transform: translateX(0); }
    36% { transform: translateX(-33.333%); }
    66% { transform: translateX(-33.333%); }
    69% { transform: translateX(-66.666%); }
    97% { transform: translateX(-66.666%); }
    100% { transform: translateX(0); }
}
/* --- 1. 弹幕舞台：强制全屏覆盖 --- */
#danmaku-stage {
    position: fixed; /* 必须是 fixed，参照窗口定位 */
    top: 0;
    left: 0;
    width: 100vw;  /* 视口宽度 */
    height: 100vh; /* 视口高度 */
    pointer-events: none; /* 让鼠标穿透 */
    z-index: 999; 
    overflow: hidden; /* 防止出现滚动条 */
}

/* --- 2. 单条弹幕：紧凑化处理 --- */
.dm-item {
    position: absolute;
    white-space: nowrap; /* 不换行 */
    font-family: "Microsoft YaHei", sans-serif;
    font-weight: 400;
    
    /* 调整字体大小，原来的 24px 可能太大了，改小一点 */
    font-size: 15px; 
    
    /* 关键：行高设为 1，去掉多余的上下间距 */
    line-height: 1; 
    padding: 2px 0; /* 极小的内边距 */
    
    /* 视觉优化 */
    
    opacity: 0.9;
     /* --- 关键：消除虚影的魔法组合 --- */
    
    /* 1. 开启 3D 硬件加速背部渲染（防闪烁） */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    
    /* 2. 开启透视（强制 GPU 独立层） */
    perspective: 1000px;
    -webkit-perspective: 1000px;
    
    /* 3. 字体抗锯齿（让文字边缘更清晰，减少模糊） */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    will-change: transform;
/* 初始位置由 JS 控制，这里不需要写 transform */
    left: 0; /* 配合 translate3d 使用 */
    top: 0;
}
/* --- 弹幕交互区容器 --- */
.dm-wrapper {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

/* --- 底部常驻工具栏 --- */
.dm-toolbar {
    display: flex;
    gap: 10px;
}

/* 圆形按钮通用样式 */
.dm-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    user-select: none;
}

.dm-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* 1. 弹幕开关按钮 */
.dm-toggle-btn.active {
    background: #7dc5f5; /* 开启状态是蓝色 */
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.4);
}
.dm-toggle-btn.inactive {
    background: #7f8c8d; /* 关闭状态是灰色 */
    opacity: 0.7;
}
/* 加上斜线表示关闭 */
.dm-toggle-btn.inactive .icon {
    text-decoration: line-through;
}

/* 2. "弹"字按钮 */
.dm-trigger-btn {
    background: #7a2d2d; /* 醒目的粉色 */
}
.dm-trigger-btn .arrow {
    display: none; /* 默认隐藏箭头 */
    font-size: 12px;
}
/* 当面板打开时，按钮样式的变化 */
.dm-trigger-btn.open {
    background: #333;
    transform: rotate(180deg); /* 旋转按钮，或者只让箭头出现 */
}
.dm-trigger-btn.open .text {
    display: none; /* 隐藏"弹"字 */
}
.dm-trigger-btn.open .arrow {
    display: block; /* 显示箭头 */
}

/* --- 输入面板 (默认隐藏) --- */
.dm-panel {
    background: rgba(175, 175, 175, 0.178);
   
    padding: 15px;
    border-radius: 12px;
    width: 400px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    
    /* 动画关键属性 */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none; /* 隐藏时无法点击 */
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* 弹性动画 */
    
    /* 布局微调 */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 面板激活状态 */
.dm-panel.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* 以下复用之前的样式，稍作调整 */
.kaomoji-bar {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 5px;
}
.kaomoji-bar span {
    font-size: 12px;
    color: #fdfdfd;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}
.kaomoji-bar span:hover {
    background: #fff;
    color: #333;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.color-picker { display: flex; gap: 4px; }
.color-picker label { 
    width: 16px; height: 16px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; 
}
.color-picker input:checked + label { border-color: #fff; transform: scale(1.2); }
.color-picker input { display: none; }

#dm-input {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 6px;
    border-radius: 4px;
    outline: none;
}
.input-row button {
    background: #3498db;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

footer{
    text-align: center;
    margin: 10px 0;
}

footer p{
    color: #9eb6e9;
}
/* 响应式设计 适用于手机
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav a {
        display: block;
        width: 200px;
        text-align: center;
        margin-bottom: 10px;
    }*/