/* 移动端优先样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f5f5f5;
    line-height: 1.5;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
    background: white;
    min-height: 100vh;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.site-brand-wrap {
    text-align: center;
    margin: 10px 0 16px;
}

.site-brand {
    font-size: 24px;
    font-weight: 800;
    color: #1f2d3d;
    letter-spacing: 1px;
}

.site-brand-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: #6b7b8c;
    letter-spacing: 2px;
}

.container::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='240'%3E%3Ctext x='22' y='132' fill='rgba(0,0,0,0.08)' font-size='44' font-family='Microsoft YaHei,Arial' transform='rotate(-26 180 120)'%3E%E8%93%89%E5%AE%89%E5%BB%BA%E8%AE%BE%3C/text%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 360px 240px;
}

.container > * {
    position: relative;
    z-index: 1;
}

/* 顶部栏 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #edf1f5;
    font-size: 16px;
    background: #fafcff;
    border-radius: 10px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-btn {
    background: #3b82f6;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}

.logout-btn {
    background: #ef4444;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.22);
}

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

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    margin: 10px 0;
    cursor: pointer;
}

.btn-secondary {
    background: #6c757d;
}

.btn-success {
    background: #28a745;
}

/* 选项卡片 */
.menu-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.menu-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 20px;
    font-weight: 500;
    color: #007bff;
    text-decoration: none;
    border: 1px solid #e9ecef;
}

/* 题目卡片 */
.question-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}

.question-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.options {
    list-style: none;
}

.option-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.option-text {
    font-size: 16px;
    flex: 1;
}

.submit-area {
    margin-top: 30px;
    text-align: center;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 错题库列表 */
.wrong-item {
    background: #fff3f3;
    border-left: 4px solid #dc3545;
}

/* 进度条 */
.progress {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

/* 解析区域 */
.explanation-box {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}