/* ===== 茶修·六境 视觉增强样式 ===== */
/* 禅意极简视觉元素与数据可视化 */

/* ===== 导入Chart.js ===== */
@import url('https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.min.css');

/* ===== 禅意装饰元素 ===== */

/* 水波纹动画 */
.zen-ripple {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 2rem auto;
}

.zen-ripple::before,
.zen-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 1px solid var(--teal);
  border-radius: 50%;
  opacity: 0;
  animation: ripple 3s ease-out infinite;
}

.zen-ripple::after {
  animation-delay: 1.5s;
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

/* 茶叶飘落动画 */
.tea-leaf {
  position: absolute;
  width: 20px;
  height: 30px;
  background: var(--green);
  border-radius: 0 50% 50% 50%;
  transform: rotate(45deg);
  opacity: 0.6;
  animation: leaf-fall 8s linear infinite;
}

.tea-leaf:nth-child(2) {
  left: 20%;
  animation-delay: 1s;
  background: var(--teal);
}

.tea-leaf:nth-child(3) {
  left: 50%;
  animation-delay: 3s;
  background: var(--amber);
}

.tea-leaf:nth-child(4) {
  left: 80%;
  animation-delay: 5s;
  background: var(--purple);
}

@keyframes leaf-fall {
  0% {
    top: -10%;
    transform: rotate(45deg) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    top: 110%;
    transform: rotate(405deg) translateX(100px);
    opacity: 0;
  }
}

/* 简约圆圈装饰 */
.zen-circle {
  position: absolute;
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  opacity: 0.3;
}

.zen-circle-1 {
  width: 300px;
  height: 300px;
  top: -150px;
  right: -150px;
  border-color: var(--teal);
}

.zen-circle-2 {
  width: 200px;
  height: 200px;
  bottom: -100px;
  left: -100px;
  border-color: var(--green);
}

.zen-circle-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-color: var(--amber);
}

/* 极简线条装饰 */
.zen-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
}

.zen-line-vertical {
  width: 1px;
  height: 100px;
  background: linear-gradient(180deg, transparent, var(--gray-200), transparent);
}

/* ===== 数据可视化容器 ===== */
.chart-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.chart-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: 0.05em;
}

.chart-canvas {
  width: 100% !important;
  height: 300px !important;
}

/* ===== 统计卡片 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--teal);
}

.stat-card:nth-child(2)::before {
  background: var(--green);
}

.stat-card:nth-child(3)::before {
  background: var(--amber);
}

.stat-card:nth-child(4)::before {
  background: var(--purple);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--gray-500);
  letter-spacing: 0.05em;
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.stat-sub {
  font-size: 0.72rem;
  color: #bbb;
  margin-top: 0.4rem;
  letter-spacing: 0.03em;
}

/* ===== 图表网格布局 ===== */
.stats-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.8rem;
  margin-top: 2.5rem;
}

.chart-container-full {
  grid-column: 1 / -1;
}

/* ===== 30天热力图 ===== */
.heatmap-wrap {
  padding: 1rem 0;
}

.heatmap-days,
.heatmap-week {
  display: flex;
  gap: 3px;
  margin-bottom: 4px;
}

.heatmap-cell {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  transition: transform 0.2s;
  cursor: default;
}

.heatmap-cell.heatmap-label {
  background: transparent !important;
  width: 36px;
  font-size: 0.65rem;
  color: #bbb;
}

.heatmap-cell.heatmap-today {
  box-shadow: 0 0 0 2px #3C2A6E;
  font-weight: 600;
}

.heatmap-cell:hover {
  transform: scale(1.15);
  z-index: 2;
}

.heatmap-day {
  font-size: 0.75rem;
  line-height: 1;
}

.heatmap-count {
  font-size: 0.55rem;
  line-height: 0.6;
  opacity: 0.8;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 0.8rem;
  font-size: 0.65rem;
  color: #bbb;
}

.heatmap-legend-box {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* ===== 本周进度条 ===== */
.weekly-bar-wrap {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 160px;
  padding: 1rem 0.5rem 0;
  gap: 2px;
}

.weekly-bar-item {
  flex: 1;
  max-width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.weekly-bar-val {
  font-size: 0.7rem;
  color: #8c7048;
  font-weight: 600;
  margin-bottom: 4px;
  min-height: 16px;
}

.weekly-bar-fill {
  width: 70%;
  max-width: 32px;
  border-radius: 6px 6px 0 0;
  transition: height 0.6s ease;
  min-height: 4px;
}

.weekly-bar-label {
  margin-top: 8px;
  font-size: 0.7rem;
  color: #999;
}

.weekly-bar-today .weekly-bar-label {
  color: #3C2A6E;
  font-weight: 600;
}

/* ===== 最近完成列表 ===== */
.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(200,180,160,0.2);
}

.recent-item:last-child {
  border-bottom: none;
}

.recent-name {
  font-size: 0.85rem;
  color: #5C3A28;
  font-weight: 500;
}

.recent-tags {
  display: flex;
  gap: 4px;
}

.recent-tag {
  font-size: 0.65rem;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 500;
}

.recent-tag-tea {
  background: #f0e8ff;
  color: #5C3A6E;
}

.recent-tag-dim {
  background: #e8f5eb;
  color: #3B6D11;
}

.recent-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #ccc;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .stats-charts {
    grid-template-columns: 1fr;
  }
  .chart-container-full {
    grid-column: auto;
  }
  .heatmap-cell {
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
  }
  .weekly-bar-wrap {
    height: 130px;
  }
}

