/* ============================================
   首页样式 
   想改颜色、间距、圆角都在这里改
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f5f5f7;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    -webkit-font-smoothing: antialiased;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ===== 这里可以改：整体背景颜色 ===== */
.page {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;  
    padding: 48px 20px 24px;      
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}

/* ===== 这里可以改：头部区域 ===== */
.header {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.names {
    font-size: 36px;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ===== 可点击的名字 ===== */
.clickable-name {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 12px;
    position: relative;
}

.clickable-name:active {
    background: rgba(0, 122, 255, 0.1);
    transform: scale(0.96);
}


/* ===== 这里可以改：中间爱心的颜色 ===== */
.heart {
    color: #ff6b6b;
    font-size: 16px;
}

/* ===== 这里可以改：相识天数的样式 ===== */
/* ===== 相识天数的样式 ===== */
.days-counter {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 40px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 0.5px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 22px; 
    cursor: pointer;           
    transition: all 0.2s;     
}

.days-counter:active {
    background: rgba(0, 0, 0, 0.03);  
    transform: scale(0.98);          
}

.days-label {
    font-size: 15px;
    color: #86868b;
    margin-right: 6px;
}

.days-number {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f;
}

.days-unit {
    font-size: 14px;
    color: #86868b;
    margin-left: 4px;
}

/* ===== 三个功能入口 ===== */
.nav-grid {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
    width: 100%;
}

/* ===== 这里可以改：卡片的背景和圆角 ===== */
.nav-item {
    flex: 1;
    max-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 8px;
    background: white;
    border-radius: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 0.5px solid rgba(0, 0, 0, 0.04);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-item:active {
    transform: scale(0.97);
    background: #f9f9f9;
}

.nav-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.nav-label {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 2px;
}

.nav-sub {
    font-size: 11px;
    color: #86868b;
}

/* ===== 聊天入口 ===== */
.chat-button {
    width: auto;           /* 由内容撑开，不再铺满 */
    min-width: 160px;      /* 最小宽度，不会太窄 */
    background: white;
    border: none;
    padding: 14px 32px;    /* 左右内边距加大，看起来更协调 */
    border-radius: 60px;
    font-size: 18px;
    font-weight: 500;
    color: #1d1d1f;
    display: inline-flex;  /* 改成 inline-flex，配合 width: auto */
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 0.5px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin: 0 auto;        /* 居中 */
}

.chat-button:active {
    transform: scale(0.98);
    background: #f9f9f9;
}

.chat-icon {
    font-size: 22px;
}



/* ===== 弹窗样式（随手记用） ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 100;
}

.modal-sheet {
    background: white;
    width: 100%;
    max-width: 480px;
    border-radius: 24px 24px 0 0;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-title {
    font-weight: 600;
    font-size: 18px;
    text-align: center;
    margin-bottom: 20px;
}

.modal-input {
    width: 100%;
    padding: 14px;
    border: 1px solid #d9d9d9;
    border-radius: 16px;
    font-size: 16px;
    margin-bottom: 16px;
    background: #f9f9fb;
}

.modal-input:focus {
    outline: none;
    border-color: #007aff;
    background: white;
}

.modal-textarea {
    min-height: 120px;
    resize: vertical;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 16px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn.cancel {
    background: #f2f2f2;
    color: #1d1d1f;
}

.modal-btn.confirm {
    background: #007aff;
    color: white;
}

.modal-btn:active {
    transform: scale(0.98);
}

/* ===== 底部留白 ===== */
.footer {
    margin-top: 10px;
    font-size: 12px;
    color: #aeaeb2;
    margin-top: 10px;
    margin-bottom: 150px;
    text-align: center;
}

/* ===== 底部双按钮 ===== */
.bottom-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.bottom-actions button {
    flex: 1;
    max-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 60px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
}

.bottom-actions button:active {
    transform: scale(0.97);
}

/* 想你了按钮 */
.miss-you-btn {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #8b3a5e;
    border: 0.5px solid rgba(255, 255, 255, 0.3);
}

.miss-you-btn:active {
    background: linear-gradient(135deg, #ffb6b9 0%, #ffe0f0 100%);
}

.miss-you-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.miss-you-icon {
    font-size: 20px;
}

/* 随手记按钮 */
.quick-note-btn {
    background: #007aff;
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.quick-note-btn:active {
    background: #005bbf;
}

.quick-note-icon {
    font-size: 20px;
}