* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* 背景动画 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        #ff9a9e 0%, 
        #fad0c4 25%, 
        #ffd1ff 50%, 
        #fecfef 75%, 
        #ff9a9e 100%);
    background-size: 400% 400%;
    animation: gradientBG 25s ease infinite;
    z-index: -2;
}

.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 75% 75%, rgba(255, 182, 193, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 50% 10%, rgba(255, 105, 180, 0.05) 0%, transparent 50%);
    animation: floatOverlay 30s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatOverlay {
    0%, 100% { 
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 0.8;
    }
    33% { 
        transform: translateY(-20px) scale(1.05) rotate(1deg);
        opacity: 1;
    }
    66% { 
        transform: translateY(10px) scale(0.95) rotate(-1deg);
        opacity: 0.9;
    }
}
}

/* 飘落的心形 */
.hearts {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hearts::before,
.hearts::after {
    content: '💖';
    position: absolute;
    font-size: 20px;
    animation: fall linear infinite;
    opacity: 0.7;
}

.hearts::before {
    left: 20%;
    animation-duration: 10s;
    animation-delay: 0s;
}

.hearts::after {
    left: 70%;
    animation-duration: 12s;
    animation-delay: 3s;
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(135deg, 
        rgba(255, 182, 193, 0.15) 0%,
        rgba(255, 192, 203, 0.12) 30%,
        rgba(255, 218, 185, 0.10) 70%,
        rgba(255, 228, 225, 0.08) 100%);
    backdrop-filter: blur(25px) saturate(200%);
    box-shadow: 
        0 8px 32px rgba(255, 154, 158, 0.2),
        0 2px 16px rgba(255, 182, 193, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 2px solid rgba(255, 182, 193, 0.3);
    transition: all 0.3s ease;
}

.navbar:hover {
    background: linear-gradient(135deg, 
        rgba(255, 182, 193, 0.22) 0%,
        rgba(255, 192, 203, 0.18) 30%,
        rgba(255, 218, 185, 0.15) 70%,
        rgba(255, 228, 225, 0.12) 100%);
    transform: translateY(-1px);
    box-shadow: 
        0 12px 40px rgba(255, 154, 158, 0.25),
        0 4px 20px rgba(255, 182, 193, 0.15);
}

.nav-brand {
    font-size: 24px;
    font-weight: bold;
    color: #e91e63;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 182, 193, 0.3);
}

.nav-links a:hover {
    color: #e91e63;
    transform: translateY(-2px);
    background: rgba(255, 182, 193, 0.25);
    border: 1px solid rgba(255, 182, 193, 0.5);
    box-shadow: 0 8px 20px rgba(255, 182, 193, 0.3);
}

.nav-links a.active {
    background: linear-gradient(135deg, 
        rgba(233, 30, 99, 0.2) 0%,
        rgba(255, 182, 193, 0.15) 100%);
    color: #e91e63;
    border: 1px solid rgba(233, 30, 99, 0.4);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.2);
}

.nav-links a i {
    font-size: 16px;
    transition: all 0.3s ease;
}

.nav-links a:hover i {
    transform: scale(1.1);
}

/* 页面部分 */
.section {
    padding: 90px 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
    position: absolute; /* 1. 让所有section脱离文档流，进行重叠 */
    top: 0;
    left: 0;
    right: 0;
    visibility: hidden; /* 2. 用visibility替代display:none */
    opacity: 0;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 1; /* 默认在底层 */
}

.section.active {
    position: static; /* 使用 'static' 彻底恢复其在文档流中的位置 */
    visibility: visible;
    opacity: 1;
    z-index: 10; /* 确保激活的在最上层 */
}

/* 首页样式 */
.hero {
    text-align: center;
    padding: 60px 0;
    position: relative;
    z-index: 5;
}

.love-title {
    font-size: 3.8em;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 50%, #786fa6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #e91e63;
    margin-bottom: 60px;
    text-shadow: 0 4px 8px rgba(196, 69, 105, 0.3);
    font-weight: 600;
    letter-spacing: 2px;
    animation: gentleGlow 4s ease-in-out infinite alternate;
}

@keyframes gentleGlow {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(196, 69, 105, 0.4));
    }
    50% { 
        transform: scale(1.02);
        filter: drop-shadow(0 0 20px rgba(196, 69, 105, 0.6));
    }
}

.couple-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    margin-bottom: 60px;
}

.person {
    text-align: center;
    animation: bounce 3s ease-in-out infinite alternate;
}

.person:nth-child(3) {
    animation-delay: 1.5s;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.avatar {
    font-size: 80px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.heart-center {
    font-size: 60px;
    animation: heartbeat 2s ease-in-out infinite;
}

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

.person h3 {
    font-size: 24px;
    color: #e91e63;
}

.love-counter {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 45px 40px;
    box-shadow: 
        0 20px 50px rgba(255, 154, 158, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.love-counter:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 25px 60px rgba(255, 154, 158, 0.2),
        0 12px 35px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.love-counter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 154, 158, 0.6), transparent);
    animation: shimmer 3s ease infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

.love-counter h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
}

.duration {
    font-size: 24px;
    color: #e91e63;
    font-weight: bold;
}

/* 纪念日倒计时区域 */
.anniversary-section {
    margin-top: 3rem;
    text-align: center;
}

.anniversary-section h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #d63384;
    text-shadow: 0 2px 4px rgba(214, 51, 132, 0.3);
}

.anniversary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.anniversary-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.anniversary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.anniversary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.anniversary-card:hover::before {
    left: 100%;
}

.anniversary-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
    animation: bounce 2s infinite;
}

.anniversary-icon-img {
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    object-fit: cover;
    animation: bounce 2s infinite;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.anniversary-icon-img:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.anniversary-title {
    font-size: 1.2rem;
    color: #d63384;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.anniversary-countdown {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.anniversary-date {
    font-size: 0.9rem;
    color: #999;
    opacity: 0.8;
}

.countdown-urgent {
    animation: pulse 1.5s infinite;
}

.countdown-urgent .anniversary-countdown {
    color: #dc3545;
    font-weight: bold;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* 时光轴样式 */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #e91e63, #ff9a9e);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    width: 45%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 55%;
    text-align: left;
}

.timeline-date {
    background: #e91e63;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    display: inline-block;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-content h3 {
    color: #e91e63;
    margin-bottom: 15px;
    font-size: 20px;
}

/* 时光轴内容中的图片样式 */
.timeline-content .timeline-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 15px;
}

.timeline-content .timeline-image-wrapper:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.timeline-content .timeline-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.timeline-content .timeline-image-wrapper:hover img {
    transform: scale(1.1);
}

.timeline-content .timeline-images-horizontal {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 15px;
}

.timeline-content .timeline-image-wrapper.horizontal {
    flex: 1;
    min-width: 0;
    height: 150px;
}

/* 时光轴对侧图片样式 */
.timeline-image-item {
    position: relative;
    margin-bottom: 60px;
    width: 35%;
    height: 200px;
}

.timeline-image-item:nth-child(even) {
    left: 65%;
    text-align: left;
}

.timeline-image-item:nth-child(odd) {
    left: 0%;
    text-align: right;
}

.timeline-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-image-wrapper:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.timeline-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.timeline-image-wrapper:hover img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-image-wrapper:hover .image-overlay {
    opacity: 1;
}

.image-overlay i {
    color: white;
    font-size: 32px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* 横向排列多张图片 */
.timeline-images-horizontal {
    display: flex;
    gap: 10px;
    width: 100%;
    height: 100%;
}

.timeline-image-wrapper.horizontal {
    flex: 1;
    min-width: 0;
}

.timeline-image-wrapper.horizontal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 相册样式 */
.gallery-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 30px 0 40px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 100px;
    text-align: center;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.tab-btn.active {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52, #ff8a80);
    color: white;
    border-color: #ff6b6b;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    transform: translateY(-2px);
}

.tab-btn.active:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.5);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.photo-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1;
}

.photo-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.photo-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
}

.photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-wrapper img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px 15px 15px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-overlay {
    transform: translateY(0);
}

.photo-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: white;
}

.photo-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.photo-placeholder {
    font-size: 80px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.photo-item p {
    color: #e91e63;
    font-weight: bold;
    font-size: 16px;
}

.photo-placeholder-hint {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.photo-placeholder-hint p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    margin-top: 20px;
}

.timeline-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    margin: 40px 0;
}

