/* ===== 响应式适配 ===== */

/* 平板 */
@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-date {
        flex-direction: column;
        gap: 8px;
    }

    .date-separator {
        display: none;
    }

    .countdown-container {
        gap: 6px;
    }

    .countdown-item {
        padding: 16px 10px;
        min-width: 65px;
    }

    .countdown-number {
        font-size: 2rem;
    }

    .countdown-separator {
        font-size: 1.5rem;
        margin: 0 -2px;
    }

    /* 时光轴移动端：单列 */
    .timeline-line {
        left: 20px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        flex-direction: row;
        padding-left: 50px;
        padding-right: 0;
        text-align: left;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-item:nth-child(odd) .timeline-card::after,
    .timeline-item:nth-child(even) .timeline-card::after {
        left: -8px;
        right: auto;
        border-left: none;
        border-right: 8px solid rgba(26, 26, 46, 0.6);
    }

    /* 照片墙移动端：双列 */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 160px;
        gap: 10px;
    }

    .gallery-item--wide {
        grid-column: span 2;
    }

    .gallery-item--tall {
        grid-row: span 1;
    }

    /* 情书 */
    .letter-paper {
        padding: 32px 24px;
    }

    .letter-line {
        font-size: 1rem;
    }

    .letter-stamp {
        display: none;
    }
}

/* 手机小屏 */
@media (max-width: 480px) {
    :root {
        --section-padding: 60px 0;
    }

    .section-inner {
        padding: 0 16px;
    }

    .section-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .section-desc {
        font-size: 0.85rem;
        margin-bottom: 32px;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 4px 16px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .countdown-container {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .countdown-item {
        min-width: 68px;
        padding: 12px 10px;
    }

    .countdown-number {
        font-size: 1.6rem;
    }

    .countdown-separator {
        display: none;
    }

    .countdown-total {
        font-size: 0.8rem;
    }

    /* 时光轴 */
    .timeline-card {
        padding: 16px;
    }

    .timeline-title {
        font-size: 0.95rem;
    }

    .timeline-desc {
        font-size: 0.8rem;
    }

    /* 照片墙 */
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 140px;
    }

    .gallery-item--wide {
        grid-column: span 2;
    }

    /* 情书 */
    .letter-paper {
        padding: 24px 20px;
        border-radius: var(--radius-md);
    }

    .letter-line {
        font-size: 0.9rem;
        line-height: 2;
    }

    /* 留言 */
    .guestbook-form {
        gap: 12px;
    }

    .guest-submit {
        width: 100%;
    }

    /* 尾声 */
    .footer-text {
        font-size: 1.1rem;
    }

    .footer-heart {
        font-size: 2.4rem;
    }

    .music-btn {
        top: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
    }
}

/* 超小屏 */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .countdown-item {
        min-width: 54px;
        padding: 10px 6px;
    }

    .countdown-number {
        font-size: 1.4rem;
    }

    .countdown-label {
        font-size: 0.7rem;
    }
}

/* 横屏手机 */
@media (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        padding: 40px 0;
    }

    .hero-badge {
        margin-bottom: 12px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .scroll-hint {
        display: none;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-heart,
    .rose-petal {
        display: none;
    }
}
