/* ==========================================================================
   LOVES APP CSS
   ========================================================================== */

.loves-view {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background-color: #ffffff;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
}

#loves-view.loves-view,
#lovers-space-view.lovers-space-view,
#lovers-friend-phone-view.lovers-friend-phone-view,
#friend-files-view,
#friend-health-view,
#friend-pay-view,
#friend-game-view,
#friend-phone-settings-sheet,
#friend-imessage-view,
#friend-reverse-chat-view,
#friend-safari-view,
#friend-music-view,
#friend-phonecall-view {
    inset: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.loves-view.active {
    display: flex;
}

.loves-header {
    height: max(44px, calc(44px + var(--safe-top)));
    padding-top: var(--safe-top);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 16px;
    padding-right: 16px;
    background-color: transparent;
    flex-shrink: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    pointer-events: none;
    box-sizing: border-box;
}

.loves-header-title {
    display: none;
}

.loves-back-btn {
    cursor: pointer;
    z-index: 10;
    pointer-events: auto;
}

.loves-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
}

/* 留言板设计 */
.loves-board {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    padding: max(80px, calc(60px + var(--safe-top))) 20px 40px;
    gap: 25px 20px;
    min-height: 100%;
    /* 淡雅高级背景 */
    background-color: #f7f6f2;
    background-image: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
}

/* 便利贴设计 */
.loves-note {
    width: calc(50% - 10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px 15px;
    border-radius: 4px 16px 16px 16px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.06);
    background: #fff;
    box-shadow: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease;
}

.loves-note::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    border-width: 0 12px 12px 0;
    border-style: solid;
    border-color: rgba(0,0,0,0.04) transparent transparent transparent;
    border-bottom-right-radius: 4px;
}

.loves-note:hover, .loves-note:active {
    transform: scale(1.02) !important; /* 强制覆盖内联旋转实现放大 */
    border-color: rgba(0,0,0,0.12);
    box-shadow: none;
    z-index: 10;
}

/* 图钉 */
.loves-note-pin {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.08);
    background: #ccc;
    box-shadow: none;
    z-index: 2;
}
.loves-note-pin::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
}

.loves-note-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: none;
    background-color: #f7f7f7;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 12px;
}

.loves-note-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loves-note-avatar i {
    font-size: 30px;
    color: #ccc;
}

/* 底部交互区：名字 + 签名 + 动作按钮 (统一作为一个可点击区块) */
.loves-note-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    background: rgba(0,0,0,0.02);
    transition: background 0.2s;
}

.loves-note-bottom:active {
    background: rgba(0,0,0,0.04);
}

.loves-note-name {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.loves-note-sign {
    font-size: 11px;
    color: #666;
    text-align: center;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    min-height: 14px;
}

.loves-note-action {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: none;
}

.loves-note-action-invite {
    background: #111;
    color: #fff;
}

.loves-note-action-enter {
    background: #fff;
    color: #111;
}

.loves-placeholder {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #8e8e93;
    margin-top: 50px;
}

.loves-placeholder i {
    font-size: 48px;
    color: #ff9bb3;
}

.loves-placeholder p {
    font-size: 16px;
    font-weight: 500;
}

/* 情侣空间视图 */
.lovers-space-view {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background-color: #ffffff;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 110;
}

.lovers-space-view.active {
    display: flex;
}

@keyframes lovesFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lovers-space-panel {
    display: none;
    position: absolute;
    inset: 0;
}

.lovers-space-panel.active {
    display: flex;
    animation: lovesFadeIn 0.3s ease-out forwards;
}

/* 好友手机全屏界面 */
.lovers-friend-phone-view {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 120;
    flex-direction: column;
}

.friend-imessage-view {
    display: none;
}
.friend-imessage-view.active {
    display: flex;
}

.reverse-chat-view {
    display: none;
}
.reverse-chat-view.active {
    display: flex;
}

.friend-safari-view {
    display: none;
}
.friend-safari-view.active {
    display: flex;
}

.reverse-bubble-left {
    align-self: flex-start;
    background: #e5e5ea;
    color: #000;
    padding: 10px 14px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    max-width: 75%;
    font-size: 15px;
    line-height: 1.4;
    word-break: break-word;
}

.reverse-bubble-right {
    align-self: flex-end;
    background: #34c759;
    color: #fff;
    padding: 10px 14px;
    border-radius: 18px;
    border-bottom-right-radius: 4px;
    max-width: 75%;
    font-size: 15px;
    line-height: 1.4;
    word-break: break-word;
}

.lovers-friend-phone-view.active {
    display: flex;
}
