* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;

    margin: 0;
    padding: 0;

    overflow-x: hidden;
    overflow-y: auto;

    background: #f7f6f1;
    color: #77766f;

    font-family:
        "Times New Roman",
        "Noto Serif SC",
        serif;
}

button {
    font-family: inherit;
    border: none;
    background: none;
}

.app {
    width: 100%;
    max-width: 480px;

    min-height: 100vh;

    margin: 0 auto;

    padding: 0 0 100px;

    position: relative;

    overflow: visible;
}


/* 顶部 */

.top {
    height: 100px;
    position: relative;
}

.menu {
    position: absolute;
    left: 5px;
    top: 15px;

    font-size: 28px;
    color: #85847d;
}

.avatars {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 5px;
}

.avatar {
    width: 105px;
    height: 105px;

    border-radius: 50%;
    background: #eeece6;

    border: 4px solid #ffffff;

    display: flex;
    justify-content: center;
    align-items: center;

    color: #aaa89f;
    font-size: 13px;

    box-shadow: 0 3px 12px rgba(100, 100, 100, 0.08);
}

.avatar + .avatar {
    margin-left: -18px;
}


/* 标题 */

.hero {
    text-align: center;
    padding-top: 35px;
    padding-bottom: 25px;
}

.hero h1 {
    margin: 0;

    font-size: 40px;
    font-weight: 400;
    font-style: italic;

    color: #77736f;
    letter-spacing: 2px;
}

.hero p {
    margin-top: 12px;

    font-size: 18px;
    font-style: italic;

    color: #aaa6a0;
}


/* 蝴蝶结 */

.ribbon {
    position: relative;
    width: 250px;
    height: 70px;
    margin: 0 auto 20px;
}

.ribbon span {
    position: absolute;

    width: 130px;
    height: 65px;

    border: 2px solid #d9dce5;

    opacity: 0.7;
}

.ribbon span:first-child {
    left: 0;
    transform: rotate(18deg);
    border-radius: 70% 20% 70% 20%;
}

.ribbon span:last-child {
    right: 0;
    transform: rotate(-18deg);
    border-radius: 20% 70% 20% 70%;
}


/* 大卡片 */

.love-card {
    position: relative;
    padding: 22px 20px;
    text-align: center;

    background: rgba(255, 255, 252, 0.9);
    border: 1px solid #e5e1d9;

    box-shadow:
        0 8px 25px rgba(120, 115, 110, 0.08);

    border-radius: 8px;
}

.small-title {
    font-size: 21px;
    font-style: italic;
    color: #77736f;
}

.line {
    width: 140px;
    height: 1px;
    background: #aaa69e;

    margin: 8px auto 12px;
}

.love-card h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 400;
    color: #77766f;
}

.love-card p {
    margin-top: 8px;
    font-size: 14px;
    color: #aaa79f;
}


/* 两张纸 */

.notes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.note {
    min-height: 125px;
    padding: 18px 14px;

    background: #f4f2ed;
    border: 1px solid #e5e1db;

    box-shadow: 0 7px 20px rgba(100, 95, 90, 0.06);
}


/* 一起听 */

.listening {
    display: flex;
    align-items: center;

    margin-top: 16px;
    padding: 14px;

    background: #f8f5ec;

    border: 1px solid #e2dfd6;

    box-shadow:
        0 8px 25px rgba(100, 95, 90, 0.06);

    border-radius: 4px;
}

.music-cover {
    width: 75px;
    height: 75px;
}

.music-info {
    flex: 1;
    margin-left: 14px;
}


/* 手机适配 */

@media (max-width: 380px) {

    .app {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .avatar {
        width: 90px;
        height: 90px;
    }

    .note {
        padding: 18px 12px;
    }

}
/* Daily 页面 */

.daily-page {
    display: none;
    padding: 30px 20px 100px;
}

.daily-page h1 {
    text-align: center;
    font-weight: 400;
}

.daily-status,
.memo-section {
    margin-top: 25px;
    padding: 20px;

    background: white;
    border: 1px solid #e5e1d9;
    border-radius: 8px;
}

.daily-status h2,
.memo-section h2 {
    margin-top: 0;
    font-weight: 400;
}

.mood-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.mood-options button {
    padding: 8px 14px;
    border: 1px solid #ddd8d2;
    border-radius: 20px;
    cursor: pointer;
}

.mood-options button.selected {
    background: #aaa0bf;
    color: white;
}

textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;

    box-sizing: border-box;
    resize: vertical;

    border: 1px solid #ddd8d2;
    border-radius: 8px;

    font-family: inherit;
}

