@charset "UTF-8";

/* =========================================
   响应式布局样式表
   针对平板和移动端设备的适配
   ========================================= */

/* 
   断点说明：
   - max-width: 1024px (平板/小型笔记本)
   - max-width: 768px (平板竖屏/大屏手机)
   - max-width: 480px (手机)
*/

/* 通用响应式调整 */
@media (max-width: 1024px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 2rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
}

/* 平板和移动端适配 */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    /* 导航优化 */
    .nav-container {
        padding: 0.5rem 0;
    }

    .nav-logo {
        font-size: 1.3rem;
        left: 1.5rem;
        z-index: 1002;
    }

    .nav-toggle {
        display: flex;
        right: 1.5rem;
        z-index: 1002;
    }

    /* 汉堡菜单动画 */
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(255, 240, 245, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-top: 0;
        transition: all 0.4s ease-in-out;
        z-index: 1001;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    .nav-menu.active li {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.2s;
    }

    .nav-menu a {
        font-size: 1.3rem;
        padding: 0.5rem 1rem;
        display: block;
        /* 触摸优化 */
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* 英雄区域调整 */
    .hero-content {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

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

    /* 倒计时区域适配 */
    .countdown-section {
        padding: 2rem 1rem;
    }

    .countdown-wrapper {
        padding: 1.5rem;
        background: var(--card-gradient);
        border-radius: 20px;
        box-shadow: var(--card-shadow);
    }

    .countdown-display {
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .time-unit {
        min-width: 70px;
        padding: 1rem 0.5rem;
        background: var(--card-gradient);
        border-radius: 15px;
        box-shadow: var(--card-shadow);
    }

    .time-value {
        font-size: 2rem;
        line-height: 1;
        margin-bottom: 0.5rem;
        color: var(--emphasis-color);
        font-weight: 700;
        font-family: 'Playfair Display', serif;
        display: block;
        /* 移动端文本渲染优化 */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
        transform: translateZ(0);
        backface-visibility: hidden;
        /* 保持与PC端一致的渐变效果 */
        background: linear-gradient(45deg, var(--emphasis-color), var(--romantic-pink));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
        animation: pulse 2s ease-in-out infinite;
        /* 移动端备用方案 */
        @supports not (-webkit-background-clip: text) {
            color: var(--emphasis-color);
            background: none;
            text-shadow: 2px 2px 6px rgba(255, 105, 180, 0.3),
                         0 0 15px rgba(255, 105, 180, 0.2);
        }
    }

    .time-label {
        font-size: 0.7rem;
        letter-spacing: 2px;
        color: var(--light-accent);
        text-transform: uppercase;
        font-weight: 500;
    }

    .meeting-info {
        padding: 1.2rem;
        margin: 1.5rem 0;
        background: var(--card-gradient);
        border-radius: 18px;
        box-shadow: var(--card-shadow);
        border: 1px solid rgba(255, 107, 157, 0.2);
    }

    .info-item {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem 0;
        text-align: center;
    }

    .info-text {
        text-align: center;
        width: 100%;
    }

    .info-text strong {
        font-size: 1rem;
        margin-bottom: 0.3rem;
        color: var(--emphasis-color);
        font-weight: 600;
    }

    .info-text span {
        font-size: 0.9rem;
        color: var(--text-color);
    }

    .info-icon {
        color: var(--accent-color);
    }

    .romantic-message {
        padding: 1.2rem;
        margin-top: 1.5rem;
        background: var(--card-gradient);
        border-radius: 18px;
        box-shadow: var(--hover-shadow);
        border: 1px solid var(--soft-pink);
    }

    .romantic-message p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 0.8rem;
        color: var(--text-color);
    }

    .romantic-message .highlight-text {
        font-size: 1.1rem;
        color: var(--emphasis-color);
        font-weight: 600;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    }

    .flower-decoration {
        transform: scale(0.6);
        top: -30px;
        right: -20px;
        opacity: 0.8;
    }
    
    /* 日志详情页移动端适配 */
    .journal-detail-content {
        max-width: 95%;
        max-height: 85vh;
        border-radius: 20px;
        margin: 1rem;
    }

    .journal-detail-header {
        padding: 1.5rem 1.5rem 1rem;
        flex-direction: column-reverse;
        gap: 1rem;
        align-items: flex-end;
    }

    .journal-detail-title-area {
        width: 100%;
        justify-content: space-between;
    }

    .journal-detail-title {
        font-size: 1.4rem;
    }

    .journal-detail-mood {
        font-size: 1.8rem;
    }

    .journal-detail-meta {
        padding: 0.8rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .journal-detail-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .journal-detail-content-text {
        padding: 1.5rem;
    }

    .journal-detail-text {
        font-size: 1rem;
        line-height: 1.6;
    }

    .journal-detail-images {
        padding: 0 1.5rem 1.5rem;
    }

    .journal-detail-image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    /* 穿越人海SVG适配 */
    .crowd-scene {
        width: 100%;
        height: auto;
    }

    /* 日志编辑器移动端适配 */
    .journal-modal-body {
        padding: 1.5rem;
    }

    .mood-selector {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
        justify-content: center;
    }
    
    .mood-btn {
        width: 100%;
        justify-content: center;
        align-items: center;
        padding: 0.8rem 0.4rem;
        font-size: 0.9rem;
        margin: 0 auto;
    }

    .journal-modal-footer {
        display: flex;
        justify-content: center;
        gap: 1rem;
        padding: 1.2rem 1.5rem 1.5rem;
    }

    .journal-btn-cancel,
    .journal-btn-save {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.8rem 0;
        margin: 0;
    }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
    .countdown-section {
        padding: 1rem 0.5rem;
    }

    .countdown-wrapper {
        padding: 1rem;
        background: var(--card-gradient);
        border-radius: 15px;
        box-shadow: var(--card-shadow);
    }

    .countdown-title {
        font-family: 'Ma Shan Zheng', cursive;
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
        color: var(--romantic-pink);
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        animation: titleGlow 3s ease-in-out infinite alternate;
    }

    .countdown-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
        color: var(--secondary-color);
    }

    .countdown-display {
        gap: 0.8rem;
        grid-template-columns: repeat(2, 1fr);
        max-width: 300px;
        margin: 0 auto 1.5rem;
    }

    .time-unit {
        min-width: 80px;
        padding: 0.8rem 0.5rem;
        background: var(--card-gradient);
        border-radius: 12px;
        box-shadow: var(--card-shadow);
    }

    .time-value {
        font-size: 2rem;
        line-height: 1;
        margin-bottom: 0.5rem;
        color: var(--emphasis-color);
        font-weight: 700;
        font-family: 'Playfair Display', serif;
        display: block;
        /* 超小屏幕文本渲染优化 */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
        transform: translateZ(0);
        backface-visibility: hidden;
        /* 保持与PC端一致的渐变效果 */
        background: linear-gradient(45deg, var(--emphasis-color), var(--romantic-pink));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
        animation: pulse 2s ease-in-out infinite;
        /* 超小屏幕备用方案 */
        @supports not (-webkit-background-clip: text) {
            color: var(--emphasis-color);
            background: none;
            text-shadow: 2px 2px 6px rgba(255, 105, 180, 0.3),
                         0 0 15px rgba(255, 105, 180, 0.2);
        }
    }

    .time-label {
        font-size: 0.6rem;
        letter-spacing: 2px;
        color: var(--light-accent);
        text-transform: uppercase;
        font-weight: 500;
    }

    .meeting-info {
        padding: 1rem;
        margin: 1rem 0;
        background: var(--card-gradient);
        border-radius: 15px;
        box-shadow: var(--card-shadow);
    }

    .info-text strong {
        font-size: 0.9rem;
        color: var(--emphasis-color);
    }

    .info-text span {
        font-size: 0.8rem;
        color: var(--text-color);
    }

    .info-icon {
        color: var(--accent-color);
    }

    .romantic-message {
        padding: 1rem;
        margin-top: 1rem;
        background: var(--card-gradient);
        border-radius: 15px;
        box-shadow: var(--hover-shadow);
    }

    .romantic-message p {
        font-size: 0.9rem;
        color: var(--text-color);
    }

    .romantic-message .highlight-text {
        font-size: 1rem;
        color: var(--emphasis-color);
        font-weight: 600;
    }

    .flower-decoration {
        transform: scale(0.5);
        top: -25px;
        right: -15px;
        opacity: 0.7;
    }
    
    /* 日志详情页超小屏幕适配 */
    .journal-detail-header {
        padding: 1.2rem 1rem 0.8rem;
    }
    
    .journal-detail-content-text {
        padding: 1.2rem 1rem;
    }
    
    .journal-detail-images {
        padding: 0 1rem 1.2rem;
    }

    .journal-detail-image-grid {
        grid-template-columns: 1fr;
    }

    /* 日志编辑器超小屏幕适配 */
    .journal-modal-body {
        padding: 1rem;
    }

    .journal-modal-footer {
        padding: 1rem 1rem 1.5rem;
    }
}

/* 横屏模式适配 */
@media (max-width: 768px) and (orientation: landscape) {
    .countdown-section {
        padding: 1rem;
    }

    .countdown-wrapper {
        padding: 1rem;
        margin: 1rem 0;
        background: var(--card-gradient);
        border-radius: 18px;
        box-shadow: var(--card-shadow);
        border: 1px solid var(--soft-pink);
    }

    .countdown-title {
        font-family: 'Ma Shan Zheng', cursive;
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
        color: var(--romantic-pink);
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        animation: titleGlow 3s ease-in-out infinite alternate;
    }

    .countdown-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        color: var(--secondary-color);
    }

    .time-value {
        font-size: 2rem;
        line-height: 1;
        margin-bottom: 0.5rem;
        color: var(--emphasis-color);
        font-weight: 700;
        font-family: 'Playfair Display', serif;
        display: block;
        /* 横屏模式文本优化 */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
        transform: translateZ(0);
        backface-visibility: hidden;
        /* 保持与PC端一致的渐变效果 */
        background: linear-gradient(45deg, var(--emphasis-color), var(--romantic-pink));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
        animation: pulse 2s ease-in-out infinite;
        /* 横屏模式备用方案 */
        @supports not (-webkit-background-clip: text) {
            color: var(--emphasis-color);
            background: none;
            text-shadow: 2px 2px 6px rgba(255, 105, 180, 0.3),
                         0 0 15px rgba(255, 105, 180, 0.2);
        }
    }

    .time-label {
        font-size: 0.8rem;
        letter-spacing: 2px;
        color: var(--light-accent);
        text-transform: uppercase;
        font-weight: 500;
    }

    .meeting-info {
        padding: 0.8rem;
        margin: 1rem 0;
        background: var(--card-gradient);
        border-radius: 15px;
        box-shadow: var(--card-shadow);
    }

    .info-text strong {
        color: var(--emphasis-color);
    }

    .info-text span {
        color: var(--text-color);
    }

    .info-icon {
        color: var(--accent-color);
    }

    .romantic-message {
        padding: 0.8rem;
        margin-top: 1rem;
        background: var(--card-gradient);
        border-radius: 15px;
    }
}