/*
 * 版权所有 (c) 2024 随机点名系统
 * 保留所有权利
 *
 * 警告：本软件受著作权法和国际条约保护。
 * 未经授权擅自复制或分发本软件的任何部分都将承担严重的民事和刑事责任。
 * 法律后果自负。
 */

:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --background-color: #ecf0f1;
    --text-color: #2c3e50;
    --highlight-color: #87CEFA;
    --border-color: #bdc3c7;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    position: relative;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px;
    max-width: 1600px;
    margin: 0 auto;
}

.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 120px;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.settings {
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.settings label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
}

.settings input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.mode-button {
    width: 100px;
    height: auto;
    margin: 5px;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    white-space: normal;
    word-break: keep-all;
}

.mode-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

h1, h2 {
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

#studentName {
    font-size: 36px;
    font-weight: bold;
    margin: 30px 0;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
    text-align: center;
    color: var(--primary-color);
}

/* 恢复开始按钮样式 */
.call-button {
    font-size: 18px;
    padding: 15px 30px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 30px;
}

.call-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.call-button:disabled {
    background-color: var(--border-color);
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.button {
    font-size: 18px;
    padding: 15px 30px;
    cursor: pointer;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 10px;
}

.button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.button:disabled {
    background-color: var(--border-color);
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.student-list {
    display: grid;
    gap: 1px;
    padding: 10px;
    background-color: #ddd;
    border-radius: 10px;
    max-width: 1400px;
    margin: 10px auto;
}

.student-list.seat-mode {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, 40px); /* 固定6行，每行40px高度 */
    gap: 8px; /* 统一间距 */
    padding: 15px;
    margin: 15px auto;
    max-width: 1200px;
    background-color: #ddd;
    border-radius: 10px;
}

.student-item {
    background-color: white;
    padding: 8px 12px;
    text-align: center;
    font-size: 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
}

.student-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.student-item.selected,
.student-item.disabled {
    background-color: #e6e6e6;
    color: #999;
    opacity: 0.7;
}

.student-item.empty {
    background-color: transparent;
    cursor: default;
}

.student-item.empty:hover {
    background-color: transparent;
}

#customStudentList {
    width: 100%;
    max-width: 400px;
    height: 200px;
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--primary-color);
    background-color: white;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

/* 座位选择模式样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    max-width: 95vw;  
    width: 900px;     
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
    margin-bottom: 20px;
}

.modal-footer {
    margin-top: auto;
    padding: 15px 0 0 0;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background: #fefefe;
}

.modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
}

.close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group label {
    font-size: 16px;
    white-space: nowrap;
}

.input-group .number-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.input-group .number-control button {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding: 0;
    transition: background-color 0.2s;
}

.input-group .number-control button:hover {
    background: var(--secondary-color);
}

.input-group .number-control input {
    width: 45px;
    height: 36px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 16px;
    -moz-appearance: textfield;
    margin: 0;
    padding: 0;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group .number-control input.changing {
    transform: scale(1.1);
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
    background: #E3F2FD;
}

@keyframes numberPulse {
    0% {
        transform: scale(1);
        border-color: #ddd;
        box-shadow: none;
    }
    50% {
        transform: scale(1.1);
        border-color: #2196F3;
        box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
    }
    100% {
        transform: scale(1);
        border-color: #ddd;
        box-shadow: none;
    }
}

.seat-selector-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
    width: 100%;
}

.seat-grid {
    display: grid;
    gap: 5px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin: 0 auto;
    width: fit-content;  
    max-width: 100%;    
}

.grid-controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    width: fit-content;  
    margin: 0 auto;     
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group label {
    min-width: 50px;
    color: #333;
    font-size: 14px;
}

.number-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.number-control button {
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s;
}

.number-control button:hover {
    background: #f0f0f0;
    border-color: #ccc;
    color: #333;
}

.number-control input {
    width: 40px;
    height: 26px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: white;
}

.modal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-footer button {
    min-width: 80px;
    height: 36px;
    padding: 0 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.modal-footer button:first-child {
    background: #007bff;
    color: white;
}

.modal-footer button:first-child:hover {
    background: #0056b3;
}

.modal-footer button:last-child {
    background: #6c757d;
    color: white;
}

.modal-footer button:last-child:hover {
    background: #545b62;
}

.seat-cell {
    width: 50px;      
    height: 35px;     
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;  
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.6);
}

.seat-cell.selected {
    background-color: rgba(255, 255, 255, 0.6);
}

.seat-cell.empty {
    background-color: rgba(200, 200, 200, 0.6);
}

.seat-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.seat-cell.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--secondary-color);
}

.group-info {
    width: 100%;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
    padding: 10px;
    background-color: rgba(255,255,255,0.8);
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 结果模态框样式 */
.result-modal {
    display: none;
    background-color: rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
}