.save-mood,
.add-memo {
    margin-top: 12px;
    padding: 10px 18px;

    border-radius: 20px;
    background: #aaa0bf;
    color: white;

    cursor: pointer;
}

.memo-section {
    margin-top: 20px;
}

/* Memory 页面 */

.memory-page {
    display: none;
    padding: 30px 20px 110px;
}

.memory-page > h1 {
    text-align: center;
    font-weight: 400;
    margin-bottom: 8px;
}

.memory-subtitle {
    text-align: center;
    color: #aaa69e;
    font-size: 14px;
    margin-bottom: 35px;
}


/* 每一个分类 */

.memory-category {
    margin-bottom: 30px;
    padding: 22px;

    background: #fffefa;

    border: 1px solid #e5e1d9;
    border-radius: 8px;

    box-shadow:
        0 8px 25px rgba(100, 95, 90, 0.05);
}


/* 分类标题 */

.category-title {
    display: flex;
    align-items: center;
    gap: 15px;

    margin-bottom: 22px;
}

.category-title > span {
    font-size: 14px;
    color: #aaa0bf;
    letter-spacing: 2px;
}

.category-title h2 {
    margin: 0;

    font-size: 20px;
    font-weight: 400;

    color: #77736f;
}

.category-title p {
    margin: 5px 0 0;

    font-size: 11px;
    font-style: italic;

    color: #aaa69e;
}


/* 普通回忆 */

.memory-item {
    position: relative;

    padding: 16px 0 16px 18px;

    border-left: 1px solid #d9d2df;
}

.memory-item::before {
    content: "";

    position: absolute;

    left: -4px;
    top: 21px;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #aaa0bf;
}

.memory-date {
    font-size: 11px;
    color: #aaa69e;
}

.memory-item h3 {
    margin: 7px 0;

    font-size: 16px;
    font-weight: 400;

    color: #77736f;
}

.memory-item p {
    margin: 0;

    font-size: 13px;
    line-height: 1.8;

    color: #99958d;
}


/* 重要回忆 */

.important-memory {
    padding: 22px;

    background: #f7f1e8;

    border: 1px solid #e5ddd0;

    text-align: center;
}

.important-memory h3 {
    margin: 12px 0;

    font-size: 19px;
    font-weight: 400;

    color: #706c67;
}

.important-memory p {
    font-size: 13px;
    line-height: 1.8;

    color: #99938a;
}


/* 添加按钮 */

.add-memory {
    margin-top: 18px;

    padding: 8px 15px;

    border: 1px solid #ddd7e1;
    border-radius: 20px;

    color: #91889d;
    background: transparent;

    cursor: pointer;
}


/* 时间轴 */

.timeline {
    position: relative;

    margin-left: 10px;
    padding-left: 25px;

    border-left: 1px solid #d9d2df;
}

.timeline-item {
    position: relative;

    padding: 10px 0 20px;
}

.timeline-item::before {
    content: "";

    position: absolute;

    left: -29px;
    top: 14px;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #aaa0bf;
}

.timeline-item span {
    font-size: 11px;
    color: #aaa69e;
}

.timeline-item p {
    margin: 6px 0 0;

    font-size: 14px;
    color: #77736f;
}


/* =========================
   Chat 页面
========================= */

.chat-page {
    display: none;

    height: 100vh;
    width: 100%;

    position: relative;

    background: #f7f6f1;

    overflow: hidden;
}


/* 顶部 */

.chat-header {
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 14px;

    box-sizing: border-box;

    background: rgba(250, 249, 245, 0.96);

    border-bottom: 1px solid #e5e2dc;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    z-index: 50;
}


/* 左边返回 */

.chat-back-button {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    font-size: 32px;
    font-family: Arial, sans-serif;
    font-weight: 300;

    color: #77736f;

    cursor: pointer;
}


/* 中间备注名字 */

