/* 纪念日动画容器 */
.anniversary-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.9), rgba(30, 30, 40, 0.95));
    border-radius: 20px;
    padding: 40px;
    z-index: 9999999;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 
                0 0 50px rgba(76, 195, 198, 0.4),
                inset 0 0 30px rgba(125, 200, 164, 0.2);
    border: 2px solid rgba(76, 195, 198, 0.3);
    text-align: center;
    min-width: 350px;
    max-width: 90%;
    transition: all 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeIn 0.8s ease-out;
    overflow: hidden;
    box-sizing: border-box;
}

/* 缩小后的状态 - 右下角 */
.anniversary-notification.minimized {
    top: auto;
    bottom: 30px;
    right: 30px;
    left: auto;
    transform: translate(0, 0) scale(0.7);
    padding: 15px 25px;
    min-width: 280px;
    border-radius: 15px;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(76, 195, 198, 0.3);
}

/* 移动设备上的缩小状态 */
@media (max-width: 768px) {
    .anniversary-notification.minimized {
        bottom: 20px;
        right: 20px;
        transform: translate(0, 0) scale(0.6);
        min-width: 220px;
        padding: 12px 18px;
    }
}

@media (max-width: 480px) {
    .anniversary-notification.minimized {
        bottom: 15px;
        right: 15px;
        transform: translate(0, 0) scale(0.5);
        min-width: 180px;
        padding: 10px 15px;
    }
    
    /* 在非常小的屏幕上，进一步缩小并调整位置 */
    @media (max-height: 600px) {
        .anniversary-notification.minimized {
            bottom: 10px;
            right: 10px;
            transform: translate(0, 0) scale(0.45);
            min-width: 150px;
        }
    }
}

/* 关闭按钮 */
.anniversary-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.anniversary-close:hover {
    background: rgba(255, 100, 100, 0.8);
    transform: rotate(90deg);
}

/* 标题样式 */
.anniversary-title {
    font-size: 3.5rem;
    margin-bottom: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    line-height: 1.2;
}

/* 流萤二字的特殊样式 */
.firefly-text {
    background: -webkit-linear-gradient(135deg, #39f2b4, #b9ff7b 25%, #ffdb57 50%, #ff4d00 55%, #e0772c 60%, #e4ff4c 80%, #63ffa7 95%, #08dfbf);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    -webkit-background-size: 200% 100%;
    -webkit-animation: flowCss 12s infinite linear;
    background: linear-gradient(135deg, #39f2b4, #b9ff7b 25%, #ffdb57 50%, #ff4d00 55%, #e0772c 60%, #e4ff4c 80%, #63ffa7 95%, #08dfbf);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-size: 200% 100%;
    animation: flowCss 12s infinite linear;
    display: inline-block;
}

/* 二周年快乐的样式 */
.anniversary-text {
    font-size: 2.2rem;
    margin-top: 5px;
    background: linear-gradient(90deg, #4cc3c6, #7dc8a4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
    letter-spacing: 1px;
    line-height: 1.3;
}

/* 日期样式 */
.anniversary-date {
    font-size: 1.3rem;
    color: #aaa;
    margin-top: 15px;
    letter-spacing: 1px;
    font-family: monospace;
}

/* 缩小后的内容样式 */
.anniversary-notification.minimized .anniversary-title {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.anniversary-notification.minimized .anniversary-text {
    font-size: 1.3rem;
    margin-top: 2px;
}

.anniversary-notification.minimized .anniversary-date {
    font-size: 0.9rem;
    margin-top: 8px;
}

.anniversary-notification.minimized .anniversary-close {
    width: 22px;
    height: 22px;
    font-size: 16px;
    top: 8px;
    right: 8px;
}

/* 装饰元素 */
.decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    border-radius: 20px;
}

.decoration::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(76, 195, 198, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

/* 动画关键帧 */
@keyframes flowCss {
  0% { background-position: 0 0; }
  100% { background-position: -400% 0; }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 响应式调整 - 完整显示状态 */
@media (max-width: 768px) {
    .anniversary-notification {
        padding: 30px 20px;
        min-width: 280px;
        border-radius: 15px;
    }
    
    .anniversary-title {
        font-size: 2.5rem;
    }
    
    .anniversary-text {
        font-size: 1.8rem;
    }
    
    .anniversary-date {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .anniversary-notification {
        padding: 25px 15px;
        min-width: 250px;
        max-width: 85%;
        border-radius: 12px;
    }
    
    .anniversary-title {
        font-size: 2rem;
    }
    
    .anniversary-text {
        font-size: 1.5rem;
    }
    
    .anniversary-date {
        font-size: 1rem;
    }
    
    .anniversary-close {
        width: 25px;
        height: 25px;
        font-size: 18px;
    }
}

/* 防止在移动设备上被键盘顶起 */
.anniversary-notification.minimized {
    transform-origin: bottom right;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .anniversary-close {
        min-width: 44px;
        min-height: 44px;
    }
    
    .anniversary-notification.minimized {
        min-width: 160px;
    }
}

/* 防止文本选中 */
.anniversary-notification {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 针对iOS Safari的优化 */
@supports (-webkit-touch-callout: none) {
    .anniversary-notification {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}