/* ==========================================
   微信X5内核兼容性修复
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
    background-color: #fdf6ec;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 修复微信不支持的CSS新特性 */
.photos-responsive-grid, .grid {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    margin: 0 -6px;
}

.photo-item, .grid-item {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 25%;
    flex: 0 0 25%;
    padding: 0 6px 12px;
    width: 25%;
}

/* 媒体查询适配 */
@media (max-width: 1200px) {
    .photo-item, .grid-item {
        -webkit-flex: 0 0 33.333%;
        flex: 0 0 33.333%;
        width: 33.333%;
    }
}

@media (max-width: 768px) {
    .photo-item, .grid-item {
        -webkit-flex: 0 0 50%;
        flex: 0 0 50%;
        width: 50%;
    }
}

@media (max-width: 480px) {
    .photo-item, .grid-item {
        -webkit-flex: 0 0 100%;
        flex: 0 0 100%;
        width: 100%;
    }
}

/* 修复圆角/阴影 */
.card, .album-item, .photo-item, .grid-item {
    border-radius: 15px !important;
    -webkit-border-radius: 15px !important;
    box-shadow: none !important;
    border: 2px solid #FFDAC1 !important;
    background: #fff !important;
}

/* 修复active效果 */
.album-item:active, .photo-item:active, .cute-card:active {
    -webkit-transform: translateX(3px) !important;
    transform: translateX(3px) !important;
    opacity: 0.95;
}

