/* 基础样式 */
.couple-space-container {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #333;
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    position: relative;
}

/* 封面区域 */
.couple-cover {
    height: 400px;
    background-color: #4CAF50;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.cover-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
}

.couple-avatars {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 30px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
}

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

.male-avatar {
    border-color: #2E7D32;
}

.female-avatar {
    border-color: #81C784;
}

.cover-content h1 {
    font-size: 3.5rem;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 300;
}

.together-time {
    margin-top: 20px;
    font-size: 1.2rem;
}

.days-count {
    font-size: 3rem;
    font-weight: bold;
    margin-right: 5px;
}

.days-text {
    font-size: 1.2rem;
}

/* 导航菜单 */
.couple-nav {
    position: sticky;
    top: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.couple-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.couple-nav li {
    margin: 0;
}

.couple-nav a {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.couple-nav a:hover {
    color: #4CAF50;
}

.couple-nav a.active {
    color: #4CAF50;
}

.couple-nav a.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    background: #4CAF50;
}

/* 内容区域共用样式 */
.couple-section {
    padding: 60px 20px;
    border-bottom: 1px solid #eee;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: #4CAF50;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title i {
    margin-right: 10px;
}

.no-content {
    text-align: center;
    color: #999;
    padding: 40px 0;
}

/* 时光轴样式 */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: 50%;
    clear: both;
}

.timeline-item:nth-child(odd) {
    float: left;
    padding-right: 30px;
    text-align: right;
}

.timeline-item:nth-child(even) {
    float: right;
    padding-left: 30px;
    text-align: left;
}

.timeline-badge {
    position: absolute;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-badge {
    right: -20px;
}

.timeline-item:nth-child(even) .timeline-badge {
    left: -20px;
}

.timeline-badge.male {
    border-color: #2E7D32;
}

.timeline-badge.female {
    border-color: #81C784;
}

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

.timeline-content {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.timeline-header {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
}

.timeline-header .author {
    font-weight: bold;
}

.timeline-header .date {
    margin-left: 10px;
    color: #999;
}

.timeline-body h3 {
    margin: 0 0 10px;
    color: #333;
}

.post-gallery {
    display: flex;
    margin: 10px 0;
    gap: 5px;
}

.post-gallery img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.post-gallery img:hover {
    transform: scale(1.05);
}

.post-excerpt {
    color: #555;
    margin-bottom: 10px;
}

.read-more {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* 文章筛选控件 */
.timeline-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.filter-container {
    display: flex;
    width: 100%;
    max-width: 400px;
    justify-content: space-between;
    align-items: center;
}

.filter-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    flex: 1;
    margin: 0 5px;
    font-size: 0.9rem;
}

.male-filter {
    background: #2E7D32;
    order: 1;
}

.all-filter {
    background: #4CAF50;
    order: 2;
}

.female-filter {
    background: #81C784;
    order: 3;
}

.filter-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.filter-btn.active {
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    font-weight: bold;
}

/* 里程碑样式 */
.milestone-container {
    max-width: 800px;
    margin: 0 auto;
}

.milestone-item {
    display: flex;
    margin-bottom: 30px;
    align-items: center;
    position: relative;
}

.milestone-date {
    width: 120px;
    text-align: center;
    font-weight: bold;
    color: #4CAF50;
    flex-shrink: 0;
}

.milestone-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    z-index: 2;
    border: 2px solid #81C784;
    color: #4CAF50;
    font-size: 1.2rem;
}

.milestone-content {
    flex-grow: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.milestone-content h3 {
    margin: 0 0 10px;
    color: #333;
}

.milestone-content p {
    margin: 0;
    color: #555;
}

.milestone-content img {
    max-width: 100%;
    margin-top: 10px;
    border-radius: 4px;
}

/* 愿望清单样式 */
.wishlist-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.wishlist-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #4CAF50;
}

.tab-btn.active {
    color: #4CAF50;
    border-bottom: 3px solid #4CAF50;
}

.tab-pane {
    display: none;
    padding: 20px;
}

.tab-pane.active {
    display: block;
}

.wish-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
    align-items: center;
}

.wish-item:last-child {
    border-bottom: none;
}

.wish-item.completed {
    opacity: 0.7;
}

.wish-icon {
    width: 40px;
    height: 40px;
    background: #E8F5E9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #4CAF50;
    flex-shrink: 0;
}

.wish-item.completed .wish-icon {
    background: #E8F5E9;
    color: #4CAF50;
}

.wish-details {
    flex-grow: 1;
}

.wish-details h3 {
    margin: 0 0 5px;
    color: #333;
}

.wish-details p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.wish-details img {
    max-width: 100%;
    margin-top: 10px;
    border-radius: 4px;
}

.wish-actions {
    margin-left: 15px;
}

