/* 快手平台数据报告区块样式 */
:root {
    --ks-data-primary: #FF3131;
    --ks-data-primary-light: #FF6262;
    --ks-data-primary-dark: #E52020;
    --ks-data-secondary: #00C6FF;
    --ks-data-tertiary: #FFA23A;
    --ks-data-quaternary: #4CD964;
    --ks-data-quinary: #9B59B6;
    --ks-data-bg: #F8F9FA;
    --ks-data-card-bg: #FFFFFF;
    --ks-data-text: #333333;
    --ks-data-text-light: #666666;
    --ks-data-text-lighter: #999999;
    --ks-data-border: #E5E5E5;
    --ks-data-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --ks-data-gradient-primary: linear-gradient(45deg, var(--ks-data-primary-dark), var(--ks-data-primary));
    --ks-data-gradient-secondary: linear-gradient(45deg, var(--ks-data-secondary), #5EE7FF);
    --ks-data-gradient-tertiary: linear-gradient(45deg, var(--ks-data-tertiary), #FFCD69);
    --ks-data-gradient-quaternary: linear-gradient(45deg, var(--ks-data-quaternary), #8EE997);
    --ks-data-gradient-quinary: linear-gradient(45deg, var(--ks-data-quinary), #C78CDF);
}

.ks-data-section {
    position: relative;
    padding: 100px 0;
    background-color: var(--ks-data-bg);
    overflow: hidden;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 背景元素 */
.ks-data-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.5;
}

.ks-data-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    animation: float 15s infinite ease-in-out;
}

.shape1 {
    top: 10%;
    left: 5%;
    width: 400px;
    height: 400px;
    background: var(--ks-data-primary);
    animation-delay: 0s;
}

.shape2 {
    bottom: 15%;
    right: 10%;
    width: 350px;
    height: 350px;
    background: var(--ks-data-secondary);
    animation-delay: -5s;
}

.shape3 {
    top: 60%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: var(--ks-data-tertiary);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

/* 标题区域 */
.ks-data-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 60px;
}

.ks-data-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--ks-data-gradient-primary);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(255, 49, 49, 0.25);
    animation: fadeInUp 0.8s forwards;
}

.ks-data-title {
    position: relative;
    font-size: 42px;
    font-weight: 800;
    color: var(--ks-data-text);
    margin-bottom: 16px;
    background: var(--ks-data-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s 0.2s both;
}

.ks-data-subtitle {
    font-size: 18px;
    color: var(--ks-data-text-light);
    margin-bottom: 20px;
    animation: fadeInUp 0.8s 0.4s both;
}

.ks-data-date {
    font-weight: 600;
    color: var(--ks-data-primary);
}

.ks-data-underline {
    display: block;
    width: 80px;
    height: 4px;
    background: var(--ks-data-gradient-primary);
    margin: 0 auto;
    border-radius: 2px;
    animation: expandWidth 1.2s ease-out forwards;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 80px; }
}

/* 数据状态栏 */
.ks-data-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--ks-data-shadow);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s 0.6s both;
}

.ks-data-refresh {
    display: flex;
    align-items: center;
}

.refresh-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    fill: var(--ks-data-primary);
    animation: rotate 2s infinite linear;
}

.refresh-text {
    font-size: 14px;
    color: var(--ks-data-text-light);
    font-weight: 500;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ks-data-accuracy {
    display: flex;
    align-items: center;
}

.accuracy-text {
    font-size: 14px;
    color: var(--ks-data-text-light);
    margin-right: 10px;
}

.accuracy-bar {
    width: 150px;
    height: 8px;
    background-color: #EAEAEA;
    border-radius: 4px;
    overflow: hidden;
}

.accuracy-fill {
    height: 100%;
    background: var(--ks-data-gradient-primary);
    border-radius: 4px;
    position: relative;
    animation: fillBar 1.5s ease-out forwards;
}

.accuracy-fill span {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: white;
    font-weight: 600;
}

@keyframes fillBar {
    from { width: 0; }
    to { width: 99.8%; }
}

/* 数据概览区域 */
.ks-data-overview {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.ks-data-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.ks-data-card {
    flex: 1 1 100%;
    min-width: 250px;
    background-color: var(--ks-data-card-bg);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--ks-data-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s calc(0.8s + var(--index, 0) * 0.1s) both;
}

.ks-data-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.ks-data-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--card-gradient, var(--ks-data-gradient-primary));
}

.growth-card::before {
    --card-gradient: var(--ks-data-gradient-primary);
}

.engagement-card::before {
    --card-gradient: var(--ks-data-gradient-secondary);
}

.content-card::before {
    --card-gradient: var(--ks-data-gradient-tertiary);
}

