/* ========== 页面整体布局 ========== */
.records-page {
  min-height: 100vh;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
}

/* ========== 顶部导航栏 ========== */
.top-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88rpx;
  padding: 0 24rpx;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 99;
  border-bottom: 1rpx solid #f0f0f0;
  /* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || H5 || APP */
  padding-top: constant(safe-area-inset-top);
  padding-top: env(safe-area-inset-top);
  /* #endif */
}

.nav-back {
  width: 60rpx;
  height: 60rpx;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-arrow {
  font-size: 48rpx;
  color: #333;
  line-height: 1;
  font-weight: 300;
}

.nav-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title-text {
  font-size: 34rpx;
  font-weight: 900;
  color: #1a1a1a;
  letter-spacing: 0.05em;
}

.nav-placeholder {
  width: 60rpx;
}

/* ========== 统计概览 ========== */
.stats-overview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32rpx 40rpx;
  background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
  gap: 60rpx;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8rpx;
}

.stat-number {
  font-size: 56rpx;
  font-weight: 900;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
}

.stat-label {
  font-size: 22rpx;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.stat-divider {
  width: 2rpx;
  height: 60rpx;
  background: rgba(255, 255, 255, 0.3);
}

/* ========== 记录滚动区域 ========== */
.records-scroll {
  flex: 1;
  height: calc(100vh - 88rpx - 120rpx);
}

/* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || H5 || APP */
.records-scroll {
  height: calc(100vh - 88rpx - 120rpx - constant(safe-area-inset-top));
  height: calc(100vh - 88rpx - 120rpx - env(safe-area-inset-top));
}
/* #endif */

/* ========== 记录容器 ========== */
.records-container {
  padding: 24rpx;
}

/* ========== 日期分组 ========== */
.date-group {
  margin-bottom: 32rpx;
}

.date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16rpx 0;
}

.date-label {
  font-size: 28rpx;
  font-weight: 900;
  color: #333;
}

.date-count {
  font-size: 22rpx;
  color: #999;
  font-weight: 500;
}

/* ========== 记录卡片 ========== */
.record-card {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 16rpx;
  padding: 24rpx;
  margin-bottom: 16rpx;
  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
}

.record-time {
  width: 100rpx;
  font-size: 24rpx;
  color: #999;
  font-weight: 500;
  flex-shrink: 0;
}

.record-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8rpx;
}

.record-title {
  font-size: 28rpx;
  font-weight: 700;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-detail {
  font-size: 22rpx;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-status {
  width: 48rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-icon {
  width: 40rpx;
  height: 40rpx;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20rpx;
  color: #ffffff;
  font-weight: bold;
}

.status-icon.success {
  background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
}

/* ========== 加载更多 ========== */
.load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32rpx;
  gap: 16rpx;
}

.load-more-text {
  font-size: 24rpx;
  color: #999;
}

.loading-dots {
  display: flex;
  gap: 8rpx;
}

.dot {
  width: 12rpx;
  height: 12rpx;
  border-radius: 50%;
  background: #e94560;
  animation: dotBounce 1.4s ease-in-out infinite;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotBounce {
  0%, 80%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.3);
    opacity: 1;
  }
}

/* ========== 没有更多 ========== */
.no-more {
  text-align: center;
  padding: 32rpx;
  font-size: 22rpx;
  color: #ccc;
}

/* ========== 空状态 ========== */
.empty-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120rpx 60rpx;
  gap: 24rpx;
}

.empty-icon {
  font-size: 120rpx;
}

.empty-text {
  font-size: 32rpx;
  color: #333;
  font-weight: 600;
}

.empty-tip {
  font-size: 24rpx;
  color: #999;
}

/* ========== 加载骨架屏 ========== */
.loading-section {
  padding: 24rpx;
}

.skeleton-group {
  margin-bottom: 32rpx;
}

.skeleton-header {
  padding: 16rpx 0;
}

.skeleton-date {
  width: 120rpx;
  height: 32rpx;
  background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 8rpx;
}

.skeleton-card {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 16rpx;
  padding: 24rpx;
  margin-bottom: 16rpx;
}

.skeleton-time {
  width: 80rpx;
  height: 24rpx;
  background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 6rpx;
  margin-right: 24rpx;
}

.skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12rpx;
}

.skeleton-line {
  height: 24rpx;
  background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 6rpx;
}

.skeleton-line.short {
  width: 60%;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== 底部安全区 ========== */
.safe-area-bottom {
  height: 40rpx;
  /* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || H5 || APP */
  height: constant(safe-area-inset-bottom);
  height: env(safe-area-inset-bottom);
  /* #endif */
}
