/* ============================================================
   公告横幅（Cartoon 主题扩展）
   深色玻璃 + 青紫霓虹，支持主题设置里的标题/副标题/背景图/按钮
   ============================================================ */
.acg-announcement {
    --acg-cyan: #6ee7ff;
    --acg-violet: #b49cff;
    --acg-ink: #f5f9ff;
    --acg-muted: #a9bdd6;
    --acg-line: rgba(126, 231, 255, 0.22);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 0 0 18px;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--acg-line);
    border-radius: 24px;
    background:
        radial-gradient(120% 150% at 96% 0%, rgba(180, 156, 255, 0.22), transparent 44%),
        radial-gradient(110% 130% at 0% 100%, rgba(110, 231, 255, 0.12), transparent 50%),
        linear-gradient(135deg, rgba(10, 17, 32, 0.68) 0%, rgba(16, 29, 52, 0.56) 52%, rgba(8, 14, 27, 0.74) 100%);
    -webkit-backdrop-filter: blur(16px) saturate(1.12);
    backdrop-filter: blur(16px) saturate(1.12);
    box-shadow:
        0 24px 60px rgba(6, 13, 28, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: var(--acg-ink);
}

.acg-announcement__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-position: center;
    background-size: cover;
    opacity: 0.18;
    filter: saturate(0.85) contrast(1.05);
    pointer-events: none;
}

.acg-announcement__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 14, 28, 0.94) 0%, rgba(8, 14, 28, 0.55) 55%, rgba(8, 14, 28, 0.88) 100%);
}

.acg-announcement__grid-lines {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(126, 231, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(126, 231, 255, 0.055) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: linear-gradient(105deg, rgba(0, 0, 0, 0.75), transparent 62%);
    mask-image: linear-gradient(105deg, rgba(0, 0, 0, 0.75), transparent 62%);
    opacity: 0.7;
}

.acg-announcement__scan {
    position: absolute;
    top: -2px;
    left: 0;
    z-index: 0;
    width: 100%;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 0%, rgba(110, 231, 255, 0.55) 50%, transparent 100%);
    opacity: 0;
    animation: acg-announcement-scan 9s linear infinite;
}

.acg-announcement__corner {
    position: absolute;
    z-index: 1;
    width: 24px;
    height: 24px;
    border-color: rgba(126, 231, 255, 0.45);
    border-style: solid;
    pointer-events: none;
}

.acg-announcement__corner--tl {
    top: 14px;
    left: 14px;
    border-width: 1px 0 0 1px;
    border-radius: 8px 0 0 0;
}

.acg-announcement__corner--br {
    right: 14px;
    bottom: 14px;
    border-width: 0 1px 1px 0;
    border-radius: 0 0 8px 0;
}

.acg-announcement__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(20px, 3vw, 38px);
    align-items: start;
}

.acg-announcement--with-side .acg-announcement__inner {
    grid-template-columns: minmax(0, 1fr) minmax(260px, var(--acg-side-width, 34%));
    align-items: stretch;
}

.acg-announcement__copy {
    min-width: 0;
}

.acg-announcement__eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #8fe9ff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.acg-announcement__pulse {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--acg-cyan);
    box-shadow:
        0 0 0 4px rgba(110, 231, 255, 0.12),
        0 0 16px rgba(110, 231, 255, 0.65);
    animation: acg-announcement-pulse 2.4s ease-in-out infinite;
}

.acg-announcement__eyebrow-line {
    flex: 0 1 34px;
    height: 1px;
    background: linear-gradient(90deg, rgba(110, 231, 255, 0.55), transparent);
}

.acg-announcement__title {
    margin: 10px 0 8px;
    color: #ffffff;
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    text-wrap: balance;
    text-shadow: 0 0 34px rgba(110, 231, 255, 0.16);
}

.acg-announcement__subtitle {
    margin: 0 0 14px;
    color: var(--acg-muted);
    font-size: 13px;
    line-height: 1.65;
}

.acg-announcement__body {
    max-width: 64ch;
    max-height: 190px;
    overflow: auto;
    padding-right: 8px;
    color: #c7d6ea;
    font-size: 13.5px;
    line-height: 1.75;
    overflow-wrap: anywhere;
    scrollbar-width: thin;
    scrollbar-color: rgba(126, 231, 255, 0.35) transparent;
}

.acg-announcement__body::-webkit-scrollbar {
    width: 5px;
}

.acg-announcement__body::-webkit-scrollbar-track {
    background: transparent;
}

.acg-announcement__body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(126, 231, 255, 0.35);
}

.acg-announcement__body > :first-child {
    margin-top: 0;
}

.acg-announcement__body > :last-child {
    margin-bottom: 0;
}

.acg-announcement__body p,
.acg-announcement__body ul,
.acg-announcement__body ol {
    margin: 0 0 8px;
}

.acg-announcement__body ul,
.acg-announcement__body ol {
    padding-left: 18px;
}

.acg-announcement__body li {
    margin: 2px 0;
}

.acg-announcement__body li::marker {
    color: var(--acg-cyan);
}

