/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 800px;
    text-align: center;
}

/* 首页样式 */
.title {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 40px;
    font-weight: bold;
}

.exam-selection {
    display: flex;
    justify-content: space-around;
    margin-bottom: 40px;
    gap: 30px;
}

.exam-btn {
    flex: 1;
    padding: 30px 20px;
    border: none;
    border-radius: 15px;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.english-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.comprehensive-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.exam-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.exam-btn:active {
    transform: translateY(-2px);
}

.btn-text {
    display: block;
    margin-bottom: 15px;
}

.btn-info {
    font-size: 0.8em;
    opacity: 0.9;
    font-weight: normal;
}

.btn-info p {
    margin: 5px 0;
}

.instructions {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: left;
}

.instructions h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.instructions ul {
    list-style-position: inside;
    color: #555;
}

.instructions li {
    margin: 8px 0;
}

/* 考试页面样式 */
.exam-container {
    width: 100%;
    max-width: 1200px;
}

.exam-header {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

/* 考试页面头部样式 */
.exam-header {
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    flex-wrap: nowrap;
}

/* 返回首页按钮样式 */
.back-home-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.back-home-btn:hover {
    background-color: #2980b9;
}

/* 优化header内各元素布局 */
.subject-title {
    flex: 0 0 auto;
    margin: 0 20px;
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
    background-color: #ffffcc;
    border: 2px solid #000000;
    padding: 15px 20px;
    white-space: nowrap;
    z-index: 1000;
}

.current-time {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.timer-container {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
}

/* 三栏布局 */
.exam-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}


/* 当前时间 - 居中 */
.current-time {
    font-size: 2.5em;
    font-weight: bold;
    color: #e74c3c;
    flex: 1;
    text-align: center;
    margin: 0;
}

/* 倒计时容器 - 右对齐 */
.timer-container {
    flex: 0 0 auto;
    background: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
}

.section-info {
    font-size: 1.2em;
    color: #34495e;
}

.section-item {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 20px;
    background: #ecf0f1;
    transition: all 0.3s ease;
}

.section-item.active {
    background: #27ae60;
    color: white;
    font-weight: bold;
}

.timer-container {
    background: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
}

.countdown {
    font-size: 1.5em;
}

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

.node-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.node-btn {
    padding: 15px;
    border: 2px solid #3498db;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.node-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

.node-btn.selected {
    background: #2ecc71;
    border-color: #2ecc71;
    color: white;
}



.question-area {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: #555;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.action-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-btn {
    background: #27ae60;
    color: white;
}

.next-btn {
    background: #3498db;
    color: white;
    display: none; /* 默认隐藏 */
}

.prev-btn {
    background: #95a5a6;
    color: white;
    display: none; /* 默认隐藏 */
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .title {
        font-size: 2em;
    }
    
    .exam-selection {
        flex-direction: column;
    }
    
    .exam-btn {
        margin-bottom: 20px;
    }
    
    .current-time {
        font-size: 2em;
    }
    
    .exam-progress {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-info {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 考试完成提示 */
.completion-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.modal-content h2 {
    color: #27ae60;
    margin-bottom: 20px;
    font-size: 2em;
}

.modal-content p {
    margin-bottom: 30px;
    font-size: 1.2em;
    color: #555;
}

.modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    background: #3498db;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}