/* 公告按钮容器样式 */
.announcement-btn-container {
    position: absolute;
    top: 15px;
    right: 70px; /* 将公告按钮放在播放模式按钮的左侧 */
    z-index: 10;
}

/* 公告面板样式 */
.announcement-container {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 80%;
    max-width: 500px;
    background-color: rgba(30, 40, 60, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 100;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.3s ease;
    overflow-y: auto;
    max-height: 80vh;
    border: 1px solid rgba(160, 214, 255, 0.2); /* 添加浅蓝色边框 */
}

.announcement-container.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: pulse 1s ease-out; /* 添加脉冲动画效果 */
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(160, 214, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(160, 214, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(160, 214, 255, 0); }
}

.announcement-content {
    padding: 30px;
    color: #ffffff; /* 更改为纯白色，提高可读性 */
    font-size: 18px;
    line-height: 1.6;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* 增强文字阴影，进一步提高可读性 */
}

/* 网站URL样式 */
.site-url {
    color: #a0d6ff; /* 使用与强调文本相同的浅蓝色 */
    font-weight: bold;
}

/* 公告内容中的段落样式 */
.announcement-content p {
    margin-bottom: 15px;
}

/* 公告内容中的有序列表样式 */
.announcement-list {
    text-align: left;
    padding-left: 25px;
    margin: 0;
    counter-reset: item;
    list-style-type: none;
}

.announcement-list li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 10px;
    counter-increment: item;
    transition: transform 0.2s ease, opacity 0.2s ease; /* 添加过渡效果 */
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s forwards;
    animation-delay: calc(0.1s * var(--item-index, 1)); /* 使用CSS变量实现延迟 */
}

/* 为每个列表项添加动画延迟 */
.announcement-list li:nth-child(1) { --item-index: 1; }
.announcement-list li:nth-child(2) { --item-index: 2; }
.announcement-list li:nth-child(3) { --item-index: 3; }
.announcement-list li:nth-child(4) { --item-index: 4; }
.announcement-list li:nth-child(5) { --item-index: 5; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.announcement-list li::before {
    content: counter(item) ".";
    position: absolute;
    left: -25px;
    color: #a0d6ff; /* 使用与强调文本相同的浅蓝色 */
    font-weight: bold;
}

/* 确保列表在移动设备上正确显示 */
@media (max-width: 480px) {
    .announcement-list {
        padding-left: 15px;
    }

    .announcement-content {
        padding: 20px;
        font-size: 16px;
    }
}

/* 公告内容中的强调文本 */
.announcement-content strong,
.announcement-content em {
    color: #a0d6ff; /* 强调文本使用浅蓝色 */
    font-weight: bold;
}

/* 遮罩层 */
.announcement-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 99;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.announcement-overlay.show {
    display: block;
    opacity: 1;
}

.close-announcement-btn {
    background: none;
    border: none;
    color: rgba(224, 240, 255, 0.7); /* 匹配新的文本颜色 */
    font-size: 20px; /* 减小字体大小 */
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-announcement-btn:hover {
    color: #e0f0ff; /* 匹配新的文本颜色 */
    transform: scale(1.1);
}

/* 公告标题样式 */
.announcement-container .playlist-header h3 {
    color: #a0d6ff; /* 使用浅蓝色，使标题更加突出 */
    font-size: 20px; /* 减小字体大小 */
    font-weight: 600; /* 加粗标题 */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /* 增强文字阴影 */
    line-height: 1.2; /* 添加行高控制 */
}

/* 隐藏滚动条但保留滚动功能 */
.announcement-container {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.announcement-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
