/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 标题区域 */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

.title {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    word-wrap: break-word;
    hyphens: auto;
}

.title i {
    color: #ff6b9d;
    animation: heartbeat 2s infinite;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
}

/* 心跳动画 */
@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 总览卡片 */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.person-card {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 活跃天数徽章样式 */
.activity-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--accent-color) 0%, rgba(255,255,255,0.2) 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    z-index: 10;
    animation: badgeFloat 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

/* 桌面端隐藏徽章 */
.activity-badge.mobile-badge {
    display: none;
}

.activity-badge.mobile-name-badge {
    display: none;
}

/* 桌面端活跃天数统计项样式 */
.desktop-active-days {
    display: flex;
}

.desktop-active-days i {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-right: 15px;
    opacity: 0.8;
}

/* 姓名容器 */
.person-name-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.person-name-container h2 {
    margin: 0;
}

/* 夸夸团容器样式 */
.praise-section {
    margin-top: 12px;
}

.praise-title {
    font-size: 0.7rem;
    color: #8B5A8C;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    opacity: 0.8;
}

/* 赞美气泡样式 - 消息气泡风格 */
.praise-bubble {
    position: relative;
    background: #FF6B9D;
    border-radius: 18px 18px 18px 4px;
    padding: 12px 16px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
    max-width: 280px;
    text-align: left;
    line-height: 1.4;
    margin: 0;
    border: none;
    animation: messageFloat 4s ease-in-out infinite;
    transition: all 0.3s ease;
    word-wrap: break-word;
    word-break: break-word;
}

.praise-bubble::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -8px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-right-color: #FF6B9D;
    border-bottom-color: #FF6B9D;
    transform: rotate(45deg);
}

.praise-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 107, 157, 0.5);
}

/* 赞美气泡图标 */
.praise-bubble .praise-icon {
    display: inline-block;
    margin-right: 6px;
    font-size: 1em;
    color: #FFE0E8;
    animation: heartbeat 2s ease-in-out infinite;
}

/* 消息气泡动画 */
@keyframes messageFloat {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-2px); 
    }
}

/* 桌面端姓名和赞美气泡容器 */
.name-praise-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

/* 桌面端赞美气泡位置调整 */
@media (min-width: 769px) {
    .praise-section {
        margin-top: 0;
        margin-left: 20px;
    }
    
    .praise-title {
        text-align: left;
        margin-bottom: 6px;
        font-size: 0.65rem;
    }
    
    .praise-bubble {
        margin: 0;
        flex-shrink: 0;
        border-radius: 18px 18px 4px 18px;
    }
    
    .praise-bubble::before {
        left: -8px;
        top: 20%;
        bottom: auto;
        transform: rotate(-45deg);
        border-right-color: transparent;
        border-bottom-color: transparent;
        border-left-color: #FF6B9D;
        border-top-color: #FF6B9D;
    }
}

/* 移动端赞美气泡样式 */
@media (max-width: 768px) {
    .name-praise-container {
        flex-direction: column;
        gap: 0;
    }
    
    .praise-section {
        margin-top: 15px;
        width: 100%;
    }
    
    .praise-title {
        font-size: 0.65rem;
        margin-bottom: 8px;
    }
    
    .praise-bubble {
        max-width: 100%;
        font-size: 0.8rem;
        padding: 12px 16px;
        border-radius: 18px 18px 18px 4px;
    }
    
    .praise-bubble::before {
        left: 20px;
        bottom: -8px;
        transform: rotate(45deg);
        border-left-color: transparent;
        border-top-color: transparent;
        border-right-color: #FF6B9D;
        border-bottom-color: #FF6B9D;
    }
}

/* 小屏幕手机端进一步优化 */
@media (max-width: 480px) {
    .praise-section {
        margin-top: 12px;
    }
    
    .praise-title {
        font-size: 0.6rem;
        margin-bottom: 6px;
    }
    
    .praise-bubble {
        font-size: 0.75rem;
        padding: 10px 14px;
        border-radius: 16px 16px 16px 4px;
    }
    
    .praise-bubble .praise-icon {
        font-size: 0.9rem;
        margin-right: 5px;
    }
    
    .name-praise-container {
        gap: 0;
    }
}

/* 移动端姓名下方徽章样式 */
.badge-compact {
    background: linear-gradient(135deg, var(--accent-color) 0%, rgba(255,255,255,0.2) 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
    display: inline-block;
}

.activity-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.badge-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.badge-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.badge-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.9);
    margin-top: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 徽章浮动动画 */
@keyframes badgeFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

.person-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color);
    opacity: 0.8;
}

.person-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.person-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.avatar {
    font-size: 3rem;
    margin-right: 20px;
    animation: bounce 2s infinite;
    flex-shrink: 0;
}

.person-header h2 {
    font-size: 1.8rem;
    color: var(--accent-color);
    font-weight: 600;
    word-wrap: break-word;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 总数据区域 */
.total-stats-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
    transition: all 0.3s ease;
    min-height: 80px;
    position: relative;
}