.result-modal.show {
    display: flex;
    animation: fadeIn 0.5s ease-out;
}

.result-content {
    background: none;
    box-shadow: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.result-circle {
    position: relative;
    z-index: 1001;
    border-radius: 50%;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.result-circle::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse 2s infinite;
}

.countdown {
    font-weight: bold;
    font-size: 72px;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.selected-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
}

.selected-list::-webkit-scrollbar {
    width: 5px;
}

.selected-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.selected-name {
    font-size: 36px;
    text-align: center;
    padding: 0 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.selected-name.final-selected {
    font-size: 48px;
    margin-top: 20px;
    font-weight: bold;
    text-shadow: 0 2px 15px rgba(255, 255, 255, 0.5);
}

.selected-name.spotlight {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes popIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* 列表显示模式 */
.list-mode {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.grid-container {
    display: grid;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
}

.empty-placeholder {
    min-height: 40px;
    visibility: hidden;
}

.list-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.last-selected {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 5px 0;
    animation: slideIn 0.5s ease-out;
}

#lastSelectedStudent {
    font-weight: bold;
    margin-left: 5px;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 座位设置模式样式 */
.seat-settings-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin: 20px 0;
}

.seat-grid {
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 15px;
    min-height: 400px;
}

.seat-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.seat-instructions {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
    font-size: 14px;
    border: 1px solid #e0e0e0;
}

.seat-instructions p {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: bold;
}

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

.seat-instructions li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.grid-controls {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border: 1px solid #e0e0e0;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group label {
    min-width: 50px;
    color: #333;
}

.number-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.number-control button {
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s;
}

.number-control button:hover {
    background: #f0f0f0;
    border-color: #ccc;
    color: #333;
}

.number-control input {
    width: 40px;
    height: 26px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: white;
}

.modal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-footer button {
    min-width: 80px;
    height: 36px;
    padding: 0 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

/* 班级选择器样式 */
.class-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
}

.class-selector:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.class-selector option {
    padding: 8px;
    font-size: 16px;
}

.class-selector-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

.class-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

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

.class-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.no-class-message {
    color: #666;
    font-style: italic;
    padding: 6px;
}

.class-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

/* 花名册模式样式 */
.roster-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.roster-settings {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 学生列表样式 */
.student-item {
    padding: 5px 15px;
    margin: 5px 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.student-item:hover {
    background: #f5f5f5;
    transform: translateX(5px);
}

.student-item.selected {
    background: #e3f2fd;
    border-color: #2196F3;
}

/* 禁用状态样式 */
.student-item.disabled {
    background: #f5f5f5;
}

/* 批量导入区域样式 */
.batch-import-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

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

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

#batchInput {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    resize: vertical;
}

.template-btn, .import-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.template-btn {
    background-color: #6c757d;
    color: white;
}

.template-btn:hover {
    background-color: #5a6268;
}

.import-btn {
    background-color: #007bff;
    color: white;
}

.import-btn:hover {
    background-color: #0056b3;
}

/* 模态框底部样式 */
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 按钮样式统一 */
.template-btn, .import-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.template-btn {
    background-color: #6c757d;
    color: white;
}

.template-btn:hover {
    background-color: #5a6268;
}

.import-btn {
    background-color: #007bff;
    color: white;
}

.import-btn:hover {
    background-color: #0056b3;
}

/* 导入操作区域样式 */
.import-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.control-panel {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    max-width: 800px;
}

.settings-panel {
    display: flex;
    gap: 20px;
}

.settings-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-left: 20px;
    border-left: 1px solid #e0e0e0;
}

.mode-button {
    padding: 8px 16px;
    font-size: 14px;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mode-button:hover {
    background-color: #0056b3;
}

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

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

.import-instructions {
    margin: 10px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.import-instructions p {
    margin: 0 0 5px 0;
    color: #666;
    font-weight: bold;
}

.import-instructions ol {
    margin: 5px 0;
    padding-left: 25px;
    color: #666;
}

.import-instructions ol li {
    margin: 2px 0;
    font-size: 0.95em;
}

.import-instructions ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
}

.import-instructions li {
    margin: 3px 0;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.input-section {
    display: flex;
    flex-direction: column;
}

#batchInput {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 300px;
}

.import-instructions {
    padding: 15px;
    background-color: white;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
}

.import-instructions p {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--primary-color);
}

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

.import-instructions li {
    margin-bottom: 8px;
}

.import-instructions ul ul {
    margin-top: 5px;
}

/* 班级管理样式 */
.class-management {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.class-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.class-selector-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.class-selector-buttons button {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.class-selector-buttons button:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.class-selector-buttons button.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.divider {
    width: 1px;
    height: 24px;
    background-color: #ddd;
    margin: 0 5px;
}

.class-actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

/* 按钮样式 */
.action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #e9ecef;
    color: #495057;
}

.action-btn:hover {
    background-color: #dee2e6;
}

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

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

.action-btn.danger {
    background-color: #dc3545;
    color: white;
}

.action-btn.danger:hover {
    background-color: #c82333;
}

/* 导入区域样式 */
.batch-import-section {
    margin-top: 20px;
}

.import-header {
    margin-bottom: 15px;
}

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

#batchInput {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

/* 模态框样式优化 */
.modal-content {
    width: 90%;
    max-width: 800px;
    margin: 2% auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* 导入说明样式 */
.import-instructions {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
}

.import-instructions p {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: var(--primary-color);
}

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

.import-instructions li {
    margin-bottom: 8px;
}

.class-management-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 10px 0;
}

.divider {
    width: 1px;
    height: 40px;
    background-color: var(--border-color);
    margin: 0 10px;
}

.class-selector-buttons {
    flex: 1;
}

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

.class-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 300px;
}

.class-dialog input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    outline: none;
}

.class-dialog input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.dialog-buttons button {
    padding: 8px 20px;
    margin: 0;
}

.class-dialog::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* 备份控制按钮样式 */
.backup-controls {
    display: flex;
    gap: 10px;
    padding-left: 20px;
    border-left: 1px solid #e0e0e0;
}

.backup-btn {
    padding: 8px 16px;
    font-size: 14px;
    color: #fff;
    background-color: #28a745;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.backup-btn:hover {
    background-color: #218838;
}

/* 设置触发按钮样式 */
.settings-trigger {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
    padding: 0;
}

.settings-trigger:hover {
    transform: rotate(30deg);
    background: var(--primary-color);
    color: white;
}

.settings-trigger svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.settings-trigger:hover svg {
    color: white;
}

/* 设置两栏布局 */
.settings-layout {
    display: flex;
    gap: 20px;
}

.settings-column {
    flex: 1 1 0;
    min-width: 0; /* 防止内容溢出 */
}

/* 调整模态框宽度以适应两栏 */
.settings-modal {
    max-width: 1200px;
    width: 90%;
}

.settings-section {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    height: 100%;  /* 使两边高度一致 */
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    margin: 0 0 15px 0;
    color: var(--text-color);
}

.settings-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.settings-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.settings-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* 添加到现有的CSS文件中 */
.radio-label {
    display: block;
    margin: 10px 0;
    cursor: pointer;
}

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

.selected-history {
    opacity: 0.5;
    background-color: #f0f0f0;
    color: #666;
}

.settings-section {
    margin-bottom: 20px;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

/* 添加到现有的CSS文件中 */
.checkbox-label {
    display: flex;
    align-items: center;
    margin: 10px 0;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.settings-tip {
    margin-top: 8px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    border-left: 3px solid var(--primary-color);
}

/* 修改设置按钮样式 */
.settings-btn.primary {
    background: var(--primary-color);
    color: white;
}

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

/* 设置模态框底部样式 */
.settings-modal .modal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.save-overlay {
    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: 9999;
}

.save-message {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.save-message.show {
    opacity: 1;
    transform: translateY(0);
}

.save-icon {
    color: #3498db;
    font-size: 48px;
    text-align: center;
    margin-bottom: 20px;
}

.save-message h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.save-details {
    margin: 20px 0;
}

.save-details p {
    margin: 10px 0;
    color: #666;
}

.save-details ol {
    margin: 10px 0;
    padding-left: 20px;
}

.save-details li {
    margin: 5px 0;
    color: #666;
}

.next-steps {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

.confirm-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    font-size: 16px;
    transition: background 0.3s;
}

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

.settings-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.settings-item h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.settings-item:last-child {
    margin-bottom: 0;
}

/* 联系方式样式调整 */
.contact-info-new {
    display: flex;
    align-items: flex-start; /* 改为顶部对齐 */
    gap: 24px;
    padding: 10px 0; /* 添加上下内边距 */
}

.qr-code-new {
    width: 180px; /* 增加宽度 */
    height: 180px; /* 增加高度 */
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0; /* 防止二维码被压缩 */
    border: 1px solid #eee; /* 添加边框 */
}

.qr-code-new img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 改为 contain 以确保图片完整显示 */
    padding: 5px; /* 添加内边距 */
}

.contact-text-new {
    flex: 1;
    padding-top: 10px; /* 添加顶部内边距 */
}

.contact-text-new p {
    margin: 0 0 12px 0; /* 增加段落间距 */
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

/* 调整联系作者栏的宽度 */
.settings-column:last-child {
    flex: 0 0 300px;
}

.title-input {
    margin: 10px 0;
}

.title-input input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

.title-input input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 首次使用引导样式 */
.first-time-guide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.guide-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.guide-header {
    text-align: center;
    margin-bottom: 25px;
}

.guide-icon {
    font-size: 48px;
    margin: 15px 0;
}

.guide-body {
    color: #333;
    line-height: 1.6;
}

.guide-body ol {
    margin: 20px 0;
    padding-left: 20px;
}

.guide-body li {
    margin: 10px 0;
    padding-left: 10px;
}

.icon-hint {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    margin: 0 3px;
}

.guide-tip {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
}

.guide-tip ul {
    margin: 10px 0;
    padding-left: 20px;
}

.guide-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s;
}

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

.fade-out {
    animation: fadeOut 0.3s forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 班级选择弹窗样式 */
.class-select-modal {
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    position: relative;
    top: 50%;
    transform: translateY(-70%);
}

.class-select-modal .modal-header {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.class-select-modal .modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.class-select-modal .roster-content {
    padding: 30px 20px;
}

.class-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.class-btn {
    padding: 15px 30px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.class-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.class-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

/* 班级管理样式 */
.class-manager {
    display: flex;
    gap: 20px;
}

.class-list {
    width: 200px;
    border-right: 1px solid #eee;
}

.class-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.class-list-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.class-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.class-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.class-item .delete-btn {
    opacity: 0;
    transition: opacity 0.2s;
}

.class-item:hover .delete-btn {
    opacity: 1;
}

.roster-manager {
    flex: 1;
}

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

.roster-tools {
    display: flex;
    gap: 8px;
}

#rosterInput {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.action-btn.small {
    padding: 4px 8px;
    font-size: 12px;
}

/* 新设置模态框样式 */
.settings-modal-new {
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* 设置页头部 */
.settings-header-new {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-header-new h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

/* 设置页主体 */
.settings-body-new {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 左侧导航栏 */
.settings-nav-new {
    width: 220px;
    background: #f8f9fa;
    border-right: 1px solid #eee;
    padding: 20px 0;
}

.nav-item-new {
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.nav-item-new:hover {
    background: #f0f2f5;
    color: var(--primary-color);
}

.nav-item-new.active {
    background: #e8f0fe;
    color: var(--primary-color);
    font-weight: 500;
}

.nav-item-new .icon {
    font-size: 18px;
}

/* 右侧内容区 */
.settings-content-new {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* 设置页底部 */
.settings-footer-new {
    padding: 15px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 内容面板样式 */
.settings-panel-new {
    display: none;
}

.settings-panel-new.active {
    display: block;
}

/* 按钮样式 */
.btn-new {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

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

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

.btn-secondary-new {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary-new:hover {
    background: #e0e0e0;
}

/* 面板区块样式 */
.panel-section-new {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #eee;
}

.panel-section-new:last-child {
    margin-bottom: 0;
}

.panel-section-new h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* 表单控件样式 */
.form-group-new {
    margin-bottom: 20px;
}

.form-group-new:last-child {
    margin-bottom: 0;
}

.input-new {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.input-new:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
    outline: none;
}

/* 单选框组样式 */
.radio-group-new {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-card-new {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-card-new:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

.radio-card-new input[type="radio"] {
    margin: 3px 12px 0 0;
}

.radio-content-new {
    flex: 1;
}

.radio-content-new h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #333;
}

.radio-content-new p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* 开关按钮样式 */
.switch-card-new {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.switch-card-new:hover {
    background: #f8f9fa;
}

.switch-content-new {
    flex: 1;
    margin-left: 12px;
}

.switch-content-new h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #333;
}

.switch-content-new p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* 班级管理面板样式 */
.class-manager-new {
    display: flex;
    gap: 24px;
    height: 100%;
}

/* 左侧班级列表 */
.class-list-new {
    width: 240px;
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}

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

.class-list-header-new h3 {
    margin: 0;
    font-size: 16px;
}

.class-items-new {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 500px;
    overflow-y: auto;
}

.class-item-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.class-item-new:hover {
    background: #f0f2f5;
    border-color: #ddd;
}

.class-item-new.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.class-item-new .delete-btn-new {
    padding: 4px 8px;
    font-size: 12px;
    color: #666;
    background: none;
    border: none;
    opacity: 0;
    transition: all 0.3s;
}

.class-item-new:hover .delete-btn-new {
    opacity: 1;
}

.class-item-new.active .delete-btn-new {
    color: white;
}

/* 右侧名单管理 */
.roster-manager-new {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 500px); /* 设置一个合适的最大高度 */
    min-height: 300px; /* 设置最小高度 */
}

.roster-header-new {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.roster-tools-new {
    display: flex;
    gap: 8px;
}

.roster-content-new {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%; /* 占满父容器高度 */
    gap: 16px; /* 添加间距 */
}

.roster-textarea-new {
    flex: 1;
    min-height: 300px; /* 设置最小高度 */
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    background: #fff;
}

.roster-tip-new {
    flex-shrink: 0; /* 防止提示区域被压缩 */
    margin-top: 0; /* 移除顶部边距，因为已经使用了 gap */
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
}

/* 小按钮样式 */
.btn-sm-new {
    padding: 6px 12px;
    font-size: 13px;
}

/* 数据备份面板样式 */
.backup-tip-new {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.backup-tip-new p {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 500;
}

.backup-tip-new ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
    color: #666;
}

.backup-tip-new ul:last-child {
    margin-bottom: 0;
}

.backup-tip-new li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.backup-actions-new {
    display: flex;
    gap: 12px;
}

.backup-actions-new .btn-new {
    flex: 1;
    padding: 12px;
    font-size: 14px;
}

/* 关于系统面板样式 */
.about-info-new {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-item-new {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.about-item-new .label {
    width: 100px;
    color: #666;
}

.about-item-new .value {
    color: #333;
    font-weight: 500;
}

/* 更新日志样式 */
.changelog-new {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.version-item-new h4 {
    margin: 0 0 12px 0;
    color: var(--primary-color);
    font-size: 15px;
}

.version-item-new ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
}

.version-item-new li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.version-item-new li:last-child {
    margin-bottom: 0;
}

/* 联系方式样式调整 */
.contact-info-new {
    display: flex;
    align-items: flex-start; /* 改为顶部对齐 */
    gap: 24px;
    padding: 10px 0; /* 添加上下内边距 */
}

.qr-code-new {
    width: 180px; /* 增加宽度 */
    height: 180px; /* 增加高度 */
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0; /* 防止二维码被压缩 */
    border: 1px solid #eee; /* 添加边框 */
}

.qr-code-new img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 改为 contain 以确保图片完整显示 */
    padding: 5px; /* 添加内边距 */
}

.contact-text-new {
    flex: 1;
    padding-top: 10px; /* 添加顶部内边距 */
}

.contact-text-new p {
    margin: 0 0 12px 0; /* 增加段落间距 */
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}
