/**
 * 统计年鉴前台样式
 */

.yearbook-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.yearbook-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.yearbook-header h1 {
    margin: 0;
    color: #333;
    font-size: 2.2rem;
    font-weight: 700;
}

.yearbook-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.year-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.year-nav {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.year-nav:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.year-nav:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.year-dropdown {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    min-width: 100px;
    text-align: center;
}

.yearbook-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.yearbook-stats-table {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
}

.stats-table th,
.stats-table td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.stats-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.stats-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.stats-table tbody tr:hover {
    background-color: #e9ecef;
}

.stats-table tfoot th {
    background-color: #e9ecef;
    font-weight: 700;
    color: #212529;
}

.yearbook-charts {
    margin-top: 20px;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.yearbook-loading {
    text-align: center;
    padding: 40px 0;
    color: #6c757d;
}

.yearbook-loading .spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #09f;
    margin: 0 auto 15px;
    animation: spin 1s ease infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .yearbook-container {
        padding: 15px;
    }
    
    .yearbook-header h1 {
        font-size: 1.8rem;
    }
    
    .year-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-table {
        font-size: 12px;
    }
    
    .stats-table th,
    .stats-table td {
        padding: 8px 5px;
    }
    
    .chart-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .yearbook-container {
        padding: 10px;
    }
    
    .yearbook-header h1 {
        font-size: 1.5rem;
    }
    
    .stats-table {
        font-size: 11px;
    }
    
    .stats-table th,
    .stats-table td {
        padding: 6px 3px;
    }
    
    .chart-container {
        height: 250px;
    }
}