.complete-btn {
    padding: 5px 10px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.complete-btn:hover {
    background: #388E3C;
}

.add-wish-form {
    padding: 20px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.add-wish-form h3 {
    margin: 0 0 15px;
    color: #333;
}

.add-wish-form input,
.add-wish-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.add-wish-form textarea {
    min-height: 80px;
}

.add-wish-form button {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-wish-form button:hover {
    background: #388E3C;
}

/* 情侣问答样式 */
.qa-container {
    max-width: 800px;
    margin: 0 auto;
}

.qa-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.question {
    padding: 15px 20px;
    background: #81C784;
    color: white;
    font-weight: 500;
}

.answers {
    padding: 15px;
}

.answer {
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
}

.answer:last-child {
    margin-bottom: 0;
}

.answer.male {
    background: #E8F5E9;
}

.answer.female {
    background: #C8E6C9;
}

.answer-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.answer-header img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.answer-header span {
    font-weight: 500;
}

.answer.male .answer-header span {
    color: #2E7D32;
}

.answer.female .answer-header span {
    color: #388E3C;
}

.answer-content {
    color: #333;
    line-height: 1.6;
}

.add-qa-form {
    max-width: 800px;
    margin: 30px auto 0;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.add-qa-form h3 {
    margin: 0 0 15px;
    color: #333;
}

.add-qa-form input,
.add-qa-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.add-qa-form textarea {
    min-height: 80px;
}

.answer-fields {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.answer-field {
    flex: 1;
}

.answer-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #666;
}

.add-qa-form button {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-qa-form button:hover {
    background: #388E3C;
}

/* 相册样式 */
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px;
}

.photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 1;
}

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

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

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.9rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

/* 恋爱语录样式 - 修改后 */
.messages-container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.message-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.message-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.message-content {
    font-size: 1rem;
    font-style: italic;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.6;
    position: relative;
    padding-left: 25px;
}

.message-content .quote-icon {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.5rem;
    color: #4CAF50;
    line-height: 1;
}

.message-author {
    text-align: right;
    color: #666;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.message-author .dashicons {
    margin-right: 5px;
    color: #4CAF50;
    font-size: 16px;
}

.add-message-form {
    max-width: 800px;
    margin: 30px auto 0;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.add-message-form h3 {
    margin: 0 0 15px;
    color: #333;
    font-size: 1.2rem;
}

.add-message-form textarea,
.add-message-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
}

.add-message-form textarea {
    min-height: 100px;
}

.add-message-form button {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.add-message-form button:hover {
    background: #388E3C;
}

/* 照片模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    display: block;
    margin: 60px auto;
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
}

#caption {
    margin: 15px auto;
    text-align: center;
    color: white;
    max-width: 80%;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #4CAF50;
}

/* 页脚样式 */
.couple-footer {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    color: #666;
}

.love-message p {
    font-size: 1.2rem;
    font-style: italic;
    margin: 0 0 10px;
    color: #4CAF50;
}

.love-message span {
    font-size: 0.9rem;
}

.copyright {
    font-size: 0.9rem;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4CAF50;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

/* 响应式设计 - 移动端优化 */
@media (max-width: 768px) {
    /* 封面区域 */
    .couple-cover {
        height: 300px;
    }
    
    .cover-content h1 {
        font-size: 2rem;
    }
    
    .couple-avatars {
        gap: 15px;
    }
    
    .avatar {
        width: 80px;
        height: 80px;
    }
    
    /* 恋爱天数圆形显示 */
    .together-time {
        position: relative;
        width: 120px;
        height: 120px;
        margin: 20px auto;
        border-radius: 50%;
        background: rgba(255,255,255,0.2);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .days-count {
        font-size: 2.5rem;
        line-height: 1;
        margin: 0;
    }
    
    .days-text {
        font-size: 1rem;
        margin-top: 5px;
    }
    
    /* 导航菜单 - 鸡蛋椭圆形 */
    .couple-nav ul {
        display: flex;
        justify-content: center;
        padding: 10px 0;
    }
    
    .couple-nav li {
        flex: 0 0 auto;
        margin: 0 5px;
    }
    
    .couple-nav a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 60px;
        padding: 0;
        border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
        background: #4CAF50;
        color: white;
        font-size: 0.7rem;
        text-align: center;
        line-height: 1.2;
        box-shadow: 0 3px 6px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
    }
    
    .couple-nav a:hover,
    .couple-nav a.active {
        background: #388E3C;
        transform: translateY(-3px);
    }
    
    .couple-nav a.active:after {
        display: none;
    }
    
    /* 内容区域 */
    .couple-section {
        padding: 40px 15px;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    /* 时光轴 */
    .timeline:before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 50px !important;
        padding-right: 0 !important;
        text-align: left !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-badge,
    .timeline-item:nth-child(even) .timeline-badge {
        left: 0;
        right: auto;
    }
    
    /* 里程碑 */
    .milestone-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .milestone-date {
        width: 100%;
        text-align: left;
        margin-bottom: 10px;
    }
    
    .milestone-icon {
        margin: 10px 0;
    }
    
    /* 问答 */
    .answer-fields {
        flex-direction: column;
        gap: 0;
    }
    
    /* 相册 */
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    /* 恋爱语录 - 移动端优化 */
    .messages-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .message-item {
        padding: 15px;
    }
    
    .message-content {
        font-size: 0.95rem;
        padding-left: 20px;
    }
    
    .message-content .quote-icon {
        font-size: 1.2rem;
    }
    
    .message-author {
        font-size: 0.8rem;
    }
    
    .add-message-form {
        padding: 15px;
    }
    
    .add-message-form h3 {
        font-size: 1.1rem;
    }
    
    .add-message-form textarea {
        min-height: 80px;
    }
    
    /* 模态框 */
    .modal-content {
        margin: 30px auto;
        max-width: 95%;
    }
    
    .close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .couple-cover {
        height: 250px;
    }
    
    .cover-content h1 {
        font-size: 1.8rem;
    }
    
    .avatar {
        width: 70px;
        height: 70px;
    }
    
    /* 恋爱天数圆形显示调整 */
    .together-time {
        width: 100px;
        height: 100px;
    }
    
    .days-count {
        font-size: 2rem;
    }
    
    /* 导航菜单调整 */
    .couple-nav a {
        width: 45px;
        height: 55px;
        font-size: 0.6rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .message-content {
        font-size: 0.9rem;
    }
    
    .add-message-form textarea {
        min-height: 70px;
    }
}