.stat-item:hover {
    background: rgba(255,255,255,0.9);
    transform: scale(1.05);
}

/* Total统计框的hover效果 */
.stat-item.total:hover {
    transform: scale(1.05) translateY(-2px);
    filter: brightness(1.1);
}

.stat-item.total.stat-duration:hover {
    box-shadow: 0 12px 35px rgba(79, 70, 229, 0.5);
}

.stat-item.total.stat-distance:hover {
    box-shadow: 0 12px 35px rgba(5, 150, 105, 0.5);
}

.stat-item.total.stat-calorie:hover {
    box-shadow: 0 12px 35px rgba(220, 38, 38, 0.5);
}

.stat-item.total.stat-days:hover {
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.5);
}

/* 基础total样式 */
.stat-item.total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 为不同类型的统计框设计不同的主题颜色 */
/* 总时间 - 蓝色主题 */
.stat-item.total.stat-duration {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.stat-item.total.stat-duration i {
    color: #ddd6fe !important;
}

.stat-item.total.stat-duration .stat-value {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-item.total.stat-duration .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* 总距离 - 绿色主题 */
.stat-item.total.stat-distance {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.stat-item.total.stat-distance i {
    color: #d1fae5 !important;
}

.stat-item.total.stat-distance .stat-value {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-item.total.stat-distance .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* 总卡路里 - 橙红色主题 */
.stat-item.total.stat-calorie {
    background: linear-gradient(135deg, #dc2626 0%, #f97316 100%);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.stat-item.total.stat-calorie i {
    color: #fed7c3 !important;
}

.stat-item.total.stat-calorie .stat-value {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-item.total.stat-calorie .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* 活跃天数 - 紫粉色主题 */
.stat-item.total.stat-days {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.stat-item.total.stat-days i {
    color: #f3e8ff !important;
}

.stat-item.total.stat-days .stat-value {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-item.total.stat-days .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

.stat-item i {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--accent-color);
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3436;
}

/* 数据单位样式 */
.unit {
    font-size: 0.75em;
    font-weight: 500;
    opacity: 0.85;
    margin-left: 2px;
    letter-spacing: 0.5px;
}

/* 不同统计框中单位的特殊颜色 */
.stat-item.total.stat-duration .unit,
.stat-item.total.stat-distance .unit,
.stat-item.total.stat-calorie .unit,
.stat-item.total.stat-days .unit {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 0.9rem;
    color: #636e72;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-increment {
    display: block;
    font-size: 0.75rem;
    color: #059669;
    font-weight: 600;
    margin-top: 3px;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid rgba(5, 150, 105, 0.2);
    animation: incrementPulse 2s ease-in-out infinite;
    width: fit-content;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.1);
    transition: all 0.3s ease;
    cursor: default;
}

.stat-increment:hover {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.15) 0%, rgba(5, 150, 105, 0.08) 100%);
    box-shadow: 0 3px 6px rgba(5, 150, 105, 0.15);
    transform: translateY(-1px);
}

/* 分类型数据区域 */
.category-stats-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.category-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s ease;
    border-left: 3px solid var(--accent-color);
    position: relative;
    overflow: hidden;
}

.category-item:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.category-item.empty {
    opacity: 0.6;
    border-left-color: #ccc;
}

.category-item.training {
    border-left-color: #7C3AED;
}

.category-item.running {
    border-left-color: #2563EB;
}

.category-item.hiking {
    border-left-color: #059669;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.category-header i {
    font-size: 1rem;
    opacity: 0.8;
}

.category-item.training .category-header i {
    color: #7C3AED;
}

.category-item.running .category-header i {
    color: #2563EB;
}

.category-item.hiking .category-header i {
    color: #059669;
}

.category-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.85rem;
}

.category-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-main {
    display: flex;
    align-items: baseline;
    gap: 3px;
    flex-wrap: nowrap;
    min-width: 0; /* 允许flex子项收缩 */
}

.stat-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
    flex-shrink: 0; /* 防止收缩 */
}

.stat-unit {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.stat-pace {
    font-size: 0.65rem;
    color: #6b7280;
    font-weight: 500;
    margin-left: 4px;
    padding: 1px 3px;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 1; /* 允许适度收缩 */
}

.stat-today {
    margin-top: 4px;
    padding: 4px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.today-text {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 3px;
}

.today-text::before {
    content: '●';
    color: var(--accent-color);
    font-size: 0.5rem;
}

.category-item.training .today-text::before {
    color: #7C3AED;
}

.category-item.running .today-text::before {
    color: #2563EB;
}

.category-item.hiking .today-text::before {
    color: #059669;
}

.today-pace {
    font-size: 0.65rem;
    color: #6b7280;
    font-weight: 500;
    margin-left: auto;
    padding: 1px 3px;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 3px;
}

/* 新的今日数据样式 */
.today-icon {
    font-size: 0.6rem;
    color: var(--accent-color);
    margin-right: 6px;
    animation: pulse 2s ease-in-out infinite;
}

.category-item.training .today-icon {
    color: #7C3AED;
}

.category-item.running .today-icon {
    color: #2563EB;
}

.category-item.hiking .today-icon {
    color: #059669;
}

.today-data {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.today-sub {
    font-size: 0.65rem;
    color: #9ca3af;
    font-weight: 500;
    background: rgba(156, 163, 175, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
    white-space: nowrap;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 数据对比效果 */
.category-item:not(.empty) .stat-today {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    border-radius: 6px;
    padding: 6px;
    margin-top: 6px;
    animation: fadeIn 0.5s ease-out;
}

.category-item.training .stat-today {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.03), rgba(124, 58, 237, 0.01));
}

.category-item.running .stat-today {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), rgba(37, 99, 235, 0.01));
}

.category-item.hiking .stat-today {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.03), rgba(5, 150, 105, 0.01));
}



