/* ==================== 社区公告弹窗 ==================== */
.community-announcement-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 40, 70, .6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.community-announcement-modal.show {
    display: flex;
    animation: annFadeIn .3s ease;
}
@keyframes annFadeIn { from { opacity: 0; } to { opacity: 1; } }

.ann-modal-content {
    position: relative;
    width: min(780px, 100%);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(20, 50, 90, .3);
    overflow: hidden;
    animation: annSlideUp .35s ease;
}
@keyframes annSlideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.ann-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e8edf5;
    background: linear-gradient(135deg, #f8f4ff 0%, #fff8f0 50%, #f0f8ff 100%);
}
.ann-modal-head-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ann-modal-head-title .ann-icon {
    font-size: 22px;
}
.ann-modal-head-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #2a3a5c;
    letter-spacing: .02em;
}
.ann-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(0,0,0,.06);
    border-radius: 50%;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    transition: background .2s;
}
.ann-modal-close:hover { background: rgba(0,0,0,.12); color: #333; }

.ann-tabs {
    display: flex;
    gap: 0;
    padding: 0 24px;
    border-bottom: 1px solid #e8edf5;
    background: #fafbfd;
}
.ann-tab {
    flex: 1;
    padding: 14px 12px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #7a8a9e;
    cursor: pointer;
    position: relative;
    transition: color .2s;
}
.ann-tab:hover { color: #3a5a8a; }
.ann-tab.active {
    color: #3a5a8a;
}
.ann-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: linear-gradient(90deg, #7b5ea7, #4a90c2);
    border-radius: 3px 3px 0 0;
}
.ann-tab-date {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #a0b0c0;
    margin-top: 2px;
}
.ann-tab.active .ann-tab-date { color: #5a7a9a; }

.ann-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scroll-behavior: smooth;
}
.ann-article { display: none; }
.ann-article.active { display: block; animation: annContentFade .3s ease; }
@keyframes annContentFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.ann-cover {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 20px;
    display: block;
}
.ann-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a2a4a;
    margin: 0 0 8px;
    line-height: 1.4;
}
.ann-meta {
    font-size: 13px;
    color: #8a9aaa;
    margin-bottom: 16px;
}
.ann-salutation {
    font-size: 15px;
    color: #3a4a6a;
    margin: 0 0 12px;
    line-height: 1.7;
}
.ann-section {
    margin: 20px 0 12px;
}
.ann-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #2a4a7a;
    margin: 0 0 8px;
    padding-left: 12px;
    border-left: 4px solid #7b5ea7;
}
.ann-subsection-title {
    font-size: 15px;
    font-weight: 600;
    color: #3a5a8a;
    margin: 14px 0 6px;
}
.ann-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ann-list li {
    font-size: 14px;
    color: #4a5a7a;
    padding: 6px 0 6px 20px;
    position: relative;
    line-height: 1.7;
}
.ann-list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 14px;
    width: 6px;
    height: 6px;
    background: #7b5ea7;
    border-radius: 50%;
}
.ann-paragraph {
    font-size: 14px;
    color: #4a5a7a;
    line-height: 1.8;
    margin: 10px 0;
}
.ann-warn-box {
    background: linear-gradient(135deg, #fff8f0, #fff3e6);
    border: 1px solid #f5d9b5;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 16px 0;
}
.ann-warn-box-title {
    font-size: 14px;
    font-weight: 700;
    color: #b85c20;
    margin: 0 0 8px;
}
.ann-warn-box .ann-list li { color: #7a5030; }
.ann-warn-box .ann-list li::before { background: #e8a050; }
.ann-signature {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed #d0d8e8;
    text-align: right;
    font-size: 13px;
    color: #6a7a8a;
    line-height: 1.8;
}

.ann-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid #e8edf5;
    background: #fafbfd;
    gap: 12px;
}
.ann-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6a7a8a;
    cursor: pointer;
    user-select: none;
}
.ann-remember input {
    width: 16px;
    height: 16px;
    accent-color: #7b5ea7;
}
.ann-close-btn {
    padding: 10px 28px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #7b5ea7, #4a90c2);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.ann-close-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(123, 94, 167, .35);
}

/* 浮动"社区公告"按钮 */
.ann-fab {
    position: fixed;
    right: 20px;
    bottom: 82px;
    z-index: 990;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9a56, #ff6b6b);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 107, 107, .35);
    transition: transform .2s, box-shadow .2s;
    animation: annPulse 2.5s infinite;
}
@keyframes annPulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(255, 107, 107, .35); }
    50% { box-shadow: 0 6px 28px rgba(255, 107, 107, .55); }
}
.ann-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(255, 107, 107, .5);
}

/* 响应式 */
@media (max-width: 680px) {
    .ann-modal-content { max-height: 95vh; border-radius: 14px; }
    .ann-modal-head { padding: 16px 18px 12px; }
    .ann-modal-head-title h2 { font-size: 16px; }
    .ann-tabs { padding: 0 12px; }
    .ann-tab { font-size: 13px; padding: 12px 6px; }
    .ann-modal-body { padding: 16px 18px; }
    .ann-title { font-size: 17px; }
    .ann-section-title { font-size: 15px; }
    .ann-list li, .ann-paragraph { font-size: 13px; }
    .ann-modal-foot { padding: 12px 16px; }
    .ann-fab { right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); width: 44px; height: 44px; font-size: 16px; }
    .ann-close-btn { padding: 9px 22px; font-size: 13px; }
}

/* ==================== 右下角浮动按钮竖排布局 ==================== */
/* 统一三个按钮（回到顶部↑ / 社区公告📢 / 使用说明?）为竖排列 */
.back-to-top { right: 20px !important; bottom: 24px !important; }
.guide-fab { right: 20px !important; bottom: 138px !important; }

@media (max-width: 768px) {
    .back-to-top { right: 16px !important; bottom: calc(20px + env(safe-area-inset-bottom)) !important; }
    .ann-fab { right: 16px !important; bottom: calc(78px + env(safe-area-inset-bottom)) !important; }
    .guide-fab { right: 16px !important; bottom: calc(134px + env(safe-area-inset-bottom)) !important; }
}

.ann-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.event-announcement-link {
    display: inline-flex;
    margin-top: 14px;
    padding-bottom: 3px;
    color: #315d96;
    border-bottom: 1px solid currentColor;
    font-weight: 800;
    text-decoration: none;
}
@media (max-width: 680px) {
    .ann-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ann-tab:nth-child(-n+2) { border-bottom: 1px solid #e8edf5; }
}