.conversion-card::before {
    --card-gradient: var(--ks-data-gradient-quaternary);
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin-bottom: 20px;
    background: var(--icon-bg, #FFF0F0);
}

.growth-card .card-icon {
    --icon-bg: #FFF0F0;
}

.engagement-card .card-icon {
    --icon-bg: #E6F8FF;
}

.content-card .card-icon {
    --icon-bg: #FFF8EC;
}

.conversion-card .card-icon {
    --icon-bg: #ECFFF0;
}

.card-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--icon-color, var(--ks-data-primary));
}

.growth-card .card-icon svg {
    --icon-color: var(--ks-data-primary);
}

.engagement-card .card-icon svg {
    --icon-color: var(--ks-data-secondary);
}

.content-card .card-icon svg {
    --icon-color: var(--ks-data-tertiary);
}

.conversion-card .card-icon svg {
    --icon-color: var(--ks-data-quaternary);
}

.card-content {
    display: flex;
    flex-direction: column;
}

.card-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--ks-data-text);
    margin-bottom: 8px;
}

.card-label {
    font-size: 14px;
    color: var(--ks-data-text-light);
    margin-bottom: 15px;
}

.card-trend {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
}

.card-trend.up {
    color: #4CD964;
}

.card-trend.down {
    color: var(--ks-data-primary);
}

.trend-icon {
    margin-right: 5px;
}

/* 数据趋势区域 */
.ks-data-trends {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
    animation: fadeIn 1s 1s both;
}

.ks-data-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
}

.ks-data-tab {
    background: none;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ks-data-text-light);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    outline: none;
}

.ks-data-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--ks-data-gradient-primary);
    transition: width 0.3s ease;
    border-radius: 1.5px;
}

.ks-data-tab:hover {
    color: var(--ks-data-primary);
}

.ks-data-tab.active {
    color: var(--ks-data-primary);
}

.ks-data-tab.active::after {
    width: 80%;
}

.ks-data-panels {
    background-color: var(--ks-data-card-bg);
    border-radius: 20px;
    box-shadow: var(--ks-data-shadow);
    overflow: hidden;
}

.ks-data-panel {
    display: none;
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.ks-data-panel.active {
    display: block;
    width: 100%;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--ks-data-border);
}

.panel-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--ks-data-text);
    margin: 0;
}

.panel-period, .panel-filters {
    display: flex;
    gap: 8px;
}

.period-btn, .filter-btn {
    background: none;
    border: 1px solid var(--ks-data-border);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--ks-data-text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-btn:hover, .filter-btn:hover {
    border-color: var(--ks-data-primary);
    color: var(--ks-data-primary);
}

.period-btn.active, .filter-btn.active {
    background: var(--ks-data-gradient-primary);
    border-color: transparent;
    color: white;
}

.panel-body {
    width: 100%;
}

/* 数据图表容器 */
.data-chart-container {
    width: 100%;
    height: 400px;
    position: relative;
    margin-bottom: 30px;
}

/* 数据亮点卡片 */
.data-highlights {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.highlight-card {
    flex: 1 1 calc(33.333% - 20px);
    min-width: 220px;
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #F8F9FA;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.highlight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.highlight-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ks-data-gradient-primary);
    margin-right: 15px;
    box-shadow: 0 5px 15px rgba(255, 49, 49, 0.2);
}

.highlight-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.highlight-content {
    flex: 1;
}

.highlight-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--ks-data-text);
    margin-bottom: 5px;
}

.highlight-label {
    font-size: 14px;
    color: var(--ks-data-text-light);
}

/* 内容分类统计 */
.data-category-stats {
    margin-top: 40px;
}

.stats-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ks-data-text);
    margin-bottom: 20px;
}

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

.category-bar-group {
    display: flex;
    align-items: center;
}

.category-label {
    width: 100px;
    font-size: 14px;
    color: var(--ks-data-text-light);
    margin-right: 15px;
}

