/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    /* 将背景图路径更改为指定的图片 */
    background-image: url('../images/logo-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #333;
}

.exam-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    display: flex;
    align-items: center;
    /* 移除space-between，改为flex-start使元素从左侧开始排列 */
    justify-content: space-between;
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
}

.logo {
    height: 50px;
    margin-right: 15px;
}

.header h1 {
    font-size: 24px;
    color: #000000;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ddd;
}

/* 登录页面样式 */
.login-box {
    display: flex;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    margin-top: 100px;
}

.welcome-message {
    flex: 1;
    padding: 40px;
    /* 修改为更明显的垂直渐变透明效果 */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.1));
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.welcome-message h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.welcome-message p {
    color: #666;
    margin-bottom: 30px;
}

.login-form {
    flex: 1;
    padding: 40px;
    background-color: white;
}

.login-form h3 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 22px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.verify-code-container {
    display: flex;
    gap: 10px;
}

.verify-code-container input {
    flex: 1;
}

.verify-code {
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border-radius: 4px;
    font-weight: bold;
    color: #666;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #0052a3;
}

/* 考试主题选择页面样式 */
.select-topic-box {
    display: flex;
    border-radius: 20px;
    max-width: 1100px;
    gap: 30px;
    background-color: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    padding: 30px 30px 60px;
    margin: 0 auto;
    overflow: hidden;
}

.exam-info {
    flex: 0.4;
    /* 确保即使内容不足也保持宽度 */
    min-width: 0;
}

.exam-info h3 {
    margin-bottom: 20px;
    color: #333;
}

.exam-info ul {
    margin-left: 20px;
    line-height: 1.8;
    color: #666;
}

.exam-info li {
    margin-bottom: 10px;
}