.chat-header h2 {
    position: absolute;

    left: 50%;
    transform: translateX(-50%);

    margin: 0;

    font-size: 17px;
    font-weight: 400;

    color: #6f6b68;

    white-space: nowrap;
}


/* 右边三个点 */

.chat-settings-button {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    font-size: 27px;
    line-height: 1;

    color: #77736f;

    cursor: pointer;
}

/* 聊天消息区域 */

.chat-messages {
    position: fixed;

    top: 60px;

    left: 0;
    right: 0;

    /*
     给输入框 + 底部导航预留空间
    */
    bottom: 175px;

    overflow-y: auto;

    padding: 25px 18px 30px;

   background: transparent;

    -webkit-overflow-scrolling: touch;

    /*
     防止滚动条影响布局
    */
    scrollbar-width: none;
}

.chat-messages::-webkit-scrollbar {
    display: none;
}


.message {
    display: flex;

    align-items: flex-end;

    margin-bottom: 18px;

    gap: 9px;
}

.user-message {
    justify-content: flex-end;
}


/* 聊天气泡旁头像 */

/* 聊天气泡旁头像 */

.message-avatar {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    border-radius: 10px;

    background: #e5e2e5;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 10px;

    color: #88828b;

    overflow: hidden;
}

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


/* 聊天消息 */

.message {
    display: flex;

    align-items: center;

    margin-bottom: 18px;

    gap: 9px;
}


/* 聊天气泡 */

.bubble {
    max-width: 65%;

    padding: 7px 11px;

    border-radius: 13px;

    font-size: 14px;

    line-height: 1.45;
}


.claude-bubble {
    background: #f1efea;

    color: #6f6b68;

    border-bottom-left-radius: 5px;
}


.user-bubble {
    background: rgba(246,137,175,0.55);

    color: #666;

    border-bottom-right-radius: 5px;

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    border: 1px solid rgba(255,255,255,0.5);

    box-shadow:
        0 8px 25px rgba(0,0,0,0.08);
}


/* 输入区域 */

.chat-input-area {
    position: fixed;

    left: 0;
    right: 0;

    bottom: 105px;

    min-height: 54px;

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 6px 12px;

    background: rgba(250, 249, 245, 0.98);

    border-top: 1px solid #e5e2dc;

    z-index: 60;
}


.chat-input-area textarea {
    flex: 1;

    min-height: 36px;
    max-height: 80px;

    resize: none;

    font-size: 16px;

    border: 1px solid #ddd8d2;

    border-radius: 18px;

    padding: 7px 13px;

    outline: none;

    background: white;
}


.chat-input-area button {
    padding: 8px 14px;

    border: none;

    border-radius: 18px;

    background: #aaa0bf;

    color: white;

    cursor: pointer;
}
/* =========================
   聊天设置
========================= */

.chat-settings {
    position: absolute;

    z-index: 20;

    top: 70px;
    right: 12px;

    width: 280px;

    padding: 20px;

    background: rgba(255, 254, 250, 0.98);

    border: 1px solid #e2ded7;

    border-radius: 12px;

    box-shadow:
        0 12px 35px rgba(80, 75, 70, 0.15);

    display: none;
}

.chat-settings.show {
    display: block;
}

.settings-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 18px;
}

.settings-header h2 {
    margin: 0;

    font-size: 18px;

    font-weight: 400;
}

.settings-header button {
    font-size: 22px;

    color: #888;

    cursor: pointer;
}

.setting-item {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 13px 0;

    border-bottom: 1px solid #eeeae3;

    font-size: 14px;

    color: #77736f;
}

.upload-button {
    padding: 5px 11px;

    border: 1px solid #ddd8d2;

    border-radius: 15px;

    cursor: pointer;

    color: #88828b;
}

.upload-button input {
    display: none;
}

.setting-item input[type="color"] {
    width: 40px;
    height: 28px;

    border: none;

    background: none;

    cursor: pointer;
}

.reset-chat-settings {
    width: 100%;

    margin-top: 18px;

    padding: 10px;

    border-radius: 20px;

    background: #aaa0bf;

    color: white;

    cursor: pointer;
}
/* Listen 页面 */

.listen-page {
    padding: 30px 20px 100px;
}

