/* 扁平化风格变量 */
:root {
  --header-height: 56px;
  --card-radius: 12px;
  --element-radius: 8px;
  --shadow-sm: 0 1px 3px rgba(90, 74, 66, 0.12);
  --shadow-md: 0 4px 6px rgba(90, 74, 66, 0.1);
  --transition: all 0.25s ease;
}

/* 顶部工具栏 */
.header-toolbar {
  --background: #FFFFFF;
  --border-width: 0;
  --padding-top: 0;
  --padding-bottom: 0;
  --padding-start: 0;
  --padding-end: 0;
  --min-height: var(--header-height);
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  width: 100%;
}

/* 搜索栏 */
.search-container {
  flex: 1;
  display: flex;
  align-items: center;
  background: #FFF9F2;
  border-radius: var(--element-radius);
  padding: 8px 16px;
  margin-right: 12px;
  transition: var(--transition);
  
  &:active {
    background: #F8F4EE;
  }
}

.search-icon {
  font-size: 18px;
  color: #D4B8A5;
  margin-right: 8px;
}

.search-input {
  --padding-top: 0;
  --padding-bottom: 0;
  --padding-start: 0;
  --padding-end: 0;
  font-size: 14px;
}

.search-placeholder {
  color: #D4B8A5;
  opacity: 0.8;
}

.add-button {
  --padding-start: 0;
  --padding-end: 0;
  --ripple-color: transparent;
  
  ion-icon {
    font-size: 24px;
    color: #FF8C66;
  }
}

/* 功能网格 */
.function-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 16px;
}

.function-card {
  height: 120px;
  border-radius: var(--card-radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  
  &:active {
    transform: translateY(2px);
    box-shadow: none;
  }
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.card-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 15px;
  font-weight: 500;
}

/* 卡片背景色保持不变 */
.card-1, .card-4 {
  background: linear-gradient(135deg, #FFB8B8 0%, #FF8C8C 100%);
}

.card-2, .card-3 {
  background: linear-gradient(135deg, #FFD8B8 0%, #FFB88C 100%);
}

/* 标签栏 */
.tab-container {
  background: #FFFFFF;
  padding: 0 16px;
  box-shadow: var(--shadow-sm);
}

.tab-bar {
  display: flex;
  position: relative;
}

.tab-item {
  flex: 1;
  text-align: center;
  font-size: 14px;
  color: #D4B8A5;
  font-weight: 500;
  padding: 16px 0;
  position: relative;
  cursor: pointer;
  min-width: 0; /* 防止内容溢出 */
  
  &.active {
    color: #FF8C66;
    font-weight: 600;
  }
}

.tab-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: calc(100% / 3); /* 每个标签占1/3宽度 */
  height: 3px;
  background-color: #FF8C66;
  border-radius: 3px;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 日记卡片 */
.diary-list {
  padding: 16px;
}

.diary-card {
  background: #FFFFFF;
  border-radius: var(--card-radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  
  &:active {
    transform: translateY(2px);
  }
}

.user-header {
  display: flex;
  align-items: center;
  padding: 16px 16px 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD3B6, #FF8C66);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  font-size: 16px;
  margin-right: 12px;
}

.user-meta {
  flex: 1;
}

.user-name {
  font-size: 15px;
  font-weight: 500;
  color: #5A4A42;
  margin-bottom: 2px;
}

.post-time {
  font-size: 12px;
  color: #D4B8A5;
}

.more-button {
  --padding-start: 0;
  --padding-end: 0;
  --ripple-color: transparent;
  
  ion-icon {
    color: #D4B8A5;
    font-size: 20px;
  }
}

.diary-content {
  padding: 0 16px 12px;
}

.content-text {
  font-size: 15px;
  line-height: 1.6;
  color: #5A4A42;
  margin-bottom: 12px;
}

.content-image {
  width: 100%;
  border-radius: var(--element-radius);
  overflow: hidden;
  background: #F8F4EE;
  height: 180px;
  
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.action-bar {
  display: flex;
  border-top: 1px solid #F0E6D6;
  padding: 8px 0;
}

.action-button {
  --padding-start: 0;
  --padding-end: 0;
  --ripple-color: transparent;
  flex: 1;
  
  ion-icon {
    font-size: 20px;
    margin-right: 6px;
  }
}

.action-count {
  font-size: 14px;
  color: #5A4A42;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  
  ion-icon {
    font-size: 48px;
    color: #D4B8A5;
    margin-bottom: 16px;
  }
  
  .empty-text {
    color: #D4B8A5;
    font-size: 16px;
  }
}