/* =========================
 * 首页专属样式
 * ========================= */

/* 漂浮爱心背景动画 */
@keyframes floating-heart {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* 呼吸灯效果 */
@keyframes breathing {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 闪烁星星 */
@keyframes twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    font-size: 20px;
    color: #ffb6c1;
    animation: floating-heart 15s linear infinite;
    opacity: 0.6;
}

h1::before,
h1::after {
    content: '❤️';
    position: absolute;
    font-size: 24px;
    animation: twinkle 2s ease-in-out infinite;
}

h1::before {
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
}

h1::after {
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    animation-delay: 1s;
}

.together-line {
    margin: 0;
    font-size: 18px;
    line-height: 1.7;
}

.big-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--main-color);
    display: inline-block;
    min-width: 52px;
}

.bounce {
    animation: pop .35s ease;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.milestone {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff5fa, #fff0f5);
    border-left: 4px solid var(--main-color);
    position: relative;
    overflow: hidden;
}

.milestone::before {
    content: '💕';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    opacity: 0.3;
    animation: breathing 2s ease-in-out infinite;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 8px;
    flex-wrap: wrap;
}

.month-title {
    font-size: 22px;
    font-weight: 700;
    color: #d94a93;
}

.month-switch {
    display: flex;
    gap: 8px;
}

.month-switch button {
    border: none;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    background: var(--main-color);
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.month-switch button:hover {
    background: #ff4f93;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.4);
}

table.calendar {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar th,
.calendar td {
    text-align: center;
    border: 1px solid var(--soft-gray);
    padding: 12px 6px;
    height: 76px;
    vertical-align: top;
    position: relative;
    border-radius: 8px;
}

.calendar th {
    background: #fff0f7;
    color: #b84a84;
    height: auto;
}

.day-num {
    font-weight: 600;
}

.today {
    outline: 2px dashed #ffafcf;
    outline-offset: -6px;
    background: #fff7fb;
}

.monthly-anniversary,
.main-anniversary {
    color: #fff;
    background: var(--heart-gradient);
    cursor: pointer;
}

.monthly-anniversary .tag,
.main-anniversary .tag {
    font-size: 12px;
    display: block;
    margin-top: 4px;
}

.main-anniversary {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

@media (max-width: 767px) {
    .month-title {
        font-size: 18px;
    }

    .calendar th,
    .calendar td {
        padding: 8px 2px;
        height: 62px;
        font-size: 13px;
    }

    .month-switch button {
        padding: 7px 12px;
    }
}
