/* Keep运动数据样式 - 现代简约设计 */
:root {
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-color: #4CAF50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #bdc3c7;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* 热力图颜色 */
    --heatmap-low: #e8f5e8;
    --heatmap-medium: #a4d65e;
    --heatmap-high: #40a9ff;
    --heatmap-intense: #faad14;
    --heatmap-extreme: #ff4d4f;
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e0;
        --text-light: #a0aec0;
        --bg-primary: #1a202c;
        --bg-secondary: #2d3748;
        --bg-card: #2d3748;
        --border-color: #4a5568;

        /* 深色模式热力图颜色 */
        --heatmap-low: #1f3a1f;
        --heatmap-medium: #2d4a2d;
        --heatmap-high: #3d5a3d;
        --heatmap-intense: #4a6b4a;
        --heatmap-extreme: #5a7c5a;
    }
}

/* 容器和布局 */
.keep-sports-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    /*background: var(--bg-secondary);*/
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.keep-sports-container h1,
.keep-sports-container h2 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
}

.keep-sports-container h3 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* 雷达图卡片 - 统一样式 */
.radar-summary-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    /*box-shadow: var(--shadow-lg);*/
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    min-height: 300px;
}

/*.radar-summary-card:hover {*/
/*    transform: translateY(-4px);*/
/*    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);*/
/*}*/

.radar-chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.radar-chart {
    width: 220px;
    height: 220px;
    position: relative;
}

.summary-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.summary-data-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

/*.summary-data-item:hover {*/
/*    transform: translateY(-2px);*/
/*    box-shadow: var(--shadow-md);*/
/*}*/

.summary-data-item .number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1;
    min-height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-data-item .label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 热力图 - 统一样式 */
.heatmap-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    /*box-shadow: var(--shadow-lg);*/
    border: 1px solid var(--border-color);
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    gap: 3px;
    margin-top: 1rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.heatmap-cell {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border-color);
}

/*.heatmap-cell:hover {*/
/*    transform: scale(1.1);*/
/*    z-index: 10;*/
/*    box-shadow: var(--shadow-md);*/
/*}*/

.heatmap-cell.empty {
    background: var(--bg-secondary);
    color: var(--text-light);
}

.heatmap-cell.level-1 {
    background: var(--heatmap-low);
    color: #2d5016;
}

.heatmap-cell.level-2 {
    background: var(--heatmap-medium);
    color: #ffffff;
}

.heatmap-cell.level-3 {
    background: var(--heatmap-high);
    color: #ffffff;
}

.heatmap-cell.level-4 {
    background: var(--heatmap-intense);
    color: #ffffff;
}

.heatmap-cell.level-5 {
    background: var(--heatmap-extreme);
    color: #ffffff;
}

.heatmap-tooltip {
    position: absolute;
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
    transform: translateX(-50%);
    bottom: 120%;
    left: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.heatmap-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: var(--text-primary);
}

.heatmap-cell:hover .heatmap-tooltip {
    opacity: 1;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

/* 运动强度分析保持原样 */
.chart-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    /*box-shadow: var(--shadow-lg);*/
    border: 1px solid var(--border-color);
}

/* 图表标题样式 */
.chart-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.3rem;
}

.chart-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.progress-section, .intensity-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.progress-item, .intensity-item {
    margin-bottom: 1.5rem;
}

.progress-bar, .intensity-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 1s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .keep-sports-container {
        padding: 1rem;
    }

    .radar-summary-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .summary-data-grid {
        grid-template-columns: 1fr 1fr;
    }

    .heatmap-grid {
        max-width: 448px;
        grid-template-columns: repeat(8, 1fr);
    }

    .heatmap-cell {
        width: 32px;
        height: 32px;
        font-size: 0.6rem;
    }

}

@media (max-width: 480px) {
    .summary-data-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .heatmap-cell {
        width: 28px;
        height: 28px;
        font-size: 0.55rem;
    }
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 脉冲动画 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 图表渐变定义 */
.chart-gradients {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}