.timeline-placeholder-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.timeline-placeholder p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    margin: 0;
}

/* 留言样式 */
.message-container {
    max-width: 600px;
    margin: 0 auto;
}

.message-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.char-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.messages-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    margin: 20px 0;
}

.messages-placeholder-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.messages-placeholder p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    margin: 0;
}

.message-form {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.message-form textarea {
    width: 100%;
    height: 120px;
    padding: 20px;
    border: 2px solid #e91e63;
    border-radius: 10px;
    font-size: 16px;
    resize: vertical;
    font-family: inherit;
}

.message-form button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #e91e63, #ff9a9e);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.3s ease;
}

.message-form button:hover {
    transform: translateY(-2px);
}

.message {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.message-content {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.message-time {
    text-align: right;
    color: #666;
    font-size: 14px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    background: transparent;
    text-align: center;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 2001;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    pointer-events: all;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.prev-btn {
    margin-left: 20px;
}

.next-btn {
    margin-right: 20px;
}

.close {
    position: fixed;
    right: 20px;
    top: 20px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    z-index: 2001;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close:hover {
    background: rgba(255, 0, 0, 0.3);
    transform: scale(1.1);
}

.modal-photo {
    font-size: 120px;
    margin-bottom: 20px;
    background: transparent;
    position: relative;
}

.modal-image, .modal-video {
    max-width: 85vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 25px;
    margin-top: 15px;
    color: white;
    min-width: 250px;
}

.modal-caption {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.modal-date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.media-counter {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* 相册项目视频样式 */
.video-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    pointer-events: none;
    transition: all 0.3s ease;
}

.photo-item:hover .video-play-overlay {
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%) scale(1.1);
}

.media-type {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 8px;
    border-radius: 15px;
    font-size: 12px;
    backdrop-filter: blur(5px);
}

/* 天气标题样式 */
.weather-title-vertical {
    display: inline-block;
    line-height: 0.8;
    font-size: 0.9em;
    font-weight: bold;
    color: #e91e63;
    text-shadow: 0 1px 2px rgba(233, 30, 99, 0.3);
    vertical-align: middle;
    margin: 0 2px;
    letter-spacing: 1px;
}

/* 天气信息样式 */
.weather-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    padding: 20px;
}

.weather-loading, .weather-error {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    padding: 40px;
}

.weather-widget {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px) saturate(150%);
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.3),
        0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 900px;
    max-width: 900px;
    min-height: 580px;
    max-height: 580px;
    position: relative;
}


.weather-tabs {
    display: flex;
    background: transparent;
    border-radius: 25px 25px 0 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    z-index: 2;
    border: none;
}

.weather-tabs::-webkit-scrollbar {
    display: none;
}

.weather-tab {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    min-width: 70px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.weather-tab:hover {
    color: #fff;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.15) 100%);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.weather-tab.active {
    color: #fff;
    background: linear-gradient(135deg, 
        rgba(255, 107, 107, 0.8) 0%, 
        rgba(255, 154, 158, 0.7) 100%);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.weather-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    border-radius: 2px 2px 0 0;
}

.weather-content {
    padding: 30px;
    background: transparent;
    border-radius: 25px;
    position: relative;
    z-index: 1;
    height: calc(100% - 60px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 107, 107, 0.6) transparent;
    border: none;
}

.weather-content::-webkit-scrollbar {
    width: 6px;
}

.weather-content::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 107, 0.6);
    border-radius: 3px;
}

.weather-content::-webkit-scrollbar-track {
    background: transparent;
}


/* 浪漫天气容器 */
.romantic-weather-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