.music-card {
    margin-top: 25px;
    padding: 20px;
    display: flex;
    gap: 20px;
    background: white;
    border-radius: 18px;
    border: 1px solid #eee;
}

.music-cover {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eeeaf8;
    font-size: 14px;
}

.music-info h2 {
    margin: 0;
}

.song-name {
    margin: 15px 0;
}

.play-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: #8b7bb8;
    color: white;
}

.playlist {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 18px;
}

.song-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 15px;
}
/* AI每日信件 */

.ai-letter {

    margin: 25px 20px;

    padding: 25px;

    background: #fffaf3;

    border-radius: 18px;

    border: 1px solid #eee5d8;

    text-align: center;

}


.letter-title {

    font-size: 18px;

    font-style: italic;

    line-height: 1.6;

    color: #8b7b8f;

    margin-bottom: 20px;

}


.letter-content {

    padding: 15px;

    background: rgba(255,255,255,0.6);

    border-radius: 12px;

}


.letter-content h3 {

    font-size: 16px;

    font-weight: 400;

    color: #77736f;

}


.letter-content p {

    font-size: 14px;

    line-height: 1.8;

    color: #99938a;

}


.ai-letter button {

    margin-top: 18px;

    padding: 8px 20px;

    border-radius: 20px;

    border: 1px solid #ddd2c5;

    background: transparent;

    color: #88828b;

}
.mood-options button.selected {

    background: #f3a6b8;

    color: white;

    border-color: #f3a6b8;

}

.memory-create,
.memory-wall {

    margin: 25px 20px;

    padding: 20px;

    background: #fffaf5;

    border-radius: 18px;

}


.memory-create input,
.memory-create textarea {

    width: 100%;

    box-sizing: border-box;

    margin: 10px 0;

    padding: 12px;

    border-radius: 12px;

    border: 1px solid #eadfd5;

    font-size: 14px;

}


.memory-create textarea {

    height: 100px;

}


.save-memory {

    padding: 10px 20px;

    border-radius: 20px;

    border: none;

    background: #f3a6b8;

    color: white;

}

.memory-tag {

    display: inline-block;

    padding: 5px 12px;

    border-radius: 20px;

    background: #ffe5ec;

    color: #d8899c;

    font-size: 13px;

    margin-bottom: 8px;

}

.delete-memory{

    margin-top:10px;

    border:none;

    background:#f1e6e9;

    color:#ea97a9;

    border-radius:15px;

    padding:6px 12px;

}
/* Chat 气泡 */

.chat-messages {

    padding:20px;

}


.message {

    display:flex;

    margin-bottom:15px;

}


.claude-message {

    justify-content:flex-start;

}


.user-message {

    justify-content:flex-end;

}

.bubble {

    display:inline-block;

    max-width:70%;

    padding:12px 18px;

    border-radius:24px;

    line-height:1.6;

    background:
    linear-gradient(
        135deg,
        rgba(255,255,255,0.7),
        rgba(255,255,255,0.35)
    );

    backdrop-filter:blur(30px);

    -webkit-backdrop-filter:blur(30px);

    border:1px solid rgba(255,255,255,0.8);

    box-shadow:
    0 12px 35px rgba(0,0,0,0.12),
    inset 0 2px 15px rgba(255,255,255,0.9);

    overflow:hidden;

}

.claude-bubble,
.user-bubble {

    color:#666;

}
.chat-input-area {

    display:flex;

    gap:10px;

    padding:15px;

}


#chatInput {

    flex:1;

    min-height:45px;

    resize:none;

    padding:12px 16px;

    border-radius:22px;

    border:1px solid rgba(255,255,255,0.45);

    background:rgba(255,255,255,0.18);

    backdrop-filter:blur(30px);

    -webkit-backdrop-filter:blur(30px);

    box-shadow:
    0 8px 25px rgba(0,0,0,0.06),
    inset 0 1px 12px rgba(255,255,255,0.7);

    outline:none;

}


#sendMessage {

    padding:0 20px;

    border-radius:22px;

    border:1px solid rgba(255,255,255,0.5);

    background:rgba(255,255,255,0.2);

    backdrop-filter:blur(25px);

    -webkit-backdrop-filter:blur(25px);
       color:#888;
}

#sendMessage {

    position:relative;

    z-index:9999;

}

.chat-time {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 8px 0;
}