/* 修复渐变背景 */
.hero-card {
    background: #FF9AA2;
    background: -webkit-linear-gradient(135deg, #FF9AA2 0%, #FFB7B2 25%, #FFDAC1 50%, #E2F0CB 75%, #B5EAD7 100%);
    background: linear-gradient(135deg, #FF9AA2 0%, #FFB7B2 25%, #FFDAC1 50%, #E2F0CB 75%, #B5EAD7 100%);
}

/* 修复导航栏 */
.navbar {
    position: relative !important;
    width: 100%;
    background: #fff;
    padding: 10px 15px;
    border-bottom: 2px solid #FFDAC1;
    margin-bottom: 20px;
}

.navbar a {
    display: inline-block;
    padding: 6px 10px;
    margin: 0 3px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    -webkit-border-radius: 8px;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ==========================================
   基础样式
   ========================================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-pink {
    background: #FF9AA2;
    color: white;
}

.btn-blue {
    background: #C7CEEA;
    color: white;
}

.btn-large {
    font-size: 1.1rem;
    padding: 12px 30px;
}

.text-center {
    text-align: center;
    margin-top: 30px;
}

/* ==========================================
   高级卡通风格优化
   ========================================== */
body {
    background-color: #fdf6ec;
    background-image: 
        radial-gradient(#ffd1dc 2px, transparent 2px),
        radial-gradient(#c7ceea 2px, transparent 2px);
    background-size: 50px 50px, 80px 80px;
    background-position: 0 0, 25px 25px;
}

/* 卡片高级感 */
.card {
    background: #fff;
    border-radius: 25px;
    padding: 25px 20px;
    margin-bottom: 30px;
    border: 3px solid #ffd1dc;
    box-shadow: 
        8px 8px 0px #ffe0e6,
        0 15px 30px rgba(255, 154, 162, 0.15);
    position: relative;
    overflow: hidden;
}

/* ==========================================
   欢迎英雄区 - 重点响应式优化
   ========================================== */
.hero-card {
    text-align: center;
    background: linear-gradient(135deg, #FF9AA2 0%, #FFB7B2 25%, #FFDAC1 50%, #E2F0CB 75%, #B5EAD7 100%);
    border: none;
    padding: 30px 15px;
}

.hero-content {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 25px 20px;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
}

.hero-title {
    font-size: 1.6rem;
    color: #FF6B6B;
    margin-bottom: 12px;
    text-shadow: 1px 1px 0px #fff;
    line-height: 1.3;
    word-break: keep-all;
}

.hero-subtitle {
    font-size: 1rem;
    color: #888;
    margin-bottom: 15px;
    line-height: 1.4;
}

.hero-icons {
    font-size: 2rem;
    margin-bottom: 20px;
    letter-spacing: 5px;
}

/* 欢迎区域响应式断点 */
@media (min-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .hero-icons {
        font-size: 2.5rem;
        letter-spacing: 8px;
    }
}

@media (min-width: 768px) {
    .hero-card {
        padding: 40px 20px;
    }
    .hero-content {
        padding: 35px 40px;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
    }
    .hero-icons {
        font-size: 3rem;
        letter-spacing: 10px;
    }
    .btn-large {
        font-size: 1.2rem;
        padding: 15px 40px;
    }
}

/* ==========================================
   标题优化
   ========================================== */
.section-title {
    text-align: center;
    font-size: 1.5rem;
    color: #FF6B6B;
    margin-bottom: 10px;
}

.section-desc {
    text-align: center;
    color: #aaa;
    margin-bottom: 25px;
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 0 10px;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 1.8rem;
    }
    .section-desc {
        font-size: 0.95rem;
    }
}

/* ==========================================
   优化版爱心照片墙（Grid布局 + 响应式）
   ========================================== */
.heart-wall-wrapper {
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
    padding: 10px 5px;
}

.heart-grid {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: (1fr)[6];
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    justify-items: center;
    align-items: center;
}

.heart-grid-item {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.heart-img-item {
    width: 100%;
    max-width: 55px;
    aspect-ratio: 1/1;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #FFDAC1;
    background: #fff;
}

.heart-img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 照片墙响应式 */
@media (min-width: 480px) {
    .heart-grid {
        gap: 8px;
    }
    .heart-img-item {
        max-width: 70px;
    }
}

@media (min-width: 768px) {
    .heart-wall-wrapper {
        padding: 10px;
    }
    .heart-img-item {
        max-width: 85px;
        border-radius: 12px;
    }
}

@media (min-width: 992px) {
    .heart-img-item {
        max-width: 90px;
        border-radius: 15px;
    }
}

/* 微信X5内核兼容 */
@supports not (display: grid) {
    .heart-grid {
        display: -webkit-box;
        display: flex;
        -webkit-flex-wrap: wrap;
        flex-wrap: wrap;
        -webkit-box-pack: center;
        justify-content: center;
    }
    .heart-grid-item {
        -webkit-box-flex: 0;
        -webkit-flex: 0 0 calc(100%/6);
        flex: 0 0 calc(100%/6);
        max-width: calc(100%/6);
    }
}

/* ==========================================
   首页时间轴美化
   ========================================== */
.home-timeline {
    position: relative;
    padding-left: 25px;
    margin-top: 25px;
}

.home-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #FF9AA2, #C7CEEA);
    border-radius: 2px;
}

.home-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    border: 2px solid #f0f0f0;
}

.home-timeline-dot {
    width: 16px;
    height: 16px;
    background: #FF9AA2;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #FF9AA2;
    flex-shrink: 0;
    margin-left: -30px;
    z-index: 2;
}

.home-timeline-date {
    color: #C7CEEA;
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.home-timeline-content h3 {
    color: #FF6B6B;
    margin: 0 0 6px 0;
    font-size: 1rem;
}

.home-timeline-content p {
    color: #888;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.home-timeline-img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.home-timeline-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 时间轴响应式 */
@media (min-width: 768px) {
    .home-timeline {
        padding-left: 30px;
    }
    .home-timeline-item {
        padding: 15px;
        gap: 15px;
        margin-bottom: 25px;
    }
    .home-timeline-dot {
        width: 20px;
        height: 20px;
        border: 3px solid #fff;
        box-shadow: 0 0 0 3px #FF9AA2;
        margin-left: -35px;
    }
    .home-timeline-date {
        font-size: 0.9rem;
    }
    .home-timeline-content h3 {
        font-size: 1.15rem;
    }
    .home-timeline-content p {
        font-size: 0.95rem;
    }
    .home-timeline-img {
        width: 100px;
        height: 100px;
        border-radius: 12px;
    }
}

/* ==========================================
   图集列表（单列）
   ========================================== */
.albums-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.album-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    border-radius: 15px;
    padding: 12px;
    border: 2px solid #E2F0CB;
    box-shadow: 3px 3px 0px #E2F0CB;
    text-decoration: none;
}

.album-item-cover {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.album-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-item-info h3 {
    color: #FF6B6B;
    margin: 0;
    font-size: 1rem;
}

.album-item-info p {
    color: #aaa;
    margin: 4px 0 0 0;
    font-size: 0.85rem;
}

.album-item-arrow {
    color: #C7CEEA;
    font-size: 1.3rem;
    font-weight: bold;
}

/* 图集响应式 */
@media (min-width: 768px) {
    .albums-list {
        gap: 15px;
    }
    .album-item {
        padding: 15px;
        gap: 20px;
        border-radius: 20px;
    }
    .album-item-cover {
        width: 100px;
        height: 100px;
        border-radius: 15px;
    }
    .album-item-info h3 {
        font-size: 1.1rem;
    }
    .album-item-info p {
        font-size: 0.9rem;
    }
    .album-item-arrow {
        font-size: 1.5rem;
    }
}

.photo-item {
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #FFDAC1;
    box-shadow: 3px 3px 0px #FFDAC1;
    aspect-ratio: 1/1;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}