.apc-anniversary-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.apc-anniversary-overlay.apc-open {
    opacity: 1;
    pointer-events: auto;
}

.apc-anniversary-popup {
    width: min(92vw, 580px);
    max-height: calc(100vh - 30px);
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    color: #fdfcff;
    background: linear-gradient(145deg, #071127 0%, #0f2449 45%, #163d73 100%);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: translateY(18px) scale(0.97);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.apc-anniversary-overlay.apc-open .apc-anniversary-popup {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.apc-close-button {
    border: 0;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 24px;
    line-height: 1;
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 5;
    cursor: pointer;
    transition: background 0.2s ease;
}

.apc-close-button:hover,
.apc-close-button:focus {
    background: rgba(255, 255, 255, 0.28);
}

.apc-top-effects {
    height: 165px;
    position: relative;
    background:
        radial-gradient(circle at 15% 30%, rgba(255, 232, 94, 0.45) 0%, rgba(255, 232, 94, 0) 44%),
        radial-gradient(circle at 80% 10%, rgba(255, 117, 138, 0.38) 0%, rgba(255, 117, 138, 0) 42%),
        radial-gradient(circle at 60% 80%, rgba(95, 233, 255, 0.32) 0%, rgba(95, 233, 255, 0) 45%);
}

#apc-fireworks-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.apc-twinkle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.95);
    animation: apcTwinkle 1.4s infinite ease-in-out;
}

.apc-twinkle-1 {
    top: 24px;
    left: 20%;
}

.apc-twinkle-2 {
    top: 52px;
    left: 77%;
    animation-delay: 0.3s;
}

.apc-twinkle-3 {
    top: 92px;
    left: 52%;
    animation-delay: 0.7s;
}

.apc-content {
    padding: 20px 24px 26px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.apc-content h2 {
    margin: 0 0 10px;
    font-size: clamp(1.6rem, 3.4vw, 2.1rem);
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.apc-content p {
    margin: 0 0 18px;
    color: #d6e9ff;
    font-size: 1rem;
}

#apc-anniversary-image {
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    object-fit: scale-down;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
}

@keyframes apcTwinkle {
    0%,
    100% {
        transform: scale(0.6);
        opacity: 0.55;
    }
    50% {
        transform: scale(1.35);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .apc-anniversary-overlay {
        padding: 12px;
    }

    .apc-content {
        padding: 18px 16px 20px;
    }

    .apc-top-effects {
        height: 140px;
    }
}