.category-bar-bg {
    flex-grow: 1;
    height: 12px;
    background-color: #EAEAEA;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.category-bar-fill {
    height: 100%;
    background: var(--ks-data-gradient-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    animation: growWidth 1.5s ease-out forwards;
    animation-delay: calc(var(--index, 0) * 0.2s);
}

.category-bar-fill:nth-child(1) {
    --index: 1;
}

.category-bar-fill:nth-child(2) {
    --index: 2;
}

.category-bar-fill:nth-child(3) {
    --index: 3;
}

.category-bar-fill:nth-child(4) {
    --index: 4;
}

.category-bar-fill:nth-child(5) {
    --index: 5;
}

.category-value {
    position: absolute;
    right: 10px;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

@keyframes growWidth {
    from { width: 0; }
    to { width: var(--final-width, 100%); }
}

/* 商业指标圆环图表 */
.commercial-metrics {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.metric-group {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.metric-circle {
    text-align: center;
}

.circle-progress {
    width: 160px;
    height: 160px;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: #EAEAEA;
    stroke-width: 12;
}

.circle-fill {
    fill: none;
    stroke: #FF3131;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 440;
    transition: stroke-dashoffset 1.5s ease-out;
}

.circle-text {
    fill: #333333;
    font-size: 24px;
    font-weight: 700;
    transform: rotate(90deg);
    text-anchor: middle;
    dominant-baseline: middle;
}

.metric-circle-label {
    margin-top: 15px;
    font-size: 14px;
    color: var(--ks-data-text-light);
}

@keyframes fillCircle {
    from { stroke-dashoffset: 440; }
    to { stroke-dashoffset: var(--final-offset, 0); }
}

.roi-analysis {
    margin-top: 20px;
}

.roi-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ks-data-text);
    margin-bottom: 20px;
}

.roi-container {
    width: 100%;
    height: 300px;
}

/* 地域分布区域 */
.map-container {
    width: 100%;
    height: 400px;
    margin-bottom: 30px;
}

.china-map {
    width: 100%;
    height: 100%;
    background-color: #F8F9FA;
    border-radius: 10px;
}

.region-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.region-distribution {
    flex: 1;
    min-width: 300px;
}

.distribution-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ks-data-text);
    margin-bottom: 20px;
}

.pie-chart-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.region-highlights {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.region-highlight-card {
    flex: 1 1 calc(33.333% - 20px);
    min-width: 180px;
    padding: 20px;
    background-color: #F8F9FA;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.region-highlight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.region-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--ks-data-text);
    margin-bottom: 5px;
}

.region-label {
    font-size: 14px;
    color: var(--ks-data-text-light);
    margin-bottom: 10px;
}

.region-trend {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
}

.region-trend.up {
    color: #4CD964;
}

.region-trend.down {
    color: var(--ks-data-primary);
}

/* 数据洞察区域 */
.ks-data-insights {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
    animation: fadeIn 1s 1.2s both;
}

.insights-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--ks-data-text);
    margin-bottom: 40px;
}

.insights-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.insight-card {
    position: relative;
    background-color: var(--ks-data-card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--ks-data-shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
}

.insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.insight-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--insight-bg, var(--ks-data-gradient-primary));
    margin-right: 20px;
    flex-shrink: 0;
}

.insight-card:nth-child(1) .insight-icon {
    --insight-bg: var(--ks-data-gradient-primary);
}

.insight-card:nth-child(2) .insight-icon {
    --insight-bg: var(--ks-data-gradient-tertiary);
}

.insight-card:nth-child(3) .insight-icon {
    --insight-bg: var(--ks-data-gradient-quaternary);
}

.insight-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.insight-content {
    flex: 1;
}

.insight-heading {
    font-size: 18px;
    font-weight: 600;
    color: var(--ks-data-text);
    margin-bottom: 12px;
}

.insight-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ks-data-text-light);
}

/* 数据报告CTA */
.ks-data-cta {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    animation: fadeIn 1s 1.4s both;
}

.data-report-btn {
    background: var(--ks-data-gradient-primary);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 49, 49, 0.25);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.data-report-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 49, 49, 0.3);
}

.data-report-info {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--ks-data-text-light);
}

.data-report-info svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    fill: var(--ks-data-text-lighter);
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 响应式设计 */
@media (max-width: 1200px) {
    .ks-data-card {
        flex: 1 1 calc(50% - 20px);
    }
}

@media (max-width: 992px) {
    .ks-data-title {
        font-size: 36px;
    }
    
    .ks-data-status {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .highlight-card {
        flex: 1 1 calc(50% - 20px);
    }
    
    .region-distribution {
        flex: 1 1 100%;
    }
    
    .region-highlight-card {
        flex: 1 1 calc(50% - 20px);
    }
    
    .insights-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ks-data-section {
        padding: 60px 0;
    }
    
    .ks-data-title {
        font-size: 32px;
    }
    
    .ks-data-subtitle {
        font-size: 16px;
    }
    
    .ks-data-tabs {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px;
    }
    
    .ks-data-tab {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .highlight-card {
        flex: 1 1 100%;
    }
    
    .region-highlight-card {
        flex: 1 1 100%;
    }
}

@media (max-width: 576px) {
    .ks-data-section {
        padding: 40px 0;
    }
    
    .ks-data-title {
        font-size: 28px;
    }
    
    .ks-data-card {
        flex: 1 1 100%;
    }
    
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .data-chart-container {
        height: 300px;
    }
    
    .insight-card {
        flex-direction: column;
    }
    
    .insight-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

canvas#userGrowthChart,
canvas#contentTrendChart,
canvas#roiChart,
canvas#regionPieChart {
    width: 100% !important;
    height: 100% !important;
} 