/* 浪漫天气卡片 */
.romantic-weather-card {
    flex: 1;
    max-width: 300px;
    background: linear-gradient(135deg, 
        rgba(255, 182, 193, 0.2) 0%,
        rgba(255, 192, 203, 0.15) 50%,
        rgba(255, 218, 185, 0.1) 100%);
    border-radius: 25px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px) saturate(150%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 20px 40px rgba(255, 182, 193, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.romantic-weather-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(255, 182, 193, 0.4),
        0 15px 30px rgba(0, 0, 0, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

/* 左侧卡片特殊样式 */
.romantic-weather-left {
    background: linear-gradient(135deg, 
        rgba(135, 206, 235, 0.2) 0%,
        rgba(173, 216, 230, 0.15) 50%,
        rgba(176, 224, 230, 0.1) 100%);
    border-color: rgba(135, 206, 235, 0.3);
}

.romantic-weather-left:hover {
    box-shadow: 
        0 30px 60px rgba(135, 206, 235, 0.4),
        0 15px 30px rgba(0, 0, 0, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

/* 右侧卡片特殊样式 */
.romantic-weather-right {
    background: linear-gradient(135deg, 
        rgba(255, 182, 193, 0.2) 0%,
        rgba(255, 192, 203, 0.15) 50%,
        rgba(255, 218, 185, 0.1) 100%);
    border-color: rgba(255, 182, 193, 0.3);
}

/* 头像区域 */
.romantic-avatar-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.romantic-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
}

.romantic-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.romantic-person-info {
    flex: 1;
}

.romantic-name {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 5px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.romantic-location {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* 天气信息区域 */
.romantic-weather-info {
    text-align: center;
    position: relative;
    z-index: 2;
}

.romantic-main-weather {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
}

.romantic-temp {
    font-size: 56px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    line-height: 1;
}

.romantic-icon {
    font-size: 48px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.romantic-desc {
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.romantic-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.romantic-details span {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.romantic-details span:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 中间爱心连接 */
.romantic-heart-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    position: relative;
}

.romantic-heart-icon {
    font-size: 48px;
    animation: heartPulse 2s ease-in-out infinite;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 12px rgba(255, 182, 193, 0.6));
}

.romantic-heart-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    line-height: 1.2;
    letter-spacing: 2px;
}

@keyframes heartPulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.8; 
    }
    50% { 
        transform: scale(1.2); 
        opacity: 1; 
    }
}

/* 渐变背景装饰 */
.romantic-gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 25px;
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
}

.romantic-gradient-left {
    background: linear-gradient(45deg, 
        #87CEEB 0%, 
        #ADD8E6 25%,
        #B0E0E6 50%,
        #87CEFA 100%);
}

.romantic-gradient-right {
    background: linear-gradient(45deg, 
        #FFB6C1 0%, 
        #FFC0CB 25%,
        #FFDAB9 50%,
        #FFE4E1 100%);
}

/* 浪漫预报天气样式 */
.romantic-forecast-container {
    display: flex;
    gap: 30px;
    align-items: stretch;
    justify-content: center;
}

.romantic-forecast-card {
    flex: 1;
    max-width: 400px;
    background: linear-gradient(135deg, 
        rgba(255, 182, 193, 0.2) 0%,
        rgba(255, 192, 203, 0.15) 50%,
        rgba(255, 218, 185, 0.1) 100%);
    border-radius: 25px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px) saturate(150%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 20px 40px rgba(255, 182, 193, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.romantic-forecast-left {
    background: linear-gradient(135deg, 
        rgba(135, 206, 235, 0.2) 0%,
        rgba(173, 216, 230, 0.15) 50%,
        rgba(176, 224, 230, 0.1) 100%);
    border-color: rgba(135, 206, 235, 0.3);
}

.romantic-forecast-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.romantic-forecast-card .romantic-avatar {
    width: 60px;
    height: 60px;
}

.romantic-forecast-card .romantic-name {
    font-size: 20px;
}

.romantic-forecast-card .romantic-location {
    font-size: 14px;
}

.forecast-city {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
}

.forecast-days {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 5px 15px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* iOS 流畅滚动 */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 107, 107, 0.6) rgba(0, 0, 0, 0.1);
    position: relative;
}

/* 精美滚动条样式 */
.forecast-days::-webkit-scrollbar {
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.forecast-days::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, 
        rgba(255, 107, 107, 0.7) 0%, 
        rgba(255, 154, 158, 0.8) 100%);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.forecast-days::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, 
        rgba(255, 107, 107, 0.9) 0%, 
        rgba(255, 154, 158, 1) 100%);
}

.forecast-days::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.forecast-day {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    min-width: 140px;
    max-width: 140px;
    flex-shrink: 0; /* 防止压缩 */
    transition: all 0.3s ease;
}

.forecast-day:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.day-info {
    margin-bottom: 10px;
}

.day-name {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 3px;
}

.day-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.day-icon {
    font-size: 32px;
    margin: 8px 0;
}

.day-temp {
    color: #fff;
    font-weight: bold;
    font-size: 17px;
    margin: 5px 0;
}

.day-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
}

/* 天气占位符和错误样式 */
.weather-placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.weather-placeholder-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.forecast-unavailable {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.forecast-unavailable p {
    margin: 8px 0;
    font-size: 14px;
}

.forecast-unavailable p:first-child {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

/* 增强实时天气样式 */
.temp-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feels-like {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}

.detail-row span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

/* 预报天气增强样式 */
.day-details {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.day-uv {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

/* 预警信息样式 */
.weather-warnings {
    max-height: 400px;
    overflow-y: auto;
}

.warning-city {
    margin-bottom: 20px;
}

.warning-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.warning-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    border-left: 4px solid #2196F3;
    transition: all 0.3s ease;
}

.warning-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

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

.warning-type {
    font-weight: 600;
    color: #fff;
}

.warning-level {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
    font-weight: 600;
}

.warning-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 5px;
}

.warning-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.warning-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.no-warnings {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.no-warnings-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.no-warnings h3 {
    margin: 15px 0 10px;
    color: rgba(255, 255, 255, 0.9);
}

/* 浪漫生活指数样式 */
.romantic-indices-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.romantic-indices-card {
    flex: 1;
    max-width: 380px;
    background: linear-gradient(135deg, 
        rgba(255, 182, 193, 0.2) 0%,
        rgba(255, 192, 203, 0.15) 50%,
        rgba(255, 218, 185, 0.1) 100%);
    border-radius: 25px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px) saturate(150%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 20px 40px rgba(255, 182, 193, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.romantic-indices-left {
    background: linear-gradient(135deg, 
        rgba(135, 206, 235, 0.2) 0%,
        rgba(173, 216, 230, 0.15) 50%,
        rgba(176, 224, 230, 0.1) 100%);
    border-color: rgba(135, 206, 235, 0.3);
}

.romantic-indices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

.romantic-index-item {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.romantic-index-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

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

.romantic-index-name {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.romantic-index-level {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.romantic-index-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 浪漫空气质量样式 */
.romantic-air-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.romantic-air-card {
    flex: 1;
    max-width: 300px;
    background: linear-gradient(135deg, 
        rgba(255, 182, 193, 0.2) 0%,
        rgba(255, 192, 203, 0.15) 50%,
        rgba(255, 218, 185, 0.1) 100%);
    border-radius: 25px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px) saturate(150%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 20px 40px rgba(255, 182, 193, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.romantic-air-left {
    background: linear-gradient(135deg, 
        rgba(135, 206, 235, 0.2) 0%,
        rgba(173, 216, 230, 0.15) 50%,
        rgba(176, 224, 230, 0.1) 100%);
    border-color: rgba(135, 206, 235, 0.3);
}

.romantic-air-info {
    text-align: center;
    position: relative;
    z-index: 2;
}

.romantic-aqi-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.romantic-aqi-value {
    font-size: 48px;
    font-weight: 900;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    line-height: 1;
}

.romantic-aqi-category {
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.romantic-air-details {
    margin-top: 20px;
}

.romantic-air-details p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* API 提示样式 */
.weather-api-notice {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 152, 0, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* 响应式设计 */
/* 移动端天气样式 */
@media (max-width: 768px) {
    .weather-widget {
        width: 95%;
        max-width: 95%;
        min-height: 620px;
        max-height: 620px;
        margin: 0 auto;
    }
    
    .weather-cities {
        flex-direction: column;
        gap: 15px;
    }
    
    /* 移动端浪漫天气样式 */
    .romantic-weather-container {
        flex-direction: column;
        gap: 20px;
        padding: 0 10px;
    }

    .romantic-weather-card {
        max-width: none;
        padding: 25px 20px;
    }

    .romantic-avatar-section {
        gap: 12px;
        margin-bottom: 20px;
    }

    .romantic-avatar {
        width: 60px;
        height: 60px;
    }

    .romantic-name {
        font-size: 20px;
    }

    .romantic-location {
        font-size: 14px;
    }

    .romantic-main-weather {
        gap: 15px;
        margin: 20px 0;
    }

    .romantic-temp {
        font-size: 42px;
    }

    .romantic-icon {
        font-size: 36px;
    }

    .romantic-desc {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .romantic-details {
        gap: 10px;
    }

    .romantic-details span {
        padding: 6px 12px;
        font-size: 13px;
    }

    .romantic-heart-center {
        min-width: auto;
        flex-direction: row;
        padding: 15px 0;
    }

    .romantic-heart-icon {
        font-size: 36px;
        margin-bottom: 0;
        margin-right: 10px;
    }

    .romantic-heart-text {
        writing-mode: initial;
        text-orientation: initial;
        letter-spacing: 1px;
        font-size: 14px;
    }

    /* 移动端预报、指数和空气质量样式 */
    .romantic-forecast-container,
    .romantic-indices-container,
    .romantic-air-container {
        flex-direction: column;
        gap: 20px;
        padding: 0 10px;
    }

    .romantic-forecast-card,
    .romantic-indices-card,
    .romantic-air-card {
        max-width: none;
        padding: 25px 20px;
    }

    .romantic-forecast-header .romantic-avatar,
    .romantic-indices-card .romantic-avatar,
    .romantic-air-card .romantic-avatar {
        width: 50px;
        height: 50px;
    }

    .romantic-forecast-card .romantic-name,
    .romantic-indices-card .romantic-name,
    .romantic-air-card .romantic-name {
        font-size: 18px;
    }

    .romantic-indices-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .romantic-index-item {
        padding: 10px;
    }

    .romantic-index-name {
        font-size: 13px;
    }

    .romantic-index-text {
        font-size: 11px;
    }

    .romantic-aqi-main {
        gap: 15px;
        margin: 20px 0;
    }

    .romantic-aqi-value {
        font-size: 36px;
    }
    
    .weather-main {
        gap: 15px;
        margin: 20px 0;
    }
    
    .weather-icon {
        font-size: 45px;
    }
    
    .temperature {
        font-size: 36px;
    }
    
    .weather-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .weather-details span {
        padding: 8px 15px;
        margin: 0;
    }
    
    .forecast-days {
        flex-direction: row; /* 保持横向布局 */
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 15px 10px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        /* 隐藏滚动条但保持功能 */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .forecast-days::-webkit-scrollbar {
        display: none;
    }
    
    .forecast-day {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px 12px;
        min-width: 120px;
        max-width: 120px;
        flex-shrink: 0;
    }
    
    .day-info {
        margin-bottom: 8px;
        width: 100%;
    }
    
    .day-name {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 2px;
    }
    
    .day-date {
        font-size: 11px;
    }
    
    .day-icon {
        margin: 6px 0;
        font-size: 28px;
    }
    
    .day-temp {
        margin: 4px 0;
        font-size: 15px;
        font-weight: 700;
    }
    
    .day-desc {
        margin: 0;
        font-size: 11px;
        font-weight: 500;
    }
    
    /* 移动端新功能样式 */
    .indices-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .index-item {
        padding: 12px;
    }
    
    .index-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .warning-item {
        padding: 12px;
    }
    
    .warning-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .air-main {
        flex-direction: column;
        gap: 15px;
    }
    
    .aqi-value {
        font-size: 36px;
    }
    
    .weather-api-notice {
        font-size: 11px;
        padding: 6px 12px;
    }

@media (max-width: 768px) {
    .navbar {
        padding: 18px 25px;
        flex-direction: column;
        gap: 25px;
        backdrop-filter: blur(15px) saturate(160%);
    }
    
    .nav-links {
        gap: 25px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links a {
        padding: 10px 18px;
        border-radius: 20px;
        background: rgba(255, 182, 193, 0.2);
        border: 1px solid rgba(255, 182, 193, 0.4);
        gap: 6px;
        font-size: 14px;
    }
    
    .nav-links a i {
        font-size: 14px;
    }
    
    .nav-links a:hover {
        background: rgba(255, 182, 193, 0.35);
        transform: translateY(-2px);
        border: 1px solid rgba(255, 182, 193, 0.6);
    }
    
    .section {
        padding: 120px 25px 50px;
    }
    
    .love-title {
        font-size: 2.8em;
        margin-bottom: 50px;
        line-height: 1.2;
    }
    
    .couple-info {
        flex-direction: column;
        gap: 40px;
        margin-bottom: 50px;
    }
    
    .love-counter {
        padding: 35px 30px;
        margin: 0 10px;
    }
    
    .love-counter h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .timeline::before {
        left: 50%;
        width: 2px;
    }
    
    .timeline-item {
        width: 42%;
        margin-bottom: 40px;
    }
    
    .timeline-item:nth-child(odd) {
        left: 0;
        text-align: right;
    }
    
    .timeline-item:nth-child(even) {
        left: 58%;
        text-align: left;
    }
    
    .timeline-date {
        margin-bottom: 15px;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .timeline-content {
        padding: 18px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 25px rgba(255, 154, 158, 0.1);
    }
    
    .timeline-content h3 {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .timeline-content p {
        font-size: 12px;
        line-height: 1.4;
    }
    
    /* 手机端时光轴图片 */
    .timeline-image-item {
        width: 32%;
        height: 150px;
        -webkit-tap-highlight-color: transparent;
    }
    
    .timeline-image-item:nth-child(even) {
        left: 68%;
    }
    
    .timeline-image-item:nth-child(odd) {
        left: 0%;
    }
    
    .timeline-image-wrapper {
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .image-overlay {
        opacity: 0.7; /* 手机端默认显示一些透明度 */
    }
    
    .image-overlay i {
        font-size: 24px;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
        padding: 20px 10px;
        max-width: 100%;
    }
    
    .message-form {
        padding: 25px;
        margin: 0 10px 30px;
    }
    
    .message {
        margin: 0 10px 20px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 15px 20px;
        gap: 20px;
    }
    
    .nav-brand {
        font-size: 20px;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .nav-links a {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 15px;
        gap: 5px;
    }
    
    .nav-links a i {
        font-size: 12px;
    }
    
    .section {
        padding: 110px 20px 40px;
    }
    
    .love-title {
        font-size: 2.2em;
        margin-bottom: 40px;
    }
    
    .couple-info {
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .avatar {
        font-size: 60px;
        margin-bottom: 15px;
        width: 100px;
        height: 100px;
    }
    
    .heart-center {
        font-size: 45px;
    }
    
    .person h3 {
        font-size: 20px;
    }
    
    .love-counter {
        padding: 30px 25px;
        margin: 0 5px;
        border-radius: 20px;
    }
    
    .love-counter h2 {
        font-size: 22px;
    }
    
    .duration {
        font-size: 20px;
    }
    
    .timeline-item {
        width: 40%;
        margin-bottom: 35px;
    }
    
    .timeline-item:nth-child(odd) {
        left: 0;
        text-align: right;
    }
    
    .timeline-item:nth-child(even) {
        left: 60%;
        text-align: left;
    }
    
    .timeline-content {
        padding: 16px;
    }
    
    .timeline-content h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .timeline-content p {
        font-size: 11px;
        line-height: 1.3;
    }
    
    .timeline-date {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    /* 小屏幕时光轴图片 */
    .timeline-image-item {
        width: 30%;
        height: 120px;
    }
    
    .timeline-image-item:nth-child(even) {
        left: 70%;
    }
    
    .timeline-image-item:nth-child(odd) {
        left: 0%;
    }
    
    .image-overlay i {
        font-size: 20px;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 15px 5px;
    }
    
    .message-form {
        padding: 20px;
        margin: 0 5px 25px;
    }
    
    .message-form textarea {
        height: 100px;
        padding: 15px;
        font-size: 15px;
    }
    
    .message-form button {
        padding: 12px;
        font-size: 16px;
        margin-top: 15px;
    }
    
    .message {
        margin: 0 5px 15px;
        padding: 18px;
    }
    
    .message-content {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .message-time {
        font-size: 13px;
    }
    
    .modal-content {
        max-width: 100vw;
        max-height: 100vh;
        padding: 0;
    }

    .modal-nav {
        width: 100%;
    }

    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .prev-btn {
        margin-left: 15px;
    }

    .next-btn {
        margin-right: 15px;
    }

    .modal-photo {
        font-size: 80px;
        margin-bottom: 15px;
    }

    .modal-image, .modal-video {
        max-width: 90vw;
        max-height: 65vh;
        border-radius: 12px;
    }

    .modal-info {
        min-width: 200px;
        padding: 12px 20px;
        margin-top: 10px;
    }

    .modal-caption {
        font-size: 16px;
    }

    .modal-date {
        font-size: 13px;
    }

    .media-counter {
        font-size: 11px;
    }

    .close {
        right: 15px;
        top: 15px;
        width: 45px;
        height: 45px;
        font-size: 25px;
    }

    .video-play-overlay {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .section {
        padding: 105px 15px 35px;
    }
    
    .love-title {
        font-size: 2em;
        margin-bottom: 35px;
    }
    
    .love-counter {
        padding: 25px 20px;
        margin: 0;
    }
    
    .love-counter h2 {
        font-size: 20px;
    }
    
    .duration {
        font-size: 18px;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .timeline-item {
        width: 38%;
    }
    
    .timeline-item:nth-child(odd) {
        left: 0;
        text-align: right;
    }
    
    .timeline-item:nth-child(even) {
        left: 62%;
        text-align: left;
    }
    
    .timeline-content {
        padding: 14px;
    }
    
    .timeline-content h3 {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .timeline-content p {
        font-size: 10px;
        line-height: 1.3;
    }
    
    .timeline-date {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    /* 最小屏幕时光轴图片 */
    .timeline-image-item {
        width: 28%;
        height: 100px;
    }
    
    .timeline-image-item:nth-child(even) {
        left: 72%;
    }
    
    .timeline-image-item:nth-child(odd) {
        left: 0%;
    }
    
    .image-overlay i {
        font-size: 18px;
    }
}

/* 移动端纪念日适配 */
@media (max-width: 768px) {
    /* 纪念日区域适配 */
    .anniversary-section {
        margin-top: 2rem;
        padding: 0 15px;
    }
    
    .anniversary-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .anniversary-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
        padding: 0;
    }
    
    .anniversary-card {
        padding: 1.2rem;
        border-radius: 15px;
        margin: 0 5px;
    }
    
    .anniversary-icon-img {
        width: 50px;
        height: 50px;
        margin-bottom: 0.8rem;
    }
    
    .anniversary-title {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }
    
    .anniversary-countdown {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }
    
    .anniversary-date {
        font-size: 0.85rem;
    }
}

/* 小屏手机纪念日适配 (iPhone SE等) */
@media (max-width: 480px) {
    .anniversary-section {
        margin-top: 1.5rem;
        padding: 0 10px;
    }
    
    .anniversary-section h2 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .anniversary-cards {
        gap: 0.8rem;
        margin-top: 1rem;
    }
    
    .anniversary-card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .anniversary-icon-img {
        width: 45px;
        height: 45px;
        margin-bottom: 0.6rem;
    }
    
    .anniversary-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .anniversary-countdown {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
        line-height: 1.3;
    }
    
    .anniversary-date {
        font-size: 0.8rem;
    }
}

/* 移动端天气板块适配 */
@media (max-width: 768px) {
    /* 天气容器适配 */
    .romantic-weather-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .romantic-weather-card {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        padding: 15px;
    }
    
    .romantic-heart-center {
        order: -1;
        width: 100%;
        max-width: 200px;
        margin: 10px auto;
        padding: 10px;
    }
    
    .romantic-heart-icon {
        font-size: 2rem;
    }
    
    .romantic-heart-text {
        font-size: 14px;
        line-height: 1.1;
    }
    
    .romantic-weather-left,
    .romantic-weather-right {
        width: 100%;
    }
    
    .romantic-main-weather {
        padding: 12px;
    }
    
    .weather-main {
        gap: 8px;
    }
    
    .weather-icon {
        width: 45px;
        height: 45px;
    }
    
    .weather-details {
        gap: 6px;
    }
    
    .weather-details span {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* 小屏手机天气适配 */
@media (max-width: 480px) {
    .romantic-weather-container {
        gap: 12px;
        padding: 10px;
    }
    
    .romantic-weather-card {
        max-width: 280px;
        padding: 12px;
    }
    
    .romantic-heart-center {
        max-width: 150px;
        padding: 8px;
    }
    
    .romantic-heart-icon {
        font-size: 1.8rem;
        margin-bottom: 6px;
    }
    
    .romantic-heart-text {
        font-size: 13px;
        line-height: 1.0;
    }
    
    .romantic-main-weather {
        padding: 10px;
    }
    
    .weather-icon {
        width: 40px;
        height: 40px;
    }
    
    .weather-details span {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* 超小屏幕适配 (小于375px) */
@media (max-width: 375px) {
    .anniversary-cards {
        margin: 0 -5px;
    }
    
    .anniversary-card {
        margin: 0 5px;
        padding: 0.8rem;
    }
    
    .anniversary-icon-img {
        width: 40px;
        height: 40px;
    }
    
    .anniversary-title {
        font-size: 0.95rem;
    }
    
    .anniversary-countdown {
        font-size: 0.85rem;
    }
    
    .romantic-weather-card {
        max-width: 260px;
        padding: 10px;
    }
    
    .romantic-heart-center {
        max-width: 120px;
    }
}

h2 {
    text-align: center;
    color: #e91e63;
    font-size: 2.5em;
    margin-bottom: 50px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==================== 强制运势样式 ==================== */

.horoscope-container {
    max-width: 800px !important;
    margin: 20px auto !important;
    padding: 20px !important;
    display: block !important;
}

/* 简单的运势卡片容器 */
.fortune-cards {
    display: block !important;
    width: 100% !important;
}

/* 超简单的运势卡片 */
.fortune-card {
    display: block !important;
    width: 100% !important;
    background: #fff !important;
    border: 3px solid #333 !important;
    border-radius: 15px !important;
    padding: 25px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
}

.boy-card {
    border-color: #0066ff !important;
    background: #e6f3ff !important;
}

.girl-card {
    border-color: #ff1493 !important;
    background: #ffe6f0 !important;
}

/* 卡片标题 */
.horoscope-title {
    font-size: 1.8em !important;
    font-weight: bold !important;
    margin-bottom: 15px !important;
    text-align: center !important;
    display: block !important;
}

.boy-card .horoscope-title {
    color: #0066ff !important;
}

.girl-card .horoscope-title {
    color: #ff1493 !important;
}

/* 运势内容 */
.horoscope-content {
    line-height: 1.6 !important;
    font-size: 1.1em !important;
    color: #333 !important;
    margin-bottom: 15px !important;
    padding: 10px !important;
    background: rgba(255,255,255,0.7) !important;
    border-radius: 8px !important;
}

/* 运势数据 */
.horoscope-stats {
    display: block !important;
    text-align: center !important;
}

.horoscope-stat {
    display: inline-block !important;
    background: rgba(255,255,255,0.9) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    border: 2px solid #333 !important;
    font-size: 1em !important;
    margin: 5px !important;
    font-weight: bold !important;
}

.boy-card .horoscope-stat {
    border-color: #0066ff !important;
    color: #0066ff !important;
}

.girl-card .horoscope-stat {
    border-color: #ff1493 !important;
    color: #ff1493 !important;
}

/* 强制在所有屏幕尺寸下应用样式 */
@media (min-width: 769px) {
    .horoscope-container {
        max-width: 800px !important;
        margin: 20px auto !important;
        padding: 20px !important;
        display: block !important;
    }

.fortune-cards {
        display: block !important;
        width: 100% !important;
}

.fortune-card {
        display: block !important;
        width: 100% !important;
        background: #fff !important;
        border: 3px solid #333 !important;
        border-radius: 15px !important;
        padding: 25px !important;
        margin-bottom: 20px !important;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
    }

    .boy-card {
        border-color: #0066ff !important;
        background: #e6f3ff !important;
    }

    .girl-card {
        border-color: #ff1493 !important;
        background: #ffe6f0 !important;
    }

    .horoscope-title {
        font-size: 1.8em !important;
        font-weight: bold !important;
        margin-bottom: 15px !important;
        text-align: center !important;
        display: block !important;
    }

    .boy-card .horoscope-title {
        color: #0066ff !important;
    }

    .girl-card .horoscope-title {
        color: #ff1493 !important;
    }

    .horoscope-content {
        line-height: 1.6 !important;
        font-size: 1.1em !important;
        color: #333 !important;
        margin-bottom: 15px !important;
        padding: 10px !important;
        background: rgba(255,255,255,0.7) !important;
        border-radius: 8px !important;
    }

    .horoscope-stats {
        display: block !important;
        text-align: center !important;
    }

    .horoscope-stat {
        display: inline-block !important;
        background: rgba(255,255,255,0.9) !important;
        padding: 10px 15px !important;
        border-radius: 8px !important;
        border: 2px solid #333 !important;
        font-size: 1em !important;
        margin: 5px !important;
        font-weight: bold !important;
    }

    .boy-card .horoscope-stat {
        border-color: #0066ff !important;
        color: #0066ff !important;
    }

    .girl-card .horoscope-stat {
        border-color: #ff1493 !important;
        color: #ff1493 !important;
    }
}

/* 超宽屏幕强制样式 */
@media (min-width: 1200px) {
    .horoscope-container {
        max-width: 900px !important;
        margin: 30px auto !important;
        padding: 30px !important;
        display: block !important;
    }

    .fortune-cards {
        display: block !important;
        width: 100% !important;
    }

    .fortune-card {
        display: block !important;
        width: 100% !important;
        background: #fff !important;
        border: 4px solid #333 !important;
        border-radius: 20px !important;
        padding: 35px !important;
        margin-bottom: 25px !important;
        box-shadow: 0 6px 12px rgba(0,0,0,0.4) !important;
    }

    .boy-card {
        border-color: #0066ff !important;
        background: #e6f3ff !important;
    }

    .girl-card {
        border-color: #ff1493 !important;
        background: #ffe6f0 !important;
    }

    .horoscope-title {
        font-size: 2.2em !important;
        font-weight: bold !important;
        margin-bottom: 20px !important;
        text-align: center !important;
        display: block !important;
    }

    .boy-card .horoscope-title {
        color: #0066ff !important;
    }

    .girl-card .horoscope-title {
        color: #ff1493 !important;
    }

    .horoscope-content {
        line-height: 1.7 !important;
        font-size: 1.2em !important;
        color: #333 !important;
        margin-bottom: 20px !important;
        padding: 15px !important;
        background: rgba(255,255,255,0.8) !important;
        border-radius: 10px !important;
    }

    .horoscope-stats {
        display: block !important;
        text-align: center !important;
    }

    .horoscope-stat {
        display: inline-block !important;
        background: rgba(255,255,255,0.95) !important;
        padding: 12px 18px !important;
        border-radius: 10px !important;
        border: 3px solid #333 !important;
        font-size: 1.1em !important;
        margin: 8px !important;
        font-weight: bold !important;
    }

    .boy-card .horoscope-stat {
        border-color: #0066ff !important;
        color: #0066ff !important;
    }

    .girl-card .horoscope-stat {
        border-color: #ff1493 !important;
        color: #ff1493 !important;
    }
}

/* ==================== 周公解梦样式 ==================== */

.dream-search-container {
    max-width: 600px;
    margin: 30px auto;
    text-align: center;
}

.dream-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.9);
    padding: 8px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

#dreamKeyword {
    flex: 1;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 1em;
    outline: none;
    background: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}

#dreamKeyword:focus {
    background: rgba(255,255,255,1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.dream-search-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 80px;
}

.dream-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.dream-search-btn:active {
    transform: translateY(0);
}

.dream-tip {
    color: #666;
    font-size: 0.9em;
    margin: 0;
    font-style: italic;
}

.dream-results {
    max-width: 800px;
    margin: 30px auto;
}

.dream-placeholder {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,250,252,0.8));
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.dream-placeholder-icon {
    font-size: 3em;
    margin-bottom: 15px;
    animation: dreamFloat 3s ease-in-out infinite;
}

.dream-placeholder h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-weight: 600;
}

.dream-placeholder p {
    color: #666;
    margin: 0;
}

.dream-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,250,252,0.9));
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.dream-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-left-color: #764ba2;
}

.dream-card-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dream-card-type {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
    flex-shrink: 0;
}

.dream-card-content {
    line-height: 1.7;
    color: #2d3748;
    font-size: 1em;
    text-align: left;
}

.dream-hot-keywords {
    max-width: 800px;
    margin: 40px auto;
    text-align: center;
}

.dream-hot-keywords h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-weight: 600;
}

.dream-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.dream-keyword {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: #667eea;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(102, 126, 234, 0.2);
    font-weight: 500;
    user-select: none;
}

.dream-keyword:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.dream-loading {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.dream-loading-icon {
    font-size: 2em;
    animation: dreamSpin 2s linear infinite;
    margin-bottom: 10px;
    color: #667eea;
}

.dream-error {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(255, 99, 99, 0.1), rgba(255, 162, 162, 0.1));
    border-radius: 15px;
    border: 2px solid rgba(255, 99, 99, 0.2);
    color: #e53e3e;
}

.dream-error h3 {
    margin-bottom: 10px;
    color: #e53e3e;
}

/* 动画效果 */
@keyframes dreamFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes dreamSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dream-search-container {
        margin: 20px 15px;
    }
    
    .dream-search-box {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .dream-keywords {
        gap: 8px;
        padding: 0 15px;
    }
    
    .dream-keyword {
        padding: 6px 12px;
        font-size: 0.9em;
    }
    
    .dream-card {
        padding: 20px;
        margin: 0 15px 20px 15px;
    }
    
    .dream-card-title {
        font-size: 1.2em;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .dream-results {
        margin: 20px 0;
    }
    
    .dream-hot-keywords {
        margin: 30px 0;
    }
}

/* ==================== 手机端全面优化 ==================== */

/* 基础移动端优化 */
@media (max-width: 768px) {
    /* 整体布局优化 */
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* 导航栏移动端优化 */
    .navbar {
        padding: 12px 15px !important;
        flex-direction: column !important;
        gap: 15px !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        border-radius: 0 0 20px 20px !important;
    }
    
    .nav-brand {
        font-size: 18px !important;
        font-weight: 700 !important;
    }
    
    .nav-links {
        gap: 8px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .nav-links a {
        padding: 8px 12px !important;
        border-radius: 15px !important;
        background: rgba(255, 182, 193, 0.25) !important;
        border: 1px solid rgba(255, 182, 193, 0.4) !important;
        gap: 4px !important;
        font-size: 12px !important;
        min-width: 60px !important;
        text-align: center !important;
    }
    
    .nav-links a i {
        font-size: 12px !important;
    }
    
    /* 页面部分移动端优化 */
    .section {
        padding: 100px 15px 30px !important;
        margin: 0 !important;
    }
    
    /* 首页移动端优化 */
    .hero {
        padding: 50px 0 30px 0 !important;
        margin-top: 20px !important;
    }
    
    .love-title {
        font-size: 2.2em !important;
        margin-bottom: 40px !important;
        line-height: 1.2 !important;
        padding: 0 10px !important;
        margin-top: 20px !important;
    }
    
    .couple-info {
        flex-direction: column !important;
        gap: 25px !important;
        margin-bottom: 30px !important;
        margin-top: 15px !important;
    }
    
    .person {
        transform: none !important;
    }
    
    .avatar {
        font-size: 60px !important;
        margin-bottom: 15px !important;
        width: 80px !important;
        height: 80px !important;
    }
    
    .person h3 {
        font-size: 18px !important;
        margin-bottom: 5px !important;
    }
    
    .person p {
        font-size: 13px !important;
    }
    
    .heart-center {
        font-size: 40px !important;
        order: -1 !important;
    }
    
    .love-counter {
        padding: 25px 20px !important;
        margin: 0 10px !important;
        border-radius: 20px !important;
    }
    
    .love-counter h2 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }
    
    .duration {
        font-size: 18px !important;
    }
    
    /* 时光轴移动端优化 */
    .timeline::before {
        left: 20px !important;
        width: 2px !important;
    }
    
    .timeline-item {
        width: calc(100% - 50px) !important;
        left: 40px !important;
        margin-bottom: 30px !important;
        text-align: left !important;
    }
    
    .timeline-item::before {
        left: -30px !important;
        width: 15px !important;
        height: 15px !important;
    }
    
    .timeline-date {
        margin-bottom: 10px !important;
        font-size: 11px !important;
        padding: 4px 10px !important;
        display: inline-block !important;
    }
    
    .timeline-content {
        padding: 15px !important;
        border-radius: 15px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(15px) !important;
        box-shadow: 0 8px 25px rgba(255, 154, 158, 0.15) !important;
    }
    
    .timeline-content h3 {
        font-size: 14px !important;
        margin-bottom: 8px !important;
        color: #e91e63 !important;
    }
    
    .timeline-content p {
        font-size: 12px !important;
        line-height: 1.5 !important;
        color: #555 !important;
    }
    
    /* 时光轴图片移动端优化 */
    .timeline-image-item {
        width: calc(100% - 50px) !important;
        left: 40px !important;
        height: 200px !important;
        margin-bottom: 20px !important;
    }
    
    .timeline-image-wrapper {
        border-radius: 15px !important;
        overflow: hidden !important;
    }
    
    .timeline-image-wrapper img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    /* 相册移动端优化 */
    .gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 20px 10px !important;
    }
    
    .gallery-item {
        border-radius: 12px !important;
        overflow: hidden !important;
        aspect-ratio: 1 !important;
    }
    
    .gallery-item img, .gallery-item video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    /* 留言板移动端优化 */
    .message-form {
        padding: 20px !important;
        margin: 0 10px 25px !important;
        border-radius: 20px !important;
    }
    
    .message-form textarea {
        height: 120px !important;
        padding: 15px !important;
        font-size: 14px !important;
        border-radius: 15px !important;
        resize: vertical !important;
    }
    
    .message-form button {
        padding: 12px 25px !important;
        font-size: 14px !important;
        margin-top: 15px !important;
        border-radius: 15px !important;
        width: 100% !important;
    }
    
    .message {
        margin: 0 10px 20px !important;
        padding: 15px !important;
        border-radius: 15px !important;
    }
    
    .message-content {
        font-size: 14px !important;
        margin-bottom: 8px !important;
        line-height: 1.6 !important;
    }
    
    .message-time {
        font-size: 11px !important;
    }
}

/* 生日界面移动端大幅优化 */
@media (max-width: 768px) {
    .birthday-celebration {
        padding: 5rem 0.5rem 1rem 0.5rem !important;
        margin-top: 60px !important;
    }
    
    .birthday-title {
        font-size: 2rem !important;
        margin-bottom: 1.5rem !important;
        margin-top: 3rem !important;
        line-height: 1.3 !important;
        padding: 0 10px !important;
    }
    
    .birthday-age {
        flex-direction: column !important;
        gap: 0.5rem !important;
        margin: 1.5rem 0 !important;
    }
    
    .age-number {
        font-size: 3rem !important;
        line-height: 1 !important;
    }
    
    .age-text {
        font-size: 1.2rem !important;
    }
    
    .birthday-celebration .couple-info {
        flex-direction: column !important;
        gap: 20px !important;
        margin: 2rem 0 !important;
    }
    
    .birthday-celebration .person {
        transform: none !important;
    }
    
    .birthday-celebration .avatar {
        width: 70px !important;
        height: 70px !important;
        font-size: 50px !important;
        margin-bottom: 10px !important;
    }
    
    .birthday-celebration .person h3 {
        font-size: 16px !important;
        margin-bottom: 5px !important;
    }
    
    .birthday-cake-center {
        order: -1 !important;
        margin-bottom: 10px !important;
    }
    
    .cake-animation {
        font-size: 2.5rem !important;
    }
    
    .fireworks {
        font-size: 1.5rem !important;
    }
    
    .birthday-wish {
        font-size: 12px !important;
        margin-top: 5px !important;
    }
    
    .birthday-message {
        margin: 2rem 0.5rem !important;
    }
    
    .message-card {
        padding: 1.5rem !important;
        border-radius: 15px !important;
        margin: 0 !important;
    }
    
    .message-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .message-card p {
        font-size: 13px !important;
        line-height: 1.6 !important;
        margin: 0.4rem 0 !important;
    }
    
    .birthday-signature {
        font-size: 12px !important;
        margin-top: 1rem !important;
    }
    
    .balloon {
        font-size: 1.2rem !important;
    }
    
    .birthday-star::before {
        top: -5px !important;
        right: -5px !important;
        font-size: 1rem !important;
    }
}

/* 解梦界面移动端优化 */
@media (max-width: 768px) {
    #dream-section {
        padding-top: 90px !important;
    }
    
    #dream-section h2 {
        font-size: 1.8rem !important;
        margin-bottom: 20px !important;
        padding: 0 15px !important;
    }
    
    #dream-section .dream-search-container {
        margin: 15px 10px 25px 10px !important;
        padding: 0 !important;
    }
    
    #dream-section .dream-search-box {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 15px !important;
        border-radius: 20px !important;
    }
    
    #dream-section #dreamKeyword {
        padding: 15px 20px !important;
        font-size: 14px !important;
        border-radius: 15px !important;
    }
    
    #dream-section .dream-search-btn {
        padding: 15px 20px !important;
        font-size: 14px !important;
        border-radius: 15px !important;
        min-width: auto !important;
        width: 100% !important;
    }
    
    #dream-section .dream-tip {
        font-size: 12px !important;
        padding: 0 10px !important;
    }
    
    #dream-section .dream-results {
        margin: 20px 10px !important;
    }
    
    #dream-section .dream-placeholder,
    #dream-section .dream-loading,
    #dream-section .dream-error {
        padding: 30px 15px !important;
        margin: 0 !important;
        border-radius: 15px !important;
    }
    
    #dream-section .dream-placeholder h3 {
        font-size: 1.3rem !important;
        margin-bottom: 8px !important;
    }
    
    #dream-section .dream-placeholder p {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }
    
    #dream-section .dream-card {
        padding: 20px !important;
        margin: 0 0 15px 0 !important;
        border-radius: 15px !important;
    }
    
    #dream-section .dream-card-title {
        font-size: 1.1rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    
    #dream-section .dream-card-type {
        font-size: 11px !important;
        padding: 3px 10px !important;
        border-radius: 12px !important;
    }
    
    #dream-section .dream-card-content {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }
    
    #dream-section .dream-hot-keywords {
        margin: 30px 10px !important;
    }
    
    #dream-section .dream-hot-keywords h3 {
        font-size: 1.2rem !important;
        margin-bottom: 15px !important;
    }
    
    #dream-section .dream-keywords {
        gap: 8px !important;
        padding: 0 5px !important;
    }
    
    #dream-section .dream-keyword {
        padding: 8px 12px !important;
        font-size: 12px !important;
        border-radius: 15px !important;
        flex: 0 0 auto !important;
    }
}

/* 运势界面移动端优化 */
@media (max-width: 768px) {
    #horoscope-section h2 {
        font-size: 1.8rem !important;
        margin-bottom: 20px !important;
        padding: 0 15px !important;
    }
    
    #horoscope-container {
        margin: 15px 10px !important;
        padding: 15px !important;
    }
    
    #horoscope-container .fortune-card {
        padding: 20px !important;
        margin-bottom: 15px !important;
        border-radius: 15px !important;
    }
    
    #horoscope-container .horoscope-title {
        font-size: 1.4em !important;
        margin-bottom: 12px !important;
    }
    
    #horoscope-container .horoscope-content {
        font-size: 13px !important;
        line-height: 1.6 !important;
        padding: 15px !important;
        margin-bottom: 12px !important;
        border-radius: 12px !important;
    }
    
    #horoscope-container .horoscope-stats {
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: center !important;
    }
    
    #horoscope-container .horoscope-stat {
        padding: 8px 12px !important;
        font-size: 12px !important;
        border-radius: 20px !important;
        margin: 0 !important;
        flex: 0 0 auto !important;
        min-width: auto !important;
    }
}

/* 天气界面移动端优化 */
@media (max-width: 768px) {
    .weather-widget {
        width: 95% !important;
        max-width: 350px !important;
        min-height: auto !important;
        max-height: none !important;
        margin: 15px auto !important;
        padding: 20px !important;
        border-radius: 20px !important;
    }
    
    .weather-header h2 {
        font-size: 1.3rem !important;
        margin-bottom: 15px !important;
    }
    
    .weather-cities {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .weather-city {
        padding: 15px !important;
        border-radius: 15px !important;
    }
    
    .weather-main {
        gap: 12px !important;
        margin: 15px 0 !important;
    }
    
    .weather-icon {
        font-size: 40px !important;
    }
    
    .temperature {
        font-size: 32px !important;
    }
    
    .weather-desc {
        font-size: 13px !important;
        margin-bottom: 10px !important;
    }
    
    .weather-details {
        flex-direction: column !important;
        gap: 6px !important;
        align-items: stretch !important;
    }
    
    .weather-details span {
        padding: 6px 12px !important;
        margin: 0 !important;
        font-size: 11px !important;
        text-align: center !important;
        border-radius: 12px !important;
    }
    
    .forecast-days {
        flex-direction: row !important;
        gap: 8px !important;
        overflow-x: auto !important;
        padding: 10px 5px !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }
    
    .forecast-days::-webkit-scrollbar {
        display: none !important;
    }
    
    .forecast-day {
        min-width: 80px !important;
        max-width: 80px !important;
        padding: 10px 8px !important;
        border-radius: 12px !important;
        flex-shrink: 0 !important;
    }
    
    .day-name {
        font-size: 11px !important;
        margin-bottom: 3px !important;
    }
    
    .day-date {
        font-size: 9px !important;
        margin-bottom: 5px !important;
    }
    
    .day-icon {
        font-size: 20px !important;
        margin: 5px 0 !important;
    }
    
    .day-temp {
        font-size: 12px !important;
        margin: 3px 0 !important;
    }
    
    .day-desc {
        font-size: 9px !important;
    }
}

/* 纪念日界面移动端优化 */
@media (max-width: 768px) {
    .anniversary-section {
        margin-top: 3rem !important;
        padding: 0 10px !important;
    }
    
    .anniversary-section h2 {
        font-size: 1.6rem !important;
        margin-bottom: 2rem !important;
        padding: 0 5px !important;
        margin-top: 1rem !important;
    }
    
    .anniversary-cards {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        margin-top: 2rem !important;
        padding: 0 !important;
    }
    
    .anniversary-card {
        padding: 15px !important;
        border-radius: 15px !important;
        margin: 0 !important;
        text-align: center !important;
    }
    
    .anniversary-icon-img {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 10px !important;
        border-radius: 12px !important;
    }
    
    .anniversary-title {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
        line-height: 1.3 !important;
    }
    
    .anniversary-countdown {
        font-size: 0.9rem !important;
        margin-bottom: 6px !important;
        line-height: 1.4 !important;
    }
    
    .anniversary-date {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
}

/* 模态框移动端优化 */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95vw !important;
        max-height: 90vh !important;
        padding: 10px !important;
        border-radius: 20px !important;
        margin: 5vh auto !important;
    }
    
    .modal-image, .modal-video {
        max-width: 90vw !important;
        max-height: 60vh !important;
        border-radius: 15px !important;
    }
    
    .modal-info {
        padding: 15px 20px !important;
        margin-top: 10px !important;
        border-radius: 15px !important;
    }
    
    .modal-caption {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
    
    .modal-date {
        font-size: 12px !important;
    }
    
    .close {
        right: 15px !important;
        top: 15px !important;
        width: 35px !important;
        height: 35px !important;
        font-size: 20px !important;
        border-radius: 50% !important;
        background: rgba(0,0,0,0.7) !important;
        backdrop-filter: blur(10px) !important;
    }
    
    .nav-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
        border-radius: 50% !important;
        background: rgba(0,0,0,0.7) !important;
        backdrop-filter: blur(10px) !important;
    }
    
    .prev-btn {
        left: 15px !important;
    }
    
    .next-btn {
        right: 15px !important;
    }
}

/* 超小屏幕优化 (小于375px) */
@media (max-width: 375px) {
    .section {
        padding: 90px 10px 25px !important;
    }
    
    .hero {
        padding: 45px 0 25px 0 !important;
        margin-top: 15px !important;
    }
    
    .love-title {
        font-size: 1.8em !important;
        margin-bottom: 30px !important;
        margin-top: 15px !important;
    }
    
    .couple-info {
        margin-top: 10px !important;
    }
    
    .nav-links a {
        padding: 6px 8px !important;
        font-size: 11px !important;
        min-width: 50px !important;
    }
    
    .love-counter {
        padding: 20px 15px !important;
        margin: 0 5px !important;
    }
    
    .love-counter h2 {
        font-size: 18px !important;
    }
    
    .duration {
        font-size: 16px !important;
    }
    
    /* 生日界面超小屏优化 */
    .birthday-title {
        font-size: 1.8rem !important;
        padding: 0 5px !important;
    }
    
    .age-number {
        font-size: 2.5rem !important;
    }
    
    .message-card {
        padding: 1rem !important;
    }
    
    .message-card p {
        font-size: 12px !important;
    }
    
    /* 解梦界面超小屏优化 */
    #dream-section .dream-search-box {
        padding: 12px !important;
    }
    
    #dream-section #dreamKeyword {
        padding: 12px 15px !important;
        font-size: 13px !important;
    }
    
    #dream-section .dream-search-btn {
        padding: 12px 15px !important;
        font-size: 13px !important;
    }
    
    #dream-section .dream-card {
        padding: 15px !important;
    }
    
    #dream-section .dream-card-content {
        font-size: 12px !important;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    /* 移除hover效果，优化触摸体验 */
    .nav-links a:hover {
        transform: none !important;
    }
    
    .fortune-card:hover,
    .dream-card:hover,
    .timeline-content:hover {
        transform: none !important;
    }
    
    /* 增大触摸目标 */
    .nav-links a,
    .dream-keyword,
    .horoscope-stat {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* 优化按钮触摸反馈 */
    .dream-search-btn,
    .message-form button {
        transition: background-color 0.2s ease !important;
    }
    
    .dream-search-btn:active,
    .message-form button:active {
        transform: scale(0.98) !important;
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .section {
        padding-top: 70px !important;
    }
    
    .birthday-title {
        font-size: 1.6rem !important;
        margin-bottom: 1rem !important;
    }
    
    .couple-info {
        flex-direction: row !important;
        gap: 15px !important;
    }
    
    .love-counter {
        padding: 15px !important;
    }
}

/* ==================== 手机端全面优化 V2 (综合性修复) ==================== */

@media (max-width: 768px) {
    /* --- 基础与全局 --- */
    :root {
        font-size: 15px; /* 调整基础字体大小 */
    }

    h2 {
        font-size: 1.8rem !important;
        margin-bottom: 25px !important;
    }

    .section {
        /* 为粘性导航栏留出足够空间，并统一边距 */
        padding: 140px 15px 40px !important; 
    }

    /* --- 导航栏 --- */
    .navbar {
        padding: 10px 15px !important;
        gap: 12px !important;
        box-shadow: 0 4px 20px rgba(255, 154, 158, 0.2) !important;
        /* 新增：允许内容换行并保持顶部对齐 */
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .nav-brand {
        font-size: 1.2rem !important; /* 稍微缩小标题字体 */
        white-space: nowrap; /* 防止标题自身换行 */
    }

    .nav-links {
        gap: 6px 8px !important; /* 缩小按钮之间的间距 */
        flex-grow: 1; /* 让按钮组占据剩余空间 */
        justify-content: center; /* 居中对齐按钮 */
    }

    .nav-links a {
        padding: 6px 12px !important; /* 缩小按钮的内边距 */
        font-size: 0.75rem !important; /* 缩小按钮的字体 */
    }
    
    .nav-links a i {
        font-size: 0.75rem !important; /* 同步缩小图标 */
    }

    /* --- 首页 --- */
    .hero {
        padding-top: 20px !important;
    }
    
    .love-title {
        font-size: 2.4em !important;
        margin-bottom: 30px !important;
        margin-top: 0 !important;
    }

    .couple-info {
        gap: 20px !important;
        margin-bottom: 30px !important;
    }
    
    .heart-center {
        font-size: 30px !important;
        margin: 10px 0 !important;
    }

    .avatar {
        width: 75px !important;
        height: 75px !important;
        margin-bottom: 10px !important;
    }

    .person h3 {
        font-size: 1.1rem !important;
    }
    
    /* 计时器垂直堆叠 */
    .love-counter .duration {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    .love-counter .time-unit {
        background: rgba(255, 182, 193, 0.1);
        padding: 8px 15px;
        border-radius: 12px;
        border: 1px solid rgba(255, 182, 193, 0.3);
        width: 80%;
        text-align: center;
    }
    
    .love-counter .time-number {
        font-size: 1.5rem;
        margin-right: 8px;
    }
    
    .love-counter .time-label {
        font-size: 0.9rem;
    }

    /* --- 时光轴 --- */
    .timeline::before {
        left: 15px !important; /* 轴线靠左 */
    }

    /* 所有项目都靠右显示 */
    .timeline-item,
    .timeline-item:nth-child(even),
    .timeline-image-item,
    .timeline-image-item:nth-child(even) {
        width: calc(100% - 45px) !important;
        left: 35px !important;
        text-align: left !important;
        margin-bottom: 25px !important;
    }
    
    /* 圆点对齐轴线 */
    .timeline-item::before {
        left: -24.5px !important;
    }

    .timeline-content .timeline-icon {
        display: none; /* 手机端隐藏多余的图标 */
    }
    
    .timeline-content h3 {
        font-size: 1.1rem !important;
    }
    
    .timeline-content p {
        font-size: 0.9rem !important;
    }
    
    .timeline-image-item {
         height: 180px !important;
    }

    /* --- 相册 --- */
    .gallery-tabs {
        gap: 8px !important;
        padding: 15px !important;
    }
    
    .tab-btn {
        padding: 10px 18px !important;
        font-size: 0.85rem !important;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .photo-title {
        font-size: 13px !important;
    }
    
    .photo-date {
        font-size: 11px !important;
    }

    /* --- 天气 --- */
    #weather-section .romantic-weather-container {
        gap: 20px !important;
    }
    
    #weather-section .romantic-weather-card {
        padding: 20px !important;
    }
    
    #weather-section .romantic-heart-center {
        padding: 10px 0;
    }

    /* --- 运势 --- */
    #horoscope-section .fortune-card {
        padding: 20px !important;
    }
    
    #horoscope-section .horoscope-title {
        font-size: 1.5em !important;
    }
    
    #horoscope-section .horoscope-content {
        font-size: 0.95em !important;
    }
    
    #horoscope-section .horoscope-stat {
        padding: 10px 15px !important;
        font-size: 0.85em !important;
    }

    /* --- 解梦 --- */
    #dream-section .dream-search-box {
        padding: 12px !important;
    }
    
    #dream-section #dreamKeyword,
    #dream-section .dream-search-btn {
        padding: 12px 18px !important;
        font-size: 0.95rem !important;
        border-radius: 15px !important;
    }
    
    #dream-section .dream-card {
        padding: 18px !important;
    }
    
    #dream-section .dream-keyword {
        padding: 8px 14px !important;
    }

    /* --- 足迹 --- */
    #footprint-section .footprint-content-card {
        padding: 25px 15px 15px !important;
    }
    
    #footprint-section h2 {
        font-size: 2rem !important;
    }
    
    #footprint-map {
        height: 40vh !important; /* 使用视窗高度，更灵活 */
    }
    
    .footprint-place {
        padding: 15px !important;
    }
    
    .footprint-place-name {
        font-size: 1.1rem !important;
    }

    /* --- 生日界面 --- */
    .birthday-celebration {
        padding-top: 2rem !important;
    }
    
    .birthday-title {
         margin-top: 0 !important;
    }
}

/* 针对特别窄的屏幕 (< 400px) 进行微调 */
@media (max-width: 400px) {
    :root {
        font-size: 14px;
    }

    h2 {
        font-size: 1.6rem !important;
    }
    
    .section {
        padding: 130px 10px 30px !important;
    }
    
    .love-title {
        font-size: 2em !important;
    }

    /* 相册变为单列 */
    .gallery {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .love-counter .time-unit {
        width: 90%;
    }
}

/* 针对横屏模式的特殊优化 */
@media (max-width: 900px) and (orientation: landscape) {
    .section {
        padding-top: 100px !important; /* 减小横屏时的顶部间距 */
    }
    
    .couple-info {
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 30px !important;
    }
    
    .heart-center {
        order: 0 !important;
    }
    
    /* 计时器恢复水平布局 */
    .love-counter .duration {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px !important;
    }
    
    .love-counter .time-unit {
        width: auto;
    }
}