/* 传奇弹窗样式 */
.legend-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* width: 35%; */
    width: 480px;
    max-width: 600px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #d0bb94;
    z-index: 1000;
    font-family: "Microsoft YaHei", "SimHei", sans-serif;
    color: #fff;
    text-shadow: 1px 1px 2px #000,
        -1px -1px 2px rgba(0, 0, 0, 0.5);
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    display: none;
    border-radius: 8px;
    /* overflow: hidden; */
    z-index: 12;
}

.legend-mask {
    position: fixed;
    z-index: 11;
    width: 100%;
    height: 100%;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
}

.close-btn {
    color: #dfc38f;
    font-size: 28px;
    border: 2px solid #dfc38f;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    right: -60px;
    cursor: pointer;
    transition: transform .3s ease-in-out;
}

.close-btn:hover {
    transform: rotate(90deg);
}

.popup-content {
    background: rgba(0, 0, 0, 0.5);
}

.popup-content img {
    width: 100%;
}

.red-ribbon {
    height: 3px;
    margin-bottom: 10px;
    background:
        linear-gradient(90deg,
            transparent 10%,
            #ff0000 30%,
            #8b0000 40%,
            #ff0000 50%,
            #8b0000 60%,
            #ff0000 70%,
            transparent 90%);
    animation: ribbon-glow 5s linear infinite;
    filter: drop-shadow(0 0 5px #ff0000);
}

.scroll-news {
    padding: 20px;
    max-height: 250px;
    overflow-y: auto;
    list-style: none;
}

.scroll-news::-webkit-scrollbar {
    width: 0px;
}

.scroll-news::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.scroll-news::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d4af37, #8b0000);
    border-radius: 4px;
}

.news-item {
    padding: 15px 0;
    border-bottom: 1px dashed #d0bb94;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.news-item:hover {
    background: rgba(139, 0, 0, 0.3);
    transform: translateX(5px);
}

.news-time {
    color: #ffdd9e;
    font-weight: bold;
    min-width: 90px;
    text-align: right;
    margin-right: 15px;
    font-size: 0.9rem;
}

.news-text {
    flex: 1;
    text-align: left;
    font-size: 1.1rem;
}

.urgent {
    display: inline-block;
    background: linear-gradient(to right, #ff0000, #8b0000);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    margin-right: 10px;
    font-weight: bold;
    font-size: 0.9rem;
    animation: urgent-pulse 1.5s infinite;
}

/* 动画效果 */
@keyframes popIn {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }

    70% {
        transform: translate(-50%, -50%) scale(1.05);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes flame-glow {
    0% {
        box-shadow: 0 0 5px #ff0000;
        opacity: 0.7;
    }

    100% {
        box-shadow: 0 0 20px #ff4500, 0 0 30px #ff0000;
        opacity: 1;
    }
}

@keyframes ribbon-glow {
    0% {
        background-position-x: -550px;
        opacity: 0.8;
    }

    100% {
        background-position-x: 550px;
        opacity: 1;
    }
}

@keyframes urgent-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px #ff0000;
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 15px #ff0000;
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 5px #ff0000;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .legend-popup {
        width: 80%;
    }

    .close-btn {
        top: 105%;
        right: 46%;
    }

    .news-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-time {
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {}