/* 基本样式 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

h1, h2, h3 {
    color: #333;
    text-align: center;
}

h1 {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-size: 28px;
}

/* 导航 */
.navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.back-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    margin: 0 10px;
    transition: background-color 0.3s;
}

.back-btn:hover {
    background-color: #2980b9;
}

/* 信息框 */
.info-box {
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.info-box p {
    margin: 0;
    line-height: 1.6;
}

/* 表单样式 */
.stats-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.date-selection {
    display: flex;
    gap: 15px;
    align-items: end;
}

.date-selection .form-group {
    flex-grow: 1;
}

.submit-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #27ae60;
}

/* 统计结果 */
.stats-results {
    margin-top: 30px;
}

.stats-header-title {
    margin-bottom: 20px;
}

.stats-header-title h2 {
    color: #3498db;
    font-size: 24px;
}

/* 表格样式 */
.stats-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
}

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

.stats-header {
    background-color: #3498db;
    color: white;
}

.group-row:nth-child(even) {
    background-color: #f2f2f2;
}

.group-row:hover {
    background-color: #e8f4f8;
}

.group-name {
    font-weight: bold;
    text-align: left;
}

.count-cell {
    color: #777;
}

.has-count {
    color: #2ecc71;
    font-weight: bold;
}

.group-total,
.member-total {
    background-color: #f2f2f2;
    font-weight: bold;
}

.totals-row {
    background-color: #f8f9fa;
}

.total-label {
    font-weight: bold;
    text-align: left;
}

.grand-total {
    background-color: #3498db;
    color: white;
    font-weight: bold;
}

/* 群组汇总 */
.group-summary {
    text-align: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
}

.group-summary-item {
    padding: 5px 10px;
}

.group-summary-total {
    font-weight: bold;
    color: #3498db;
}

.no-records {
    color: #e74c3c;
    font-style: italic;
}

/* 导出数据 */
.export-container {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.export-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #555;
    text-align: left;
}

.export-data {
    background-color: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    white-space: pre-wrap;
    font-family: monospace;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.copy-btn,
.export-link {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    margin-right: 10px;
    font-size: 14px;
}

.copy-btn:hover,
.export-link:hover {
    background-color: #2980b9;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .date-selection {
        flex-direction: column;
    }
    
    .stats-table th,
    .stats-table td {
        padding: 8px 5px;
        font-size: 14px;
    }
}

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

.stats-results {
    animation: fadeIn 0.5s ease-in-out;
}
