/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5em;
    font-weight: 300;
}

/* 主内容区域 */
main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* 名单显示区域 */
.name-list-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.name-list-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.name-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
}

.name-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.name-item:hover {
    background-color: #f9f9f9;
}

.name-item:last-child {
    border-bottom: none;
}

.name-checkbox {
    margin-right: 15px;
    transform: scale(1.2);
}

.name-text {
    flex: 1;
    font-size: 1.1em;
}

/* 控制按钮区域 */
.list-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* 点名控制区域 */
.roll-call-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.roll-call-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.roll-call-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.status-display {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

#currentName {
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

#statusInfo {
    color: #666;
    font-size: 1.1em;
}

/* 按钮样式 */
button {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 主要操作按钮 */
#autoRollCallBtn, #interactiveRollCallBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#stopRollCallBtn {
    background: #dc3545;
    color: white;
}

#nextBtn {
    background: #28a745;
    color: white;
}

/* 名单控制按钮 */
#selectAllBtn, #selectNoneBtn {
    background: #17a2b8;
    color: white;
}

#addNameBtn {
    background: #28a745;
    color: white;
}

#deleteSelectedBtn {
    background: #dc3545;
    color: white;
}

#exportListBtn {
    background: #6c757d;
    color: white;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #667eea;
}

#newNameInput {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    margin-bottom: 15px;
}

#newNameInput:focus {
    outline: none;
    border-color: #667eea;
}

#confirmAddBtn {
    width: 100%;
    background: #28a745;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .list-controls {
        grid-template-columns: 1fr;
    }
    
    .roll-call-controls {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .container {
        padding: 10px;
    }
}

/* 滚动条样式 */
.name-list::-webkit-scrollbar {
    width: 8px;
}

.name-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.name-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.name-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}