/* 顶部公告栏样式 */
.top-announcement {
    background-color: #fff8e6;
    border-bottom: 1px solid #ffe082;
    padding: 12px 0 8px;
    position: absolute; /* 改为绝对定位 */
    top: 70px; /* 位于导航栏下方 */
    left: 0;
    right: 0;
    z-index: 90;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.top-announcement.hidden {
    transform: translateY(-100%);
}

.top-announcement .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.announcement-content {
    color: #e65100;
    font-size: 0.95rem;
    text-align: center;
    padding: 5px 0 0 0;
}

.announcement-link {
    color: #e65100;
    font-weight: 600;
    text-decoration: underline;
    margin-left: 5px;
    transition: color 0.2s ease;
}

.announcement-link:hover {
    color: #c43e00;
}

.close-announcement {
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    color: #e65100;
    cursor: pointer;
    font-size: 1.2rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-announcement:hover {
    background-color: rgba(255, 224, 130, 0.5);
    transform: rotate(90deg);
}

/* 弹窗公告样式 - 美化版 */
.announcement-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.announcement-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.announcement-modal {
    background-color: white;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    padding: 2rem;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
li {
    list-style: none;
}

/* 弹窗顶部装饰条 */
.announcement-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.announcement-modal-overlay.active .announcement-modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f5f5f5;
    color: #666;
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-top: 10px;
}

.modal-title {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

/* 标题装饰 */
.modal-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 3px;
}

.modal-subtitle {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.modal-body {
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.8;
    padding: 0 10px;
}

/* 弹窗内容中的列表样式 */
.modal-body ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 5px;
}

.modal-body li::before {
    content: '✓';
    color: #2ecc71;
    font-weight: bold;
    position: absolute;
    left: -1.5rem;
}

.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 美化按钮样式 */
.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: center;
    flex: 1;
}

.modal-btn.primary {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.modal-btn.secondary {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.modal-btn.secondary:hover {
    background-color: #e9ecef;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .top-announcement .container {
        flex-wrap: wrap;
        padding: 0 40px 0 20px; /* 给关闭按钮留出空间 */
    }
    
    .announcement-modal {
        padding: 1.5rem 1rem;
    }
    
    .modal-title {
        font-size: 1.4rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}
