* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 学生查询页样式 */
.query-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.query-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

.query-box h1 {
    color: #333;
    margin-bottom: 10px;
}

.query-box .subtitle {
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.query-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s;
}

.query-btn:hover {
    transform: translateY(-2px);
}

.notice {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #999;
}

/* 成绩展示页样式 */
.result-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.result-header {
    background: white;
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.student-info h2 {
    color: #667eea;
    margin-bottom: 5px;
}

.student-info p {
    color: #666;
}

.back-btn {
    background: #f0f0f0;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #e0e0e0;
}

.exam-selector {
    background: white;
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.exam-selector select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.score-table-wrapper,
.chart-row,
.subject-chart-panel,
.overview-table-wrapper {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.score-table {
    width: 100%;
    border-collapse: collapse;
}

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

.score-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.score-value {
    font-weight: bold;
    color: #667eea;
}

.total-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.total-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-around;
    font-size: 18px;
}

.total-card strong {
    font-size: 24px;
    margin-left: 10px;
}

.chart-row {
    display: flex;
    gap: 20px;
}

.chart-box {
    flex: 1;
}

.chart-box canvas {
    width: 100%;
    max-height: 300px;
}

.chart-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.chart-controls select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.overview-table {
    width: 100%;
    border-collapse: collapse;
}

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

.overview-table th {
    background: #f8f9fa;
}

.mini-sparkline,
.mini-rankline {
    vertical-align: middle;
}

.trend-up {
    color: #4CAF50;
    font-weight: bold;
}

.trend-down {
    color: #f44336;
    font-weight: bold;
}

.trend-stable {
    color: #ff9800;
}

/* 管理员样式 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: #2c3e50;
    color: white;
    padding: 20px 0;
}

.admin-sidebar h2 {
    padding: 0 20px 20px;
    border-bottom: 1px solid #34495e;
    margin-bottom: 20px;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar ul li a {
    display: block;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background 0.3s;
}

.admin-sidebar ul li a:hover,
.admin-sidebar ul li a.active {
    background: #34495e;
}

.admin-main {
    flex: 1;
    background: #f5f6fa;
    padding: 20px;
}

.admin-header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-card h3 {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-card p {
    color: #666;
}

.quick-links {
    background: white;
    padding: 20px;
    border-radius: 12px;
}

.quick-links h3 {
    margin-bottom: 15px;
}

.quick-btn {
    display: inline-block;
    padding: 10px 20px;
    margin-right: 10px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
}

.quick-btn:hover {
    background: #5a67d8;
}

.data-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

.btn-warning {
    background: #f39c12;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.error-msg {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}
/* 新增样式 */
.form-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-panel h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.checkbox-group {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.checkbox-group label {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 10px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    min-width: 300px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.filter-form {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.btn-warning {
    background: #f39c12;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.data-table td input,
.data-table td select {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
@media (max-width: 768px) {
    .chart-row {
        flex-direction: column;
    }
    .result-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}