/* 总数据增量的不同配色 */
.stat-increment.time {
    color: #7C3AED;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(124, 58, 237, 0.05) 100%);
    border-color: rgba(124, 58, 237, 0.2);
    box-shadow: 0 2px 4px rgba(124, 58, 237, 0.1);
}

.stat-increment.time:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(124, 58, 237, 0.08) 100%);
    box-shadow: 0 3px 6px rgba(124, 58, 237, 0.15);
}

.stat-increment.distance {
    color: #2563EB;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.stat-increment.distance:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.08) 100%);
    box-shadow: 0 3px 6px rgba(37, 99, 235, 0.15);
}

.stat-increment.calorie {
    color: #DC2626;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-color: rgba(220, 38, 38, 0.2);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
}

.stat-increment.calorie:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(220, 38, 38, 0.08) 100%);
    box-shadow: 0 3px 6px rgba(220, 38, 38, 0.15);
}

/* 右上角增量显示样式 */
.stat-increment-corner {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    z-index: 10;
    animation: incrementPulse 2s ease-in-out infinite;
    cursor: default;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 右上角增量不同类型配色 */
.stat-increment-corner.time {
    color: #FFF;
    background: #FFF1;
}

.stat-increment-corner.time:hover {
    background: #FFF0;
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(124, 58, 237, 0.2);
}

/* 最新运动记录样式 */
.latest-record-section {
    margin-top: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.latest-record-section:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.latest-record-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.85rem;
    opacity: 0.9;
}

.latest-record-header i {
    margin-right: 6px;
    font-size: 0.9rem;
}

.latest-record-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.record-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-size: 0.75rem;
    color: #444;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.record-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.02);
}

.record-label {
    color: rgba(0, 0, 0, 0.6);
    margin-right: 4px;
}

.record-value {
    color: #333;
    font-weight: 600;
}

.stat-increment-corner.distance {
    color: #FFF;
    background: #FFF1;
}

.stat-increment-corner.distance:hover {
    background: #FFF0;
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(37, 99, 235, 0.2);
}

.stat-increment-corner.calorie {
    color: #FFF;
    background: #FFF1;
}

.stat-increment-corner.calorie:hover {
    background: #FFF0;
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(220, 38, 38, 0.2);
}

/* 数据筛选按钮区域 */
.filter-button-section {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.filter-button {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
    transition: all 0.3s ease;
    position: relative;
    outline: none;
    min-width: 200px;
    justify-content: center;
}

.filter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(108, 92, 231, 0.4);
}

.filter-button:active {
    transform: translateY(0);
}

.filter-button i:first-child {
    font-size: 1.1rem;
}

.filter-button i:last-child {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.filter-button.active i:last-child {
    transform: rotate(180deg);
}

.filter-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(255,255,255,0.98);
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    margin-top: 10px;
    z-index: 1000;
    overflow: hidden;
    min-width: 220px;
    max-height: 300px;
    overflow-y: auto;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.filter-dropdown.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.filter-options {
    padding: 10px 0;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #2d3436;
    font-weight: 500;
}

.filter-option:hover {
    background: rgba(108, 92, 231, 0.1);
    color: #6c5ce7;
}

.filter-option.active {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
}

.filter-option.active:hover {
    background: linear-gradient(135deg, #5a52d5 0%, #9085fc 100%);
}

.filter-option i {
    font-size: 1rem;
    opacity: 0.8;
    min-width: 16px;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6c5ce7;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 15px;
}

.loading-indicator i {
    font-size: 1rem;
}

/* 图表区域 */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-container {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    min-height: 400px;
}

.chart-container h3 {
    margin-bottom: 20px;
    color: #2d3436;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.chart-container h3 i {
    margin-right: 10px;
    color: #6c5ce7;
}

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

/* 图表头部控件 */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    animation: fadeIn 0.6s ease-out;
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.data-type-switch select {
    padding: 8px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    background: white;
    color: #2d3436;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    min-width: 120px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4L2 0zM2 5L0 3h4L2 5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
}

.data-type-switch select:hover {
    border-color: #667eea;
}

.data-type-switch select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: #f8f9ff;
    animation: selectGlow 0.6s ease-out;
}

.data-type-switch select:active {
    background-color: #f0f2ff;
}

.view-mode-switch {
    display: flex;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 2px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.switch-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #636e72;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
    outline: none;
    min-width: 60px;
}

.switch-btn:hover {
    color: #2d3436;
    background: rgba(102, 126, 234, 0.1);
}

.switch-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    animation: buttonPulse 0.3s ease-out;
}

