/* ===== Couple App 全屏适配 ===== */
#coupleApp {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: #f5f5f7;
    overflow: hidden;
}

.couple-app {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* 主内容区域 */
.couple-main {
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
}

/* ===== 原有样式开始 ===== */

/* Couple App Styles */
.couple-header {
    flex-shrink: 0;
    min-height: 200px;
    padding-top: calc(44px + env(safe-area-inset-top, 0px));

    background-color: #333;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 0 0 30px 30px;
}

.couple-avatars {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.c-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #fff;
    background-color: #eee;
    background-size: cover;
    background-position: center;
}

.heart-beat {
    font-size: 24px;
    color: #ff4d4f;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

.days-count {
    text-align: center;
}

.days-count span {
    font-size: 14px;
    opacity: 0.8;
}

.days-count h2 {
    font-size: 36px;
    font-weight: bold;
}

.couple-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    margin-top: -30px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}


.c-menu-item {
    background: #fff;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    cursor: pointer;
    border: 1px solid #eee;
}

.c-menu-item i {
    font-size: 24px;
    color: #333;
}

.c-menu-item span {
    font-size: 12px;
    font-weight: bold;
}

/* Photo Wall */
.photo-wall {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.photo-item {
    aspect-ratio: 1;
    background-color: #eee;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.add-photo {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dashed #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 24px;
    color: #ccc;
}

/* Note Board */
.note-list {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.note-card {
    background: #fff;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.note-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.note-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-size: cover;
}

.note-time {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

.note-content {
    font-size: 14px;
    line-height: 1.5;
}

/* Diary */
.diary-list {
    padding: 15px;
}

.diary-item {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    border-left: 4px solid #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
}

.diary-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.diary-preview {
    font-size: 14px;
    font-weight: bold;
}

/* Bind Page */
.bind-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 30px;
    text-align: center;
}

.bind-list {
    width: 100%;
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.bind-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.bind-item.selected {
    background-color: #f0f0f0;
}

/* New Styles */
.diary-cover {
    transition: background 0.2s;
}
.diary-cover:hover {
    background-color: #ffe6f0 !important;
}
/* ===== Couple 子页面适配 ===== */

/* 照片墙容器 */
.photo-wall {
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

/* 碎碎念容器 */
.note-list {
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

/* 日记容器 */
.diary-list {
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

/* 绑定页面 */
.bind-page {
    flex: 1;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bind-list {
    max-height: calc(100vh - 400px);
}

/* ===== iOS Safari 特殊处理 ===== */
@supports (-webkit-touch-callout: none) {
    #coupleApp {
        height: -webkit-fill-available;
    }

    .couple-main {
        padding-bottom: calc(34px + env(safe-area-inset-bottom, 20px));
    }
}
