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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 登录页面 */
.admin-container {
    min-height: 100vh;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

/* 登录面板 */
#login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 24px;
}

.login-form input {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 20px;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
}

.login-box h1 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 24px;
}

.login-box input {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 20px;
}

.login-box input:focus {
    outline: none;
    border-color: #667eea;
}

.login-box button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s;
}

.login-box button:hover {
    transform: translateY(-2px);
}

/* 主容器 */
.main-container {
    display: flex;
    min-height: 100vh;
}

/* 主管理面板 */
#main-panel {
    display: flex;
    min-height: 100vh;
}

/* 顶部导航 */
.admin-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 250px;
    height: 60px;
    background: #fff;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.admin-header h1 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: #fff;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

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

.sidebar li {
    margin-bottom: 5px;
}

.sidebar h2 {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 20px;
}

.nav-item {
    display: block;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: all 0.3s;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-item.active {
    background: #667eea;
    color: #fff;
}

.nav-item.logout {
    margin-top: 30px;
    background: rgba(231, 76, 60, 0.8);
}

.nav-item.logout:hover {
    background: #e74c3c;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 80px 30px 30px;
}

/* 内容区 */
.content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
}

/* 区块 */
.section {
    display: none;
}

.section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    flex: 1;
}

/* 当前考次区域 */
.current-exam-section {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.current-exam-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.current-exam-card {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 8px;
}

.current-exam-card p {
    margin: 5px 0;
    color: #2c3e50;
}

/* 复选框标签 */
.checkbox-label {
    display: block;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-label:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
}

/* 小按钮 */
.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-success {
    background: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background: #2ecc71;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content > h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

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

.stat-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card p {
    color: #667eea;
    font-size: 36px;
    font-weight: bold;
}

/* 数据表格 */
.data-table {
    width: 100%;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

.data-table thead {
    background: #667eea;
    color: #fff;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
}

.data-table tbody tr {
    border-bottom: 1px solid #eee;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

/* 按钮 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: #fff;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-danger:hover {
    background: #c0392b;
}

/* 表格中的按钮样式 */
.data-table button {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    margin: 0;
    vertical-align: middle;
}

/* 表单 */
.settings-form {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
}

/* 管理员密码输入框样式 */
.form-group input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

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

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

/* 重置区域 */
.reset-section {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 18px;
    margin: 0;
}

.modal-close {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 20px;
}

.modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 5px;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 15px;
}

.tip {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
}

/* 操作按钮 */
.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 5px;
    font-size: 12px;
}

.action-btn.edit {
    background: #3498db;
    color: #fff;
}

.action-btn.delete {
    background: #e74c3c;
    color: #fff;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-table {
        overflow-x: auto;
    }
}