/* 每日详情 */
.daily-details {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* 记录表格 */
.records-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.records-table {
    width: 100%;
    min-width: 700px;
}

.records-table table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,0.9);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.records-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 12px;
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.records-table th i {
    margin-right: 5px;
    color: #fff;
}

.records-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 0.9rem;
}

.records-table tr:hover {
    background: rgba(103, 126, 234, 0.05);
}

.records-table .date-cell {
    background: rgba(103, 126, 234, 0.1);
    font-weight: 600;
    color: #4F46E5;
    vertical-align: middle;
    border-right: 2px solid rgba(103, 126, 234, 0.2);
}

.records-table .user-cell {
    font-weight: 600;
    background: rgba(255,255,255,0.8);
}

.records-table .user-cell-diff {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    background: rgba(0,0,0,0.02);
}

.records-table .value-cell {
    font-weight: 500;
    color: #2d3436;
}

.records-table .value-cell.total {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    font-weight: 600;
    color: #2d3436;
}

.records-table .diff-cell {
    background: rgba(0,0,0,0.02);
    font-size: 0.85rem;
}

.records-table .data-row {
    background: rgba(255,255,255,0.9);
}

.records-table .diff-row {
    background: rgba(0,0,0,0.02);
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

.records-table .diff-row:last-child {
    border-bottom: none;
}

.records-table .diff {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.records-table .diff.positive {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.records-table .diff.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.records-table .diff.neutral {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.daily-details h3 {
    margin-bottom: 25px;
    color: #2d3436;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.daily-details h3 i {
    margin-right: 10px;
    color: #00b894;
}

.daily-grid {
    display: grid;
    gap: 20px;
}

.daily-card {
    background: rgba(255,255,255,0.8);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.daily-card:hover {
    background: rgba(255,255,255,0.95);
    transform: translateX(5px);
}

.date {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 15px;
    text-align: center;
    padding: 8px;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    border-radius: 8px;
}

.daily-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.person-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.person-daily {
    padding: 15px;
    border-radius: 10px;
    background: rgba(255,255,255,0.6);
    border-left: 4px solid;
}

.person-name {
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3436;
    font-size: 1.1rem;
}

.daily-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.daily-stats span {
    font-size: 0.9rem;
    color: #636e72;
    padding: 2px 0;
    display: flex;
    align-items: center;
}

.daily-stats span i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    color: #6c5ce7;
    font-size: 0.85rem;
}

.daily-stats span.total {
    font-weight: 600;
    color: #2d3436;
    border-top: 1px solid rgba(99,110,114,0.2);
    padding-top: 8px;
    margin-top: 5px;
}

.daily-stats span.total i {
    color: #00b894;
}

/* 增量显示样式 */
.increment {
    font-size: 0.75rem;
    padding: 2px 4px;
    border-radius: 6px;
    margin-left: auto;
    font-weight: 600;
    display: inline-flex;
    width: 60px;
    min-width: 40px;
    height: 20px;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
    flex-shrink: 0;
}

.increment.positive {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.increment.negative {
    background: linear-gradient(135deg, #e17055, #d63031);
    color: white;
    box-shadow: 0 2px 8px rgba(214, 48, 49, 0.3);
}

.increment.neutral {
    background: linear-gradient(135deg, #b2bec3, #636e72);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 110, 114, 0.3);
}

.daily-stats span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    min-height: 28px;
}

.daily-stats span .stat-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.daily-stats span:last-child {
    border-bottom: none;
}

/* 动画效果 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes buttonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes selectGlow {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

@keyframes incrementPulse {
    0%, 100% { 
        opacity: 0.8;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.02);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

/* 简化版每日详情样式 */
.daily-card-compact {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.daily-card-compact:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.date-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(116, 75, 162, 0.2);
}

.person-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-around;
}

.person-compact {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.person-name-compact {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.stats-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.stat-item-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 8px 12px;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: 40px;
}

.stat-item-compact:hover {
    background: rgba(255,255,255,0.9);
    transform: scale(1.05);
}

.stat-item-compact.total {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    color: #2d3436;
    font-weight: 600;
}

.stat-item-compact i {
    font-size: 0.9rem;
    margin-right: 5px;
    opacity: 0.8;
}

.diff {
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 5px;
    padding: 2px 4px;
    border-radius: 4px;
    display: inline-block;
    min-width: 25px;
    text-align: center;
}

.diff.positive {
    background: #00b894;
    color: white;
}

.diff.negative {
    background: #e17055;
    color: white;
}

/* 响应式设计 - 平板横屏 */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .overview-cards {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 25px;
    }
    
    .charts-section {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 25px;
    }
    
    .person-card {
        padding: 25px;
    }
    
    .chart-container {
        padding: 25px;
        min-height: 350px;
    }
}

/* 响应式设计 - 平板竖屏 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .overview-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    /* 移动端筛选按钮样式 */
    .filter-button-section {
        margin-bottom: 20px;
    }
    
    .filter-button {
        font-size: 0.9rem;
        padding: 10px 20px;
        min-width: 180px;
        gap: 10px;
    }
    
    .filter-dropdown {
        min-width: 200px;
        max-width: 90vw;
        max-height: 250px;
    }
    
    .filter-option {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .loading-indicator {
        justify-content: center;
        font-size: 0.8rem;
        margin-top: 10px;
    }
    
    .person-card {
        padding: 20px;
    }
    
    .person-header h2 {
        font-size: 1.6rem;
    }
    
    .stats-grid {
        gap: 15px;
    }
    
    /* 最新运动记录移动端样式 */
    .latest-record-section {
        margin-top: 15px;
        padding: 12px;
    }
    
    .latest-record-content {
        gap: 6px;
    }
    
    .record-item {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
    
    .latest-record-header {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    
    .total-stats-section {
        padding: 12px;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .category-stats-section {
        padding: 12px;
    }
    
    .category-stats {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }
    
    .stat-main {
        flex: 1;
        min-width: 0;
    }
    
    .stat-today {
        flex: 0 0 auto;
        margin-top: 0;
        padding: 4px 8px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
        border-radius: 8px;
        border: none;
        border-top: none;
    }
    
    .stat-item {
        padding: 12px;
        min-height: 70px;
        position: relative;
    }

    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .unit {
        font-size: 0.7em;
        margin-left: 1px;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .category-item {
        padding: 10px;
    }
    
    .category-header {
        margin-bottom: 6px;
        padding-bottom: 4px;
    }
    
    .category-header i {
        font-size: 0.9rem;
    }
    
    .category-name {
        font-size: 0.75rem;
    }
    
    .stat-main {
        gap: 2px;
    }
    
    .stat-total {
        font-size: 1.2rem;
    }
    
    .stat-unit {
        font-size: 0.7rem;
    }
    
    .stat-pace {
        font-size: 0.65rem;
        margin-left: 4px;
        padding: 1px 3px;
    }
    
        .today-text {
        font-size: 0.65rem;
    }

    .today-pace {
        font-size: 0.6rem;
    }

    .today-icon {
        font-size: 0.55rem;
        margin-right: 4px;
    }

    .today-data {
        font-size: 0.75rem;
        gap: 4px;
        font-weight: 600;
    }

    .today-sub {
        font-size: 0.7rem;
        padding: 2px 4px;
        margin-left: 4px;
        font-weight: 500;
    }
    
    /* 移动端响应式控制 */
    .desktop-active-days {
        display: none;
    }
    
    .activity-badge.mobile-badge {
        display: block;
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .activity-badge.mobile-name-badge {
        display: none;
    }

    .badge-number {
        font-size: 1.2rem;
    }

    .badge-label {
        font-size: 0.65rem;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .chart-container {
        padding: 20px;
        min-height: 300px;
    }
    
        .chart-container h3 {
        font-size: 1.2rem;
    }

    .chart-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .chart-controls {
        width: 100%;
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .data-type-switch {
        flex: 1;
        min-width: 120px;
    }

    .data-type-switch select {
        width: 100%;
        padding: 8px 12px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .view-mode-switch {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .switch-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 50px;
    }

    .daily-details {
        padding: 20px;
    }
    
    .daily-comparison {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .daily-card {
        padding: 15px;
    }
    
    .person-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
    }
    
    .increment {
        font-size: 0.7rem;
        padding: 1px 3px;
        min-width: 36px;
        height: 18px;
        margin-left: auto;
    }
    
    /* 简化版每日详情 - 平板适配 */
    .daily-card-compact {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .person-row {
        gap: 12px;
    }
    
    .person-compact {
        min-width: 180px;
    }
    
    .stat-item-compact {
        padding: 6px 10px;
        font-size: 0.85rem;
        min-height: 35px;
    }
    
    .diff {
        font-size: 0.65rem;
        padding: 1px 3px;
        min-width: 20px;
    }
    
    /* 表格移动端样式 */
    .records-table-container {
        margin-top: 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .records-table {
        min-width: 600px;
    }
    
    .records-table th {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    .records-table td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    .records-table th i {
        margin-right: 3px;
    }
    
    .records-table .diff {
        font-size: 0.75rem;
        padding: 2px 4px;
    }
}

/* 响应式设计 - 大型手机 */
@media (max-width: 600px) {
    .header {
        margin-bottom: 30px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .overview-cards {
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .person-card {
        padding: 18px;
        border-radius: 15px;
    }
    
    .person-header {
        margin-bottom: 20px;
    }
    
    .person-header h2 {
        font-size: 1.4rem;
    }
    
    .avatar {
        font-size: 2.5rem;
        margin-right: 15px;
    }
    
    .stats-grid {
        gap: 12px;
    }
    
    .total-stats-section {
        padding: 10px;
    }
    
    .category-stats-section {
        padding: 10px;
    }
    
    .category-stats {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }
    
    .stat-main {
        flex: 1;
        min-width: 0;
    }
    
    .stat-today {
        flex: 0 0 auto;
        margin-top: 0;
        padding: 4px 8px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
        border-radius: 8px;
        border: none;
        border-top: none;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .stat-item {
        padding: 10px;
        min-height: 60px;
        position: relative;
    }

    .stat-item i {
        font-size: 1.3rem;
        margin-right: 12px;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .unit {
        font-size: 0.65em;
        margin-left: 1px;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .category-item {
        padding: 8px;
    }
    
    .category-header {
        margin-bottom: 5px;
        padding-bottom: 3px;
    }
    
    .category-header i {
        font-size: 0.85rem;
    }
    
    .category-name {
        font-size: 0.7rem;
    }
    
    .stat-main {
        gap: 1px;
    }
    
    .stat-total {
        font-size: 1rem;
    }
    
    .stat-unit {
        font-size: 0.65rem;
    }
    
    .stat-pace {
        font-size: 0.6rem;
        margin-left: 3px;
        padding: 1px 2px;
    }
    
    .today-text {
        font-size: 0.6rem;
    }
    
    .today-pace {
        font-size: 0.55rem;
    }

    .today-icon {
        font-size: 0.5rem;
        margin-right: 3px;
    }

    .today-data {
        font-size: 0.7rem;
        gap: 3px;
        font-weight: 600;
    }

    .today-sub {
        font-size: 0.65rem;
        padding: 2px 3px;
        margin-left: 3px;
        font-weight: 500;
    }
    
    .stat-today {
        padding: 4px 8px;
    }
    
    /* 600px小屏幕移动端徽章控制 */
    .activity-badge.mobile-badge {
        display: none;
    }
    
    .activity-badge.mobile-name-badge {
        display: block;
        position: relative;
        top: auto;
        right: auto;
        padding: 0;
        background: none;
        box-shadow: none;
        backdrop-filter: none;
        border: none;
        animation: none;
    }

    .badge-number {
        font-size: 1.1rem;
    }

    .badge-label {
        font-size: 0.6rem;
    }
    
    .charts-section {
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .chart-container {
        padding: 15px;
        min-height: 250px;
    }
    
        .chart-container h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .chart-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .chart-controls {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .data-type-switch {
        width: 100%;
        order: 1;
    }

    .data-type-switch select {
        width: 100%;
        padding: 10px 12px;
        font-size: 0.9rem;
        border-radius: 8px;
        text-align: center;
    }

    .view-mode-switch {
        width: 100%;
        order: 2;
        justify-content: center;
        padding: 3px;
    }

    .switch-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 0;
    }

    .daily-details {
        padding: 15px;
    }
    
    .daily-details h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .daily-grid {
        gap: 15px;
    }
    
    .daily-card {
        padding: 12px;
    }
    
    .person-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 10px;
    }
    
    .person-name {
        font-size: 1rem;
    }
    
    .daily-stats span {
        font-size: 0.85rem;
    }
    
    .daily-stats span i {
        margin-right: 6px;
        font-size: 0.8rem;
    }
    
    /* 简化版每日详情 - 大型手机适配 */
    .daily-card-compact {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .person-row {
        gap: 10px;
    }
    
    .person-compact {
        min-width: 150px;
    }
    
    .person-name-compact {
        font-size: 0.9rem;
    }
    
    .stat-item-compact {
        padding: 5px 8px;
        font-size: 0.8rem;
        min-height: 32px;
    }
    
    .stat-item-compact i {
        font-size: 0.8rem;
    }
    
    .diff {
        font-size: 0.6rem;
        padding: 1px 2px;
        min-width: 18px;
    }
}

/* 响应式设计 - 小型手机 */
@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    .header {
        margin-bottom: 25px;
    }
    
    .title {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .person-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .avatar {
        margin-right: 0;
        margin-bottom: 10px;
        font-size: 2.2rem;
    }
    
    .person-header h2 {
        font-size: 1.3rem;
    }
    
    .stats-grid {
        gap: 10px;
    }
    
    .total-stats-section {
        padding: 8px;
    }
    
    .category-stats-section {
        padding: 8px;
    }
    
    .category-stats {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
    }
    
    .stat-main {
        flex: 1;
        min-width: 0;
    }
    
    .stat-today {
        flex: 0 0 auto;
        margin-top: 0;
        padding: 3px 6px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
        border-radius: 6px;
        border: none;
        border-top: none;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .stat-item {
        padding: 12px;
        min-height: 55px;
        position: relative;
    }
    

    
    .stat-item i {
        font-size: 1.2rem;
        margin-right: 10px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .category-item {
        padding: 8px;
        border-radius: 8px;
    }
    
    .category-header {
        margin-bottom: 4px;
        padding-bottom: 2px;
    }
    
    .category-header i {
        font-size: 0.8rem;
    }
    
    .category-name {
        font-size: 0.75rem;
    }
    
    .stat-main {
        gap: 2px;
    }
    
    .stat-total {
        font-size: 1.1rem;
    }
    
    .stat-unit {
        font-size: 0.65rem;
    }
    
    .stat-pace {
        font-size: 0.6rem;
        margin-left: 3px;
        padding: 1px 2px;
    }
    
    .today-text {
        font-size: 0.6rem;
    }
    
    .today-pace {
        font-size: 0.55rem;
    }

    .today-icon {
        font-size: 0.45rem;
        margin-right: 2px;
    }

    .today-data {
        font-size: 0.65rem;
        gap: 3px;
        font-weight: 600;
    }

    .today-sub {
        font-size: 0.6rem;
        padding: 2px 3px;
        margin-left: 3px;
        font-weight: 500;
    }
    
    .stat-today {
        padding: 3px 6px;
    }
    
    /* 480px超小屏幕移动端徽章控制 */
    .activity-badge.mobile-badge {
        display: none;
    }
    
    .activity-badge.mobile-name-badge {
        display: block;
        position: relative;
        top: auto;
        right: auto;
        padding: 0;
        background: none;
        box-shadow: none;
        backdrop-filter: none;
        border: none;
        animation: none;
    }

    .badge-number {
        font-size: 1rem;
    }

    .badge-label {
        font-size: 0.55rem;
    }
    
    .chart-container {
        padding: 12px;
        min-height: 200px;
    }
    
        .chart-container h3 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .chart-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .chart-controls {
        width: 100%;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .data-type-switch {
        width: 100%;
        order: 1;
    }

    .data-type-switch select {
        width: 100%;
        padding: 12px 10px;
        font-size: 0.9rem;
        border-radius: 8px;
        text-align: center;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4L2 0zM2 5L0 3h4L2 5z"/></svg>');
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 12px;
        padding-right: 35px;
    }

    .view-mode-switch {
        width: 100%;
        order: 2;
        justify-content: center;
        padding: 3px;
    }

    .switch-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 0;
        border-radius: 18px;
    }

    .daily-details {
        padding: 12px;
    }
    
    .daily-details h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .daily-card {
        padding: 10px;
    }
    
    .person-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .date {
        font-size: 1rem;
        margin-bottom: 12px;
        padding: 6px;
    }
    
    .person-name {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }
    
    .daily-stats span {
        font-size: 0.8rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-height: 24px;
    }
    
    .daily-stats span .stat-content {
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .daily-stats span i {
        margin-right: 5px;
        font-size: 0.75rem;
    }
    
    .daily-stats span.total {
        padding-top: 6px;
        margin-top: 4px;
    }
    
    .increment {
        font-size: 0.65rem;
        padding: 1px 2px;
        min-width: 32px;
        height: 16px;
        margin-left: auto;
    }
    
    /* 简化版每日详情 - 小型手机适配 */
    .daily-card-compact {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .person-row {
        gap: 8px;
        flex-direction: column;
    }
    
    .person-compact {
        min-width: unset;
        max-width: unset;
    }
    
    .person-name-compact {
        font-size: 0.85rem;
    }
    
    .stat-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .stat-item-compact {
        padding: 4px 6px;
        font-size: 0.75rem;
        min-height: 28px;
    }
    
    .stat-item-compact i {
        font-size: 0.75rem;
    }
    
    .diff {
        font-size: 0.55rem;
        padding: 1px 2px;
        min-width: 16px;
    }
    
    /* 表格小屏幕样式 */
    .records-table-container {
        margin-top: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }
    
    .records-table {
        min-width: 550px;
    }
    
    .records-table th {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
    
    .records-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
    
    .records-table th i {
        margin-right: 2px;
        font-size: 0.7rem;
    }
    
    .records-table .diff {
        font-size: 0.7rem;
        padding: 1px 3px;
    }
    
    .records-table .date-cell {
        font-size: 0.75rem;
        padding: 8px 6px;
    }
    
    .records-table .user-cell {
        font-size: 0.75rem;
    }
    
    .records-table .user-cell-diff {
        font-size: 0.65rem;
    }
}

/* 响应式设计 - 超小屏幕 */
@media (max-width: 360px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 1.4rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .person-card {
        padding: 15px;
        border-radius: 12px;
    }
    
    .avatar {
        font-size: 2rem;
    }
    
    .person-header h2 {
        font-size: 1.2rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .unit {
        font-size: 0.6em;
        margin-left: 1px;
    }
    

    .category-today {
        margin-top: 3px;
        padding: 2px 3px;
        gap: 3px;
    }
    
    .today-label {
        font-size: 0.45rem;
        min-width: 14px;
    }
    
    .today-value {
        font-size: 0.5rem;
    }
    
    .today-pace {
        font-size: 0.45rem;
        padding: 1px 2px;
    }
    
    /* 360px设备徽章样式 */
    /* 360px极小屏幕移动端徽章控制 */
    .activity-badge.mobile-badge {
        display: none;
    }
    
    .activity-badge.mobile-name-badge {
        display: block;
        position: relative;
        top: auto;
        right: auto;
        padding: 0;
        background: none;
        box-shadow: none;
        backdrop-filter: none;
        border: none;
        animation: none;
    }

    .badge-number {
        font-size: 0.9rem;
    }

    .badge-label {
        font-size: 0.5rem;
    }
    
    .chart-container {
        padding: 10px;
        min-height: 180px;
    }
    
        .chart-container h3 {
        font-size: 0.95rem;
    }

    .chart-header {
        gap: 6px;
    }

    .chart-controls {
        gap: 6px;
    }

    .data-type-switch select {
        padding: 10px 8px;
        font-size: 0.85rem;
        padding-right: 30px;
        background-size: 10px;
        background-position: right 8px center;
    }

    .switch-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
        border-radius: 16px;
    }

    .daily-details {
        padding: 10px;
    }
    
    .daily-details h3 {
        font-size: 1.1rem;
    }
    
    .daily-stats span {
        min-height: 20px;
    }
    
    .daily-stats span i {
        margin-right: 4px;
        font-size: 0.7rem;
    }
    
    .daily-stats span .stat-content {
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .increment {
        font-size: 0.6rem;
        padding: 1px 2px;
        min-width: 28px;
        height: 14px;
        margin-left: auto;
    }
    
    /* 简化版每日详情 - 超小屏幕适配 */
    .daily-card-compact {
        padding: 8px;
        margin-bottom: 6px;
    }
    
    .date-header {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }
    
    .person-row {
        gap: 6px;
        flex-direction: column;
    }
    
    .person-name-compact {
        font-size: 0.8rem;
    }
    
    .stat-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .stat-item-compact {
        padding: 3px 5px;
        font-size: 0.7rem;
        min-height: 24px;
    }
    
    .stat-item-compact i {
        font-size: 0.7rem;
    }
    
    .diff {
        font-size: 0.5rem;
        padding: 1px 2px;
        min-width: 14px;
    }
    
    /* 表格超小屏幕样式 */
    .records-table-container {
        margin-top: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 6px;
    }
    
    .records-table {
        min-width: 500px;
    }
    
    .records-table th {
        padding: 6px 4px;
        font-size: 0.7rem;
    }
    
    .records-table td {
        padding: 6px 4px;
        font-size: 0.7rem;
    }
    
    .records-table th i {
        margin-right: 1px;
        font-size: 0.65rem;
    }
    
    .records-table .diff {
        font-size: 0.65rem;
        padding: 1px 2px;
    }
    
    .records-table .date-cell {
        font-size: 0.7rem;
        padding: 6px 4px;
    }
    
    .records-table .user-cell {
        font-size: 0.7rem;
    }
    
    .records-table .user-cell-diff {
        font-size: 0.65rem;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .person-card:hover,
    .stat-item:hover,
    .daily-card:hover {
        transform: none;
    }
    
    .stat-item,
    .person-card,
    .daily-card {
        transition: background-color 0.3s ease;
    }
    
    .stat-item:active {
        background: rgba(255,255,255,0.9);
    }
    
    .person-card:active {
        background: rgba(255,255,255,1);
    }
    
    .daily-card:active {
        background: rgba(255,255,255,0.95);
    }
    
    .daily-card-compact:active {
        background: rgba(255,255,255,0.98);
    }
    
    .stat-item-compact:active {
        background: rgba(255,255,255,0.9);
    }
    
    /* 图表控件触摸优化 */
    .switch-btn:hover {
        background: rgba(102, 126, 234, 0.1);
    }
    
    .switch-btn:active {
        background: rgba(102, 126, 234, 0.2);
        transform: scale(0.98);
    }
    
    .switch-btn.active:active {
        background: rgba(102, 126, 234, 0.8);
        transform: scale(0.98);
    }
    
    .data-type-switch select:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
        background-color: #f8f9ff;
    }
    
    .data-type-switch select:active {
        background-color: #f0f2ff;
        transform: scale(0.98);
    }
    
    /* 增强移动端可操作性 */
    .chart-controls {
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
    
    .switch-btn {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }
    
    .data-type-switch select {
        -webkit-tap-highlight-color: transparent;
    }
} 