.page,
.home-page {
    display: none;
    height: 100%;
    width: 100%;
}

.home-page {
    display: block;
}

.bottom-nav {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 18px;

    height: 74px;

    display: flex;
    align-items: center;
    justify-content: space-around;

    padding: 0 8px;

    background: rgba(255, 250, 252, 0.82);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 38px;

    box-shadow:
        0 8px 30px rgba(150, 125, 155, 0.16);

    z-index: 100;
}


.bottom-nav button {
    flex: 1;

    height: 58px;

    border: none;
    background: transparent;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 4px;

    color: #b7a9b7;

    transition:
        transform 0.25s ease,
        color 0.25s ease;
}


.bottom-nav span {
    font-size: 25px;
    line-height: 1;

    transition:
        transform 0.25s ease;
}


.bottom-nav small {
    font-size: 12px;
    letter-spacing: 0.3px;
}


/* 普通状态 */

.bottom-nav button {
    color: #b7a9b7;
}


/* 当前选中 */

.bottom-nav button.active {
    color: #c58fa8;

    transform: translateY(-7px);
}


.bottom-nav button.active span {
    transform: scale(1.08);
}


/* 中间 Chat */

.bottom-nav .chat-tab {
    position: relative;

    flex: 0 0 72px;

    width: 72px;
    height: 72px;

    margin-top: -30px;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #e9bfd0,
            #d8c1e5
        );

    color: white;

    border: 5px solid rgba(255, 250, 252, 0.95);

    box-shadow:
        0 8px 24px rgba(190, 145, 175, 0.28);
}


.bottom-nav .chat-tab span {
    font-size: 30px;
}


.bottom-nav .chat-tab small {
    font-size: 12px;
    color: white;
}

/* =========================
   Home：完整一屏显示
   ========================= */

.home-page {
    height: 100dvh;
    min-height: 0;
    box-sizing: border-box;

    overflow: hidden;

    padding: 0 0 85px;

    display: block;
}

/* 顶部头像区域 */
.home-page .top {
    height: 70px;
}

.home-page .avatars {
    padding-top: 2px;
}

.home-page .avatar {
    width: 68px;
    height: 68px;
    border-width: 3px;
}

.home-page .avatar + .avatar {
    margin-left: -14px;
}

/* 标题 */
.home-page .hero {
    padding-top: 15px;
    padding-bottom: 12px;
}

.home-page .hero h1 {
    font-size: 32px;
}

.home-page .hero p {
    margin-top: 6px;
    font-size: 15px;
}

/* The Story */
.home-page .love-card {
    padding: 14px 18px;
}

.home-page .small-title {
    font-size: 19px;
}

.home-page .line {
    margin: 6px auto 9px;
}

.home-page .love-card h2 {
    font-size: 18px;
}

.home-page .love-card p {
    margin-top: 6px;
    font-size: 13px;
}

/* 两张纸 */
.home-page .notes {
    margin-top: 10px;
    gap: 8px;
}

.home-page .note {
    min-height: 92px;
    padding: 12px 10px;
}

.home-page .ai-message small {
    font-size: 12px;
}

.home-page .ai-message p {
    font-size: 15px;
    line-height: 1.5;
}

.home-page .diary span {
    font-size: 11px;
}

.home-page .diary h3 {
    margin: 5px 0;
    font-size: 16px;
}

.home-page .diary p {
    margin: 0;
    font-size: 11px;
}

/* 一起听 */
.home-page .listening {
    margin-top: 10px;
    padding: 9px;
}

.home-page .music-cover {
    width: 58px;
    height: 58px;
}

.home-page .music-info {
    margin-left: 10px;
}

.home-page .music-info h2 {
    margin: 4px 0;
    font-size: 14px;
}

.home-page .music-info p {
    margin-bottom: 5px;
    font-size: 10px;
}

.home-page .music-controls {
    margin-top: 6px;
    gap: 12px;
}

.home-page .music-controls .play {
    width: 27px;
    height: 27px;
}

.message-avatar img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.chat-background {
    position: fixed;

    top: 60px;
    left: 0;
    right: 0;
    bottom: 175px;

    background-color: #f6d5e8;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    overflow: hidden;

    z-index: 0;
}

.chat-messages {
    z-index: 1;
}