* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f9f5f0;
    color: #5a4a42;
    min-height: 100vh;
}

/* 顶部搜索栏 */
.header {
    background-color: #fff9f0;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #f0e6d6;
}

.envelope-icon {
    font-size: 1.5rem;
    color: #d4a373;
    margin-right: 12px;
}

.search-bar {
    flex: 1;
    background-color: #f8f4ee;
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    color: #b38a58;
}

.search-outline {
    font-size: 1rem;
    margin-right: 8px;
    //color:black;
}

.search-placeholder {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* 功能板块 - 修改部分 */
.function-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 15px;
    padding-left: 20px;
    padding-right: 20px;
}

.function-card {
    height: 60px; /* 减小高度 */
    border-radius: 20px; /* 调整为更扁平的椭圆 */
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem; /* 减小字体大小 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
}

.function-card:active {
    transform: scale(0.97);
}

/* 降低饱和度的渐变色 */
.card-1, .card-4 {
    background: linear-gradient(135deg, #e2b4bd 20%, #8456af 80%);
}

.card-2, .card-3 {
    background: linear-gradient(135deg, #b4d7e8 20%, #d8dda8 80%);
}

/* 动态日记标题栏 */
.tab-bar {
    display: flex;
    padding: 12px 15px;
    border-bottom: 1px solid #f0e6d6;
    background-color: #fff9f0;
}

.tab-item {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    color: #b38a58;
    font-weight: 500;
    padding: 5px 0;
}

.tab-item.active {
    color: #d4a373;
    position: relative;
}

.tab-item.active::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 3px;
    background-color: #d4a373;
    border-radius: 3px;
}

/* 动态日记列表 */
.diary-list {
    padding: 10px 12px;
}

.diary-item {
    background-color: white;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.user-left {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f0e6d6;
    margin-right: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #b38a58;
    font-weight: bold;
    font-size: 0.9rem;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #5a4a42;
}

.more-icon {
    font-size: 1.1rem;
    color: #a69b8f;
}

.diary-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #5a4a42;
    margin-bottom: 10px;
}

.diary-image {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 10px;
    background-color: #f8f4ee;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #a69b8f;
    overflow: hidden;
}

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

.action-bar {
    display: flex;
    padding-top: 6px;
    border-top: 1px solid #f8f4ee;
}

.action-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #a69b8f;
    font-size: 0.8rem;
}

.action-icon {
    font-size: 1.1rem;
    margin-right: 4px;
}


.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  
  ion-spinner {
    width: 40px;
    height: 40px;
    color: var(--ion-color-primary);
  }
  
  .loading-text {
    margin-top: 16px;
    color: var(--ion-color-medium);
    font-size: 14px;
  }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  
  ion-icon {
    font-size: 60px;
    color: var(--ion-color-medium);
    margin-bottom: 16px;
  }
  
  .empty-text {
    color: var(--ion-color-medium);
    font-size: 16px;
  }
}