/* 微信群年度报告样式 - Bilibili 风格 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00a1d6;
    --secondary-color: #fb7299;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --text-primary: #333;
    --text-secondary: #666;
    --bg-light: #f5f5f5;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 页面容器 */
.page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
    scroll-snap-align: start;
}

.page-content {
    max-width: 1200px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 封面页 */
.cover-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
}

.cover-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

.cover-content {
    text-align: center;
    color: white;
    z-index: 1;
    position: relative;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cover-title {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 1s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cover-subtitle {
    font-size: 2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: slideDown 1s ease-out 0.2s both;
}

.cover-number {
    margin: 60px 0;
    animation: scaleIn 1s ease-out 0.4s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.big-number {
    font-size: 8rem;
    font-weight: bold;
    display: block;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.number-label {
    font-size: 1.5rem;
    display: block;
    margin-top: 10px;
    opacity: 0.9;
}

.cover-date {
    font-size: 1.2rem;
    margin-top: 40px;
    opacity: 0.8;
}

.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* 页面标题 */
.page-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* 图表容器 */
.chart-section {
    margin: 40px 0;
}

.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chart-note {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 10px;
    font-size: 0.9rem;
}

/* 高亮框 */
.highlight-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.highlight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.highlight-item:last-child {
    border-bottom: none;
}

.highlight-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.highlight-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* 排行榜 */
.ranking-list {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: var(--bg-light);
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ranking-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    width: 50px;
    text-align: center;
}

.ranking-name {
    flex: 1;
    font-size: 1.1rem;
    margin-left: 20px;
}

.ranking-count {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* 关键词容器 */
.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

.keyword-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.keyword-tag:hover {
    transform: scale(1.1);
}

.keyword-tag.large {
    font-size: 1.3rem;
    padding: 15px 25px;
}

.keyword-tag.medium {
    font-size: 1.1rem;
    padding: 12px 22px;
}

/* 日期范围 */
.date-range {
    text-align: center;
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* 结尾页 */
.ending-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ending-page .page-content {
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.ending-content {
    text-align: center;
    color: white;
}

.ending-title {
    font-size: 3rem;
    margin-bottom: 30px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.ending-text {
    font-size: 1.5rem;
    margin: 20px 0;
    opacity: 0.9;
}

.ending-date {
    margin-top: 60px;
    font-size: 1rem;
    opacity: 0.7;
}

/* 导出按钮 */
.export-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1000;
}

.export-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 有趣统计卡片 */
.fun-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.fun-fact-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fun-fact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.fun-fact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.fun-fact-card:hover::before {
    transform: scaleX(1);
}

.fun-fact-card.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
}

.fun-fact-card.highlight .fun-fact-title,
.fun-fact-card.highlight .fun-fact-name,
.fun-fact-card.highlight .fun-fact-value,
.fun-fact-card.highlight .fun-fact-note {
    color: white;
}

.fun-fact-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.fun-fact-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.fun-fact-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 15px 0;
}

.fun-fact-value {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 10px;
}

.fun-fact-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cover-title {
        font-size: 2.5rem;
    }
    
    .cover-subtitle {
        font-size: 1.5rem;
    }
    
    .big-number {
        font-size: 5rem;
    }
    
    .page-content {
        padding: 40px 20px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .fun-facts-grid {
        grid-template-columns: 1fr;
    }
    
    .fun-fact-icon {
        font-size: 2.5rem;
    }
    
    .fun-fact-name {
        font-size: 1.3rem;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

/* 打印样式 */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    body {
        background: white !important;
        margin: 0;
        padding: 0;
    }
    
    .page {
        page-break-after: always;
        page-break-inside: avoid;
        min-height: 100vh;
        height: 100vh;
        padding: 20px;
        margin: 0;
        display: block;
    }
    
    .page-content {
        background: white !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .cover-page {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .ending-page {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .ending-page .page-content {
        background: transparent !important;
    }
    
    .export-button {
        display: none !important;
    }
    
    .scroll-hint {
        display: none !important;
    }
    
    .chart-container {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .fun-facts-grid,
    .stats-grid {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    @page {
        size: A4 landscape;
        margin: 0;
    }
}