.acg-announcement__body a {
    color: #8fe9ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(143, 233, 255, 0.3);
}

.acg-announcement__body a:hover {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.55);
}

.acg-announcement__body strong {
    color: #ffffff;
    font-weight: 700;
}

.acg-announcement__body code {
    padding: 1px 5px;
    border: 1px solid rgba(126, 231, 255, 0.16);
    border-radius: 5px;
    background: rgba(110, 231, 255, 0.08);
    color: #b9f4ff;
    font-size: 0.92em;
}

.acg-announcement__body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.acg-announcement__empty {
    color: #9fb3cb;
}

.acg-announcement__side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 18px;
    border: 1px solid rgba(126, 231, 255, 0.14);
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(12, 24, 44, 0.72), rgba(8, 16, 32, 0.5));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.acg-announcement__side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(126, 231, 255, 0.12);
    color: #8fe9ff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.acg-announcement__side-head i {
    flex: 0 0 auto;
    color: rgba(143, 233, 255, 0.55);
    font-size: 12px;
}

.acg-announcement__side-body {
    flex: 1 1 auto;
    max-height: 220px;
    overflow: auto;
    padding-right: 6px;
    white-space: pre-line;
    color: #c7d6ea;
    font-size: 13px;
    line-height: 1.9;
    overflow-wrap: anywhere;
    scrollbar-width: thin;
    scrollbar-color: rgba(126, 231, 255, 0.35) transparent;
}

.acg-announcement__side-body::-webkit-scrollbar {
    width: 5px;
}

.acg-announcement__side-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(126, 231, 255, 0.35);
}

.acg-announcement__footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(126, 231, 255, 0.16);
}

.acg-announcement__footer-label {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 8px;
    color: #8fa8c4;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.acg-announcement__footer-label i {
    color: rgba(143, 233, 255, 0.7);
    font-size: 11px;
}

.acg-announcement__footer-line {
    flex: 1 1 40px;
    height: 1px;
    background: linear-gradient(90deg, rgba(110, 231, 255, 0.5), transparent);
}

.acg-announcement__actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
    width: max-content;
    max-width: 100%;
    min-width: 0;
}

.acg-announcement__btn {
    position: relative;
    display: flex;
    flex: 0 0 200px;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 52px;
    padding: 9px 10px;
    overflow: hidden;
    border: 1px solid rgba(126, 231, 255, 0.16);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(24, 45, 76, 0.7), rgba(11, 23, 43, 0.62));
    color: #e8f6ff;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.acg-announcement__btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(110, 231, 255, 0.16), transparent 45%, rgba(180, 156, 255, 0.12));
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.acg-announcement__btn:hover {
    border-color: rgba(126, 231, 255, 0.48);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.28),
        0 0 20px rgba(110, 231, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

.acg-announcement__btn:hover::before {
    opacity: 1;
}

.acg-announcement__btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(110, 231, 255, 0.2);
}

.acg-announcement__btn-icon {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 0 0 30px;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(126, 231, 255, 0.18);
    border-radius: 9px;
    background: rgba(110, 231, 255, 0.1);
    color: var(--acg-cyan);
    font-size: 13px;
    text-shadow: 0 0 12px rgba(110, 231, 255, 0.5);
}

.acg-announcement__btn-text {
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acg-announcement__btn-arrow {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    margin-left: auto;
    color: rgba(143, 233, 255, 0.45);
    font-size: 9px;
    opacity: 0;
    transform: translate(-3px, 3px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.acg-announcement__btn:hover .acg-announcement__btn-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

.acg-announcement__data {
    display: none !important;
}

:root[data-theme="dark"] .acg-announcement {
    border-color: rgba(126, 231, 255, 0.3);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@keyframes acg-announcement-pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.55;
        transform: scale(0.82);
    }
}

@keyframes acg-announcement-scan {
    0% {
        top: -2px;
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .acg-announcement__inner,
    .acg-announcement--with-side .acg-announcement__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .acg-announcement__side {
        padding: 14px;
    }

    .acg-announcement__footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .acg-announcement__footer-line {
        display: none;
    }

    .acg-announcement__footer-label {
        width: 100%;
    }

    .acg-announcement__actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .acg-announcement {
        padding: 20px;
        border-radius: 20px;
    }

    .acg-announcement__title {
        font-size: clamp(24px, 7vw, 30px);
    }

    .acg-announcement__body {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .acg-announcement__side-body {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .acg-announcement__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .acg-announcement__btn:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .acg-announcement__btn {
        min-height: 50px;
        padding: 8px;
    }

    .acg-announcement__btn-icon {
        flex-basis: 26px;
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .acg-announcement__btn-text {
        font-size: 11.5px;
    }

    .acg-announcement__btn-arrow {
        display: none;
    }
}

@media (max-width: 380px) {
    .acg-announcement__actions {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acg-announcement__pulse,
    .acg-announcement__scan {
        animation: none;
    }

    .acg-announcement__btn,
    .acg-announcement__btn::before,
    .acg-announcement__btn-arrow {
        transition: none;
    }
}
