@import url('../css/minecraft-font.css');

/* 学生管理页面样式 */
:root {
    --primary-color: #4CAF50;
    --primary-hover: #45a049;
    --secondary-color: #2196F3;
    --secondary-hover: #0b7dda;
    --danger-color: #f44336;
    --danger-hover: #d32f2f;
    --warning-color: #ff9800;
    --light-bg: #f5f5f5;
    --dark-bg: #333333;
    --border-color: #dddddd;
    --text-color: #333333;
    --light-text: #ffffff;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --border-radius: 4px;
    --transition: all 0.3s ease;
    --sidebar-width: 280px;
    --sidebar-bg-color: rgba(91, 135, 49, 0.1);
    --sidebar-border-color: var(--border-color);
    --list-hover-color: rgba(91, 135, 49, 0.1);
    --list-active-color: var(--primary-color);
    --list-active-text: white;
    --form-bg-color: rgba(255, 255, 255, 0.7);
    --form-border-color: var(--border-color);
    --input-border-color: #cccccc;
    --input-focus-color: var(--primary-color);
    --male-color: #3498db;
    --female-color: #e74c3c;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

/* 应用容器 */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏 */
.sidebar {
    width: 300px;
    background-color: white;
    border-right: 1px solid var(--border-color);
    padding: 15px;
    overflow-y: auto;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.class-management, .student-list-section {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.sidebar h2 {
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--primary-color);
}

/* 班级添加 */
.add-class {
    display: flex;
    margin-bottom: 15px;
}

.add-class input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    margin-right: 10px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.primary-btn:hover {
    background-color: var(--primary-hover);
}

.secondary-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.secondary-btn:hover {
    background-color: var(--secondary-hover);
}

/* 班级列表 */
.class-list-container {
    margin-bottom: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.class-list {
    list-style: none;
    padding: 0;
}

.class-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: var(--border-radius);
    margin-bottom: 5px;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--light-bg);
}

.class-list li:hover {
    background-color: #e9e9e9;
}

.class-list li.active {
    background-color: #e3f2fd;
    border-left: 3px solid var(--secondary-color);
}

.class-actions {
    display: flex;
    gap: 5px;
}

.class-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: var(--transition);
}

.class-actions button:hover {
    color: var(--secondary-color);
}

.empty-message {
    color: #888;
    text-align: center;
    padding: 15px;
    font-style: italic;
}

/* 侧边栏学生列表 */
.student-list-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-box {
    margin-bottom: 10px;
}

.search-box input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.student-list-container {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.sidebar-student-list {
    list-style: none;
    padding: 0;
}

.student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.student-item:hover {
    background-color: #f0f7ff;
}

.student-info {
    display: flex;
    flex-direction: column;
}

.student-name {
    font-weight: bold;
    font-size: 14px;
}

.student-id {
    color: #666;
    font-size: 12px;
}

.student-item .student-actions {
    visibility: hidden;
    display: flex;
    gap: 5px;
}

.student-item:hover .student-actions {
    visibility: visible;
}

.student-actions .edit-btn,
.student-actions .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    font-size: 12px;
}

.student-actions .edit-btn {
    color: var(--secondary-color);
}

.student-actions .delete-btn {
    color: var(--danger-color);
}

/* 刷新数据按钮 */
.sidebar-actions {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-actions button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    flex: 1;
}

.sidebar-actions button:hover {
    background-color: #0b7dda;
    transform: scale(1.03);
}

.sidebar-actions button i {
    font-size: 14px;
}

#restore-backup-btn {
    background-color: #ff9800;
}

#restore-backup-btn:hover {
    background-color: #e68a00;
}

/* 主内容区域 */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f8f9fa;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.header-info h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.header-info h2 {
    font-size: 18px;
    color: var(--secondary-color);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background-color: white;
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background-color: var(--light-bg);
}

/* 学生管理 */
.student-management {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.student-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.search-area {
    flex: 1;
    margin-right: 20px;
}

.search-area input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.export-import {
    display: flex;
    gap: 10px;
}

/* 学生表格 */
.student-table {
    margin-bottom: 30px;
    overflow-x: auto;
}

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

.student-table th,
.student-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.student-table th {
    background-color: var(--light-bg);
    font-weight: bold;
}

.student-table tr:hover {
    background-color: #f0f7ff;
}

.student-table tr.highlight {
    background-color: #e3f2fd;
    animation: highlight-pulse 2s;
}

@keyframes highlight-pulse {
    0% { background-color: #e3f2fd; }
    50% { background-color: #bbdefb; }
    100% { background-color: #e3f2fd; }
}

.student-table .student-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.student-table .edit-btn,
.student-table .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
}

.student-table .edit-btn {
    color: var(--secondary-color);
}

.student-table .delete-btn {
    color: var(--danger-color);
}

/* 添加学生表单 */
.add-student {
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: var(--border-radius);
}

.add-student h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

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

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 对话框 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialog {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 400px;
    max-width: 90%;
    overflow: hidden;
}

.dialog-header {
    padding: 15px 20px;
    background-color: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
}

.dialog-title {
    margin: 0;
    font-size: 18px;
}

.dialog-content {
    padding: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    padding: 15px 20px;
    background-color: var(--light-bg);
    border-top: 1px solid var(--border-color);
    gap: 10px;
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 全屏模式 */
.fullscreen-mode {
    overflow: hidden;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .student-management-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
}

/* 全屏模式 */
.fullscreen-mode .student-management-container {
    height: calc(100vh - 180px);
    overflow: auto;
}

.fullscreen-mode .sidebar {
    height: 100%;
}

.fullscreen-mode .content {
    height: 100%;
    overflow: auto;
}

/* 使用说明部分 */
.instructions {
    background-color: var(--sidebar-bg-color);
    padding: 20px;
    border-radius: 4px;
    margin-top: 30px;
    border-left: 4px solid var(--accent-color);
}

.instructions h3 {
    color: var(--accent-color);
    margin-top: 0;
}

.instructions ul {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 10px;
} 