* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #4CAF50;
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 5px 5px 0 0;
    margin-bottom: 20px;
}

nav {
    background-color: #333;
    overflow: hidden;
    border-radius: 5px;
    margin-bottom: 20px;
}

nav a {
    float: left;
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: #4CAF50;
}

nav a.active {
    background-color: #4CAF50;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.control-panel {
    flex: 1;
    min-width: 300px;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.student-list {
    flex: 2;
    min-width: 300px;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #45a049;
}

.btn-large {
    font-size: 20px;
    padding: 15px 30px;
}

.btn-secondary {
    background-color: #f44336;
}

.btn-secondary:hover {
    background-color: #d32f2f;
}

.btn-tertiary {
    background-color: #2196F3;
}

.btn-tertiary:hover {
    background-color: #0b7dda;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

.highlighted {
    background-color: #e7f3e8 !important;
    font-weight: bold;
}

.status-present {
    color: #4CAF50;
}

.status-late {
    color: #FF9800;
}

.status-absent {
    color: #f44336;
}

.student-card {
    text-align: center;
    padding: 20px;
    background-color: #e7f3e8;
    border-radius: 5px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.student-card h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.student-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 10px auto;
    display: block;
    background-color: #ddd;
    line-height: 150px;
    font-size: 60px;
    color: #666;
}

.status-buttons {
    margin: 20px 0;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    background-color: #333;
    color: white;
    border-radius: 0 0 5px 5px;
}

.import-export {
    margin-top: 20px;
}

/* 班级管理样式 */
.class-form,
.student-form {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.form-buttons {
    display: flex;
    justify-content: space-between;
}

.class-actions,
.batch-actions {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.class-list,
.student-management-list {
    flex: 2;
    min-width: 300px;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-bar {
    margin-bottom: 15px;
}

.search-bar input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* 操作按钮样式 */
.action-btn {
    padding: 5px 10px;
    margin: 0 2px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.edit-btn {
    background-color: #2196F3;
    color: white;
}

.edit-btn:hover {
    background-color: #0b7dda;
}

.delete-btn {
    background-color: #f44336;
    color: white;
}

.delete-btn:hover {
    background-color: #d32f2f;
}

.switch-btn {
    background-color: #4CAF50;
    color: white;
}

.switch-btn:hover {
    background-color: #45a049;
}

.import-export {
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

input[type="file"] {
    margin: 10px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    nav a {
        float: none;
        width: 100%;
        text-align: left;
    }
    
    .btn-large {
        width: 100%;
    }
}

.photo-preview {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.photo-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.photo-preview img:hover {
    transform: scale(1.05);
    border-color: #4CAF50;
}

.photo-upload {
    position: relative;
    width: 100px;
    height: 100px;
    border: 2px dashed #ddd;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.photo-upload:hover {
    border-color: #4CAF50;
}

.photo-upload input[type="file"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.photo-upload span {
    color: #666;
    font-size: 14px;
    text-align: center;
}

/* 统计面板样式 */
.statistics-panel {
    width: 100%;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chart-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
}

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

.statistic-card {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

.statistic-card h3 {
    color: #666;
    margin-bottom: 10px;
}

.statistic-card p {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}