/* ===== 进度环 ===== */
.progress-ring-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--gray-100);
  stroke-width: 8;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--teal);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out;
}

.progress-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--gray-900);
}

/* ===== 极简图标系统 ===== */
.icon-minimal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  color: var(--teal);
  font-size: 1.2rem;
  transition: all 0.3s;
}

.icon-minimal:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

/* ===== 引用样式增强 ===== */
.quote-zen {
  position: relative;
  padding: 2rem 3rem;
  margin: 2rem 0;
  background: var(--gray-50);
  border-radius: var(--radius);
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--gray-700);
  line-height: 2;
  font-style: italic;
}

.quote-zen::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-size: 4rem;
  color: var(--teal);
  opacity: 0.2;
  font-family: var(--serif);
  line-height: 1;
}

.quote-zen::after {
  content: '"';
  position: absolute;
  bottom: 0.5rem;
  right: 1.5rem;
  font-size: 4rem;
  color: var(--teal);
  opacity: 0.2;
  font-family: var(--serif);
  line-height: 1;
}

/* ===== 时间线增强 ===== */
.timeline-zen {
  position: relative;
  padding: 2rem 0;
}

.timeline-zen::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--gray-200);
  transform: translateX(-50%);
}

.timeline-item-zen {
  position: relative;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
}

.timeline-item-zen:nth-child(odd) {
  flex-direction: row;
}

.timeline-item-zen:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-dot-zen {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--teal);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--teal);
  z-index: 1;
}

.timeline-content-zen {
  width: 45%;
  padding: 1.5rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== 渐变背景增强 ===== */
.bg-gradient-zen {
  background: linear-gradient(135deg, var(--gray-50) 0%, #fff 50%, var(--gray-50) 100%);
}

.bg-gradient-teal {
  background: linear-gradient(135deg, var(--teal-light) 0%, #fff 100%);
}

.bg-gradient-green {
  background: linear-gradient(135deg, var(--green-light) 0%, #fff 100%);
}

/* ===== 微动画 ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
  animation: fadeInRight 0.6s ease-out;
}

/* 滚动触发动画 */
.scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 分隔符增强 ===== */
.divider-zen {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 3rem 0;
  gap: 1rem;
}

.divider-zen::before,
.divider-zen::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.divider-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  color: var(--teal);
  font-size: 1rem;
}

/* ===== 卡片悬停效果增强 ===== */
.card-hover-lift {
  transition: transform 0.3s, box-shadow 0.3s;
}

.card-hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

/* ===== 按钮样式增强 ===== */
.btn-zen {
  position: relative;
  padding: 0.8rem 2rem;
  background: transparent;
  border: 1px solid var(--teal);
  color: var(--teal);
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  overflow: hidden;
  transition: color 0.3s;
}

.btn-zen::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--teal);
  transition: left 0.3s;
  z-index: -1;
}

.btn-zen:hover {
  color: #fff;
}

.btn-zen:hover::before {
  left: 0;
}

/* ===== 表格样式增强 ===== */
.table-zen {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table-zen thead {
  background: var(--teal);
  color: #fff;
}

.table-zen th,
.table-zen td {
  padding: 1rem 1.5rem;
  text-align: left;
}

.table-zen tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.2s;
}

.table-zen tbody tr:hover {
  background: var(--gray-50);
}

.table-zen tbody tr:last-child {
  border-bottom: none;
}

/* ===== 标签云 ===== */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin: 2rem 0;
}

.tag-item {
  padding: 0.5rem 1.2rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--gray-700);
  transition: all 0.3s;
  cursor: pointer;
}

.tag-item:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  transform: translateY(-2px);
}

/* ===== 响应式优化 ===== */
@media (max-width: 768px) {
  .timeline-zen::before {
    left: 20px;
  }
  
  .timeline-item-zen {
    flex-direction: row !important;
    padding-left: 50px;
  }
  
  .timeline-dot-zen {
    left: 20px;
  }
  
  .timeline-content-zen {
    width: 100%;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .chart-container {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
