* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
}

div {
    padding: 5px;
}

pre {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
    overflow-x: auto;
    font-family: "Consolas", "Monaco", monospace;
}

code {
    font-family: "Consolas", "Monaco", monospace;
    color: #e74c3c;
    padding: 2px 4px;
    background-color: #f8f9fa;
    border-radius: 2px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 登录页面样式 */
.login-box {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.btn {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.switch-login {
    text-align: center;
    margin-top: 15px;
    color: #666;
}

.switch-login span {
    color: #3498db;
    cursor: pointer;
}

/* 支付页面样式 */
.pay-box {
    max-width: 400px;
    margin: 10px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pay-group {
    margin-bottom: 5px;
}

/* 主页面样式 */
.header {
    background-color: white;
    padding: 5px 0;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.header-content {
    /*display: flex;
    justify-content: space-between;
    align-items: center;*/
    padding-top: 5px;
    padding-bottom: 5px;
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* 允许换行 */
    gap: 15px; /* 元素间距 */
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #003399;
    margin: 0 auto;
    display: flex;
    align-items: center;    /* 上下居中（垂直居中） */
    justify-content: center;/* 左右居中（水平居中） */
    gap: 10px;              /* 图片和文字之间的间距 */
    font-size: 20px;
}

.logo img {
    vertical-align: middle; /* 兼容老版本 */
    height: 60px;           /* 你可以改图片高度 */
  }

.user-info {
    display: flex;
    align-items: center;
    margin: 0 auto;
}

.user-info span {
    margin-right: 15px;
}

.pay-btn {
    margin-right: 15px;
    padding: 6px 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.logout-btn {
    margin-right: 15px;
    padding: 6px 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.back-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

.reset-btn {
    padding: 4px 5px;
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.rows-btn {
    padding: 5px 12px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.view-btn {
    padding: 6px 12px;
    background-color: #3c56e7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 子菜单样式 */
.submenu {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid #eee;
    margin-top: 0px;
}

.submenu-btn {
    padding: 8px 16px;
    background-color: #f5f7fa;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.submenu-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.submenu-btn:hover:not(.active) {
    background-color: #e9ecef;
}

/* 内容面板样式 */
.content-panel {
    margin-top: 20px;
}

/* 计划列表样式 */
.plan-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.plan-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.plan-card:hover {
    transform: translateY(-5px);
}

.plan-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.plan-card li {
    color: #666;
    margin-bottom: 15px;
    margin-left: 15px;
}
.plan-card p {
    color: #666;
    margin-bottom: 15px;
}

.plan-card .start-btn .practice-btn{
    margin-top: 10px;
}

/* 学习列表样式 */
.study-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.study-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.study-card:hover {
    transform: translateY(-5px);
}

.study-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.study-card p {
    color: #666;
    margin-bottom: 15px;
}

.study-card .start-btn .practice-btn{
    margin-top: 10px;
}

/* 考试列表样式 */
.exam-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.exam-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s;
}

.exam-card:hover {
    transform: translateY(-5px);
}

.exam-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.exam-card p {
    color: #666;
    margin-bottom: 15px;
}

.exam-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 14px;
}

.start-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 15px;
}

.practice-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 15px;
}

/* 考试页面样式 */
.exam-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.exam-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.exam-code {
    display: flex;
    justify-content: space-between;    
    font-size: 14px;
}

.exam-code-l {
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 49%;
}

.exam-code-r {
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 50%;
}

.exam-code-case {
    padding-left: 20px;
}

.timer {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
}

.question {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.question h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.option {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.option.selected {
    background-color: #e3f2fd;
    border-color: #3498db;
}

.code-area {
    background: #fafafa;
    width: 100%;
    height: 300px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
    margin-top: 10px;
}

.submit-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

/* 成绩页面样式 */
.result-container {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.score-box {
    font-size: 48px;
    font-weight: bold;
    color: #2ecc71;
    margin: 30px 0;
}

.result-detail {
    text-align: left;
    margin-top: 30px;
}

.result-detail h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.run-btn.rotated {
    transform: rotate(0deg);
}

.run-btn {
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #34db37;
    color: white;
    border-radius: 4px;
    font-size: 16px;
    transition: transform 0.3s ease;
}

/* 通用隐藏样式 */
.hidden {
    display: none;
}

/* 锁状态样式 */
.exam-card.locked {
    position: relative;
    opacity: 0.85;
    /*pointer-events: none;  禁止所有点击 */
}
.study-card.locked {
    position: relative;
    opacity: 0.85;
    /*pointer-events: none;  禁止所有点击 */
}
.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background: rgba(255, 255, 255, 0.4);*/
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    border-radius: 12px;
}
.lock-text {
    font-size: 16px;
    color: #666;
    background: #f5e770;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}
/* 按钮禁用样式 */
.exam-card button:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}
/* 下拉框禁用 */
.exam-card select:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}