.agreement {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

.agreement input {
    margin-right: 10px;
}

.user-details {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
}

.user-details p {
    line-height: 60px;
}

.user-details span:first-child {
    display: inline-block;
    width: 80px;
    color: #666;
}

.exam-options {
    margin-bottom: 30px;
}

.exam-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.exam-item.selected {
    border-color: #0066cc;
    background-color: rgba(0,102,204,0.05);
}

.exam-meta {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.start-exam-btn {
    width: 100%;
    padding: 14px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.start-exam-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 考试页面样式 */
/* 考试页面布局调整 */
.exam-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px;
}

/* 三栏布局样式 */
.exam-content {
    display: flex;
    gap: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow: hidden;
    min-height: calc(100vh - 180px);
}

/* 左侧边栏：考试信息和导航 */
.exam-sidebar-left {
    width: 250px;
    padding: 20px;
    background-color: #f8f9fa;
    border-right: 1px solid #eee;
    flex-shrink: 0;
}

/* 中间区域：题目内容 */
.exam-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    min-width: 0;
}

.exam-main h2 {
    margin-bottom: 20px;
    color: #113585;
    text-align: center;
    height: 60px;
    border-bottom: 1px solid #eee;
}

/* 右侧边栏：答题卡 */
.exam-sidebar-right {
    width: 300px;
    padding: 20px;
    background-color: #f8f9fa;
    border-left: 1px solid #eee;
    flex-shrink: 0;
    overflow-y: auto;
}

/* 考试导航样式 */
.exam-navigation {
    margin-top: 30px;
}

.exam-navigation h4 {
    margin-bottom: 15px;
    color: #333;
}

.exam-navigation ul {
    list-style: none;
}

.exam-navigation li {
    margin-bottom: 10px;
}

.exam-navigation a {
    color: #0066cc;
    text-decoration: none;
    display: block;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.exam-navigation a:hover {
    background-color: #e9ecef;
}

/* 响应式设计：在小屏幕上自动调整为单列布局 */
@media (max-width: 1200px) {
    .exam-content {
        flex-direction: column;
    }
    
    .exam-sidebar-left,
    .exam-sidebar-right {
        width: 100%;
        border: none;
        border-bottom: 1px solid #eee;
    }
    
    .exam-sidebar-right {
        border-bottom: none;
        border-top: 1px solid #eee;
    }
}
.user-info {
    flex: 0.6;
    /* 确保即使内容不足也保持宽度 */
    min-width: 0;
}

.exam-info {
    margin-top: 100px;
}

.exam-title{
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    color: #0052a3;
    padding: 20px 0 10px;
}

.exam-info p {
    margin-bottom: 10px;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #2754e3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
}

.answer-sheet h4 {
    margin: 15px 0 10px;
    color: #333;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
}

.progress-bar {
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    margin-bottom: 20px;
}

.progress {
    height: 100%;
    background-color: #28a745;
    border-radius: 4px;
}

.legend {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: space-around;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    margin-right: 15px;
}

.color-box {
    width: 12px;
    height: 12px;
    display: inline-block;
    margin-right: 5px;
    border-radius: 2px;
}

.color-box.green {
    background-color: #28a745;
}

.color-box.yellow {
    background-color: #ffc107;
}

.color-box.gray {
    background-color: #6c757d;
}

.question-title{
    font-size: 20px;
    font-weight: bold;
    color: #384554;
    margin-bottom: 15px;
}

.question-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 修改考试页面题号样式，添加更具体的选择器 */
.question-numbers .question-number {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 14px;
    background-color: #eee;
    cursor: pointer;
    /* 添加这一行确保元素不会脱离文档流 */
    position: static;
}

.question-numbers .question-number.answered {
    background-color: #28a745;
    color: white;
}

.question-numbers .question-number.unanswered {
    background-color: #6c757d;
    color: white;
}

.question-numbers .question-number.correct {
    background-color: #28a745;
    color: white;
}

.question-numbers .question-number.incorrect {
    background-color: #dc3545;
    color: white;
}

.exam-questions {
    flex: 1;
    padding: 20px;
}

.exam-questions h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.question {
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

/* .question p {
    margin-bottom: 15px;
    color: #333;
} */

.options {
    margin-left: 20px;
}

.option {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
}

.option input {
    margin-right: 10px;
}

/* 结果页面特定样式 */
.result-icon {
    font-size: 64px;
    color: #28a745;
    margin: 20px 0;
}
.score {
    font-size: 48px;
    font-weight: bold;
    color: #dc3545;
    margin: 20px 0;
}
.btn.return-home-btn {
    width: 160px;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}
.btn.return-home-btn:hover {
    background-color: #0056b3;
}
.question-number.correct {
    background-color: #28a745;
    color: white;
}
.question-number.incorrect {
    background-color: #dc3545;
    color: white;
}
.question-number.unanswered {
    background-color: #6c757d;
    color: white;
}
/* 居中内容 */
.result-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 100px;
}

/* 咨询客服样式 */
.customer-service {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.customer-service h4 {
    color: #4A148C;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.qrcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.customer-service-qrcode {
    width: 180px;
    height: 180px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.qrcode-desc {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
    .customer-service-qrcode {
        width: 150px;
        height: 150px;
    }
    
    .customer-service h4 {
        font-size: 1.1rem;
    }
}

/* 地面站考试题目页面特定样式 - 基础样式 */
.ground-station-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    padding: 25px 30px;
}

.ground-station-top h2 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.random-question-btn {
    padding: 12px 30px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.random-question-btn:hover {
    background-color: #0052a3;
}

/* 题库图片网格布局 */
.question-bank {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    padding: 30px;
    /* 添加滚动条相关样式 */
    max-height: calc(100vh - 250px); /* 设置最大高度，根据页面布局调整 */
    overflow-y: auto; /* 启用垂直滚动 */
    overflow-x: hidden; /* 禁用水平滚动 */
}

/* 美化滚动条样式（可选） */
.question-bank::-webkit-scrollbar {
    width: 8px;
}

.question-bank::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.question-bank::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.question-bank::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 题目项样式 */
.question-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s;
}

.question-item:hover {
    border-color: #0066cc;
    box-shadow: 0 2px 10px rgba(0,102,204,0.2);
    transform: translateY(-2px);
}

/* 题目标记样式 */
.question-result {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 10;
}

.question-result.correct {
    background-color: #4CAF50;
    color: white;
}

.question-result.incorrect {
    background-color: #f44336;
    color: white;
}

.question-item {
    position: relative;
    /* 其他现有样式 */
}

.question-number {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(255,255,255,0.9);
    color: #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.question-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.question-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.question-item:hover .question-thumbnail img {
    transform: scale(1.05);
}

.攻略-this-question-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px;
    background-color: rgba(0,102,204,0.9);
    color: white;
    border: none;
    font-size: 12px;
    cursor: pointer;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.question-item:hover .攻略-this-question-btn {
    transform: translateY(0);
}

/* 响应式设计：根据屏幕尺寸调整网格列数 */
@media (max-width: 1400px) {
    .question-bank {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1200px) {
    .question-bank {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 992px) {
    .question-bank {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .question-bank {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* 添加在现有的 @media (max-width: 768px) 媒体查询之外 */
    
    /* 考试控制区域样式 */
    .exam-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    }
    
    .exam-time {
    font-size: 18px;
    color: #333;
    font-weight: 500;
    }
    
    .submit-exam-btn {
    padding: 12px 30px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    }
    
    .submit-exam-btn:hover {
    background-color: #0052a3;
    }
    
    /* 题目显示容器样式 */
    .question-display-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    padding: 40px;
    min-height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    }
    
    .question-display-image {
    max-width: 100%;
    max-height: 520px;
    object-fit: contain;
    width: 50%;
    }
    
    /* 响应式设计：在小屏幕上调整布局 */
    @media (max-width: 768px) {
    /* 保留现有的媒体查询样式，这些将在小屏幕上覆盖基础样式 */
    .ground-station-top {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    }
    
    .exam-controls {
    flex-direction: column;
    gap: 15px;
    }
    
    .question-display-container {
    padding: 20px;
    min-height: 400px;
    }
    
    .question-display-image {
    max-height: 360px;
    width: 50%;
    }
    }
}
