/* MetLife 安全意识测试答题系统 - 统一样式表 */
:root {
    --navy: #1a6b8a;
    --navy-deep: #145a75;
    --white: #FFFFFF;
    --cyan: #50BFE6;
    --cyan-dark: #2891b8;
    --green: #8FF5B1;
    --blue-light: #E8F6FC;
    --warm-gray: #F7FAFC;
    --text-muted: #8AA4B4;
    --text-body: #3D5A6C;
    --border-light: #E2EEF4;

    --primary-color: var(--cyan-dark);
    --primary-light: var(--blue-light);
    --primary-dark: var(--navy-deep);
    --secondary-color: var(--cyan);
    --secondary-light: rgba(80, 191, 230, 0.18);
    --secondary-dark: #3a9fc4;
    --accent-color: var(--green);
    --success-color: #3dba8c;
    --error-color: #e53935;
    --gray-color: #B8CDD8;
    --text-color: var(--text-body);
    --bg-color: var(--warm-gray);
    
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    
    --shadow-sm: 0 2px 8px rgba(26, 107, 138, 0.06);
    --shadow-md: 0 4px 20px rgba(26, 107, 138, 0.08);
    --shadow-lg: 0 8px 28px rgba(26, 107, 138, 0.12);
    
    --transition-fast: 200ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* 基础样式 */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html, body { 
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body { 
    font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif; 
    background: var(--warm-gray);
    background-image:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(80, 191, 230, 0.14) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 90% 100%, rgba(143, 245, 177, 0.16) 0%, transparent 55%),
        linear-gradient(180deg, #FAFCFD 0%, var(--blue-light) 100%);
    color: var(--text-color); 
    min-height: 100vh; 
    line-height: 1.6; 
    display: flex;
    flex-direction: column;
}

/* 布局容器 */
.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: var(--spacing-md);
    padding-top: max(var(--spacing-sm), env(safe-area-inset-top));
    padding-left: max(var(--spacing-md), env(safe-area-inset-left));
    padding-right: max(var(--spacing-md), env(safe-area-inset-right));
    padding-bottom: max(var(--spacing-lg), env(safe-area-inset-bottom));
    align-items: center;
    justify-content: flex-start;
}

.page-wrapper:has(.card) {
    justify-content: center;
}

.container { 
    max-width: 720px; 
    margin: 0 auto; 
    width: 100%;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.admin-container {
    max-width: 1200px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* 标题和文本 */
h1, h2, h3, h4, h5, h6 { 
    color: var(--navy); 
    margin-bottom: var(--spacing-sm);
    text-align: center;
    width: 100%;
}

h1 { 
    font-size: clamp(1.125rem, 3.5vw, 1.75rem);
    line-height: 1.35;
}

/* 答题页头部 */
.quiz-header {
    margin-bottom: 14px;
    padding: 0 2px;
    text-align: center;
}

.quiz-title {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4em 0.55em;
    margin: 0 0 6px;
    font-size: clamp(1.0625rem, 3.6vw, 1.4375rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy);
    width: auto;
}

.quiz-title-text {
    letter-spacing: 0.01em;
}

.quiz-meta {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
    text-align: center;
}

.page-title {
    font-size: clamp(1.125rem, 3.8vw, 1.625rem);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.01em;
    color: var(--navy);
}

/* Logo 容器 */
.logo-container {
    padding: var(--spacing-sm) var(--spacing-md);
    padding-top: max(var(--spacing-sm), env(safe-area-inset-top));
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
    flex-shrink: 0;
}

.logo-container img {
    height: clamp(36px, 10vw, 52px);
    width: auto;
    max-width: min(220px, 72vw);
    object-fit: contain;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 0;
    width: 100%;
    max-width: 480px;
    border: 1px solid rgba(203, 241, 255, 0.8);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cyan), var(--green));
}

@media (hover: hover) {
    .card {
        transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    }
    .card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }
}

.card-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid rgba(203, 241, 255, 0.6);
    text-align: center;
}

.card-title {
    margin: 0;
    font-size: inherit;
    color: var(--navy);
}

.card-content {
    padding: 20px 24px 28px;
}

/* 表单样式 */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-body);
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    min-height: 48px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--text-body);
    transition: all var(--transition-fast);
    font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
    -webkit-appearance: none;
}

.form-group input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(80, 191, 230, 0.2);
    outline: none;
}

/* 下拉框样式 */
.form-group select {
    width: 100%;
    padding: 12px 14px;
    min-height: 48px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--text-body);
    transition: all var(--transition-fast);
    font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
    background-color: white;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a6b8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.form-group select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(80, 191, 230, 0.2);
    outline: none;
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.field-error {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

/* Flash / Alert 提示 */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    text-align: left;
}

.alert-error {
    background: rgba(229, 57, 53, 0.1);
    color: #c62828;
    border: 1px solid rgba(229, 57, 53, 0.25);
}

.alert-success {
    background: rgba(143, 245, 177, 0.35);
    color: #1a6b4a;
    border: 1px solid rgba(61, 186, 140, 0.4);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.35);
}

/* 按钮样式 */
button {
    background: linear-gradient(135deg, #5ec8ea 0%, var(--cyan-dark) 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(40, 145, 184, 0.25);
}

button:hover {
    background: linear-gradient(135deg, #4dbde3 0%, var(--navy-deep) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(40, 145, 184, 0.3);
}

button.btn-primary-accent {
    background: linear-gradient(135deg, var(--cyan), var(--green));
    color: var(--navy-deep);
    box-shadow: 0 2px 8px rgba(80, 191, 230, 0.3);
}

button.btn-primary-accent:hover {
    background: linear-gradient(135deg, #3aafd6, #7ae8a4);
    color: var(--navy-deep);
}

button:active {
    transform: translateY(0);
}

button.btn-disabled {
    background: var(--gray-color);
    color: white;
    box-shadow: none;
    cursor: not-allowed;
}

button.btn-disabled:hover {
    background: var(--gray-color);
    transform: none;
    box-shadow: none;
}

/* 按钮容器 */
.btn-container { 
    text-align: center; 
    margin: 20px 0;
    width: 100%; /* 确保按钮容器占满宽度 */
    display: flex;
    justify-content: center; /* 按钮居中 */
    gap: 10px; /* 按钮之间的间距 */
    align-items: center; /* 垂直居中 */
}

/* 返回按钮 */
.return-btn {
    background: rgba(80, 191, 230, 0.12);
    color: var(--cyan-dark);
    border: 1px solid rgba(80, 191, 230, 0.4);
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    min-width: 100px;
    box-shadow: none;
}

.return-btn:hover {
    background: rgba(80, 191, 230, 0.22);
    color: var(--navy-deep);
    border-color: var(--cyan);
    box-shadow: none;
}

/* 第一题的按钮容器，确保返回按钮在左侧，下一题按钮在右侧 */
.first-question-btns {
    justify-content: space-between;
    padding: 0 var(--spacing-md);
}

/* 登录按钮容器 */
.login-btn-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
    align-items: center;
}

.login-btn-container button {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
}

/* 脉动动画按钮在卡片中居中 */
.card-content .animate-pulse {
    margin: 0 auto;
    display: block;
}

/* 验证码容器 */
.captcha-container {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
}

.captcha-container input[type="text"] {
    flex: 1 1 120px;
    min-width: 0;
}

.captcha-code {
    background-color: rgba(80, 191, 230, 0.1);
    padding: 0 14px;
    border-radius: var(--radius-md);
    font-weight: bold;
    letter-spacing: 3px;
    font-size: 1.125rem;
    color: var(--cyan-dark);
    min-width: 88px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    user-select: none;
    flex-shrink: 0;
    border: 1px solid rgba(80, 191, 230, 0.25);
}

.refresh-btn {
    background: rgba(80, 191, 230, 0.12);
    color: var(--cyan-dark);
    border: 1px solid rgba(80, 191, 230, 0.35);
    padding: 0 14px;
    font-size: 0.8125rem;
    height: 48px;
    min-height: 48px;
    min-width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    letter-spacing: normal;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    box-shadow: none;
}

.refresh-btn:hover {
    background: rgba(80, 191, 230, 0.22);
    color: var(--navy-deep);
    transform: none;
    box-shadow: none;
}

/* 答题容器 */
.quiz-container { 
    background: white; 
    border-radius: var(--radius-lg); 
    box-shadow: var(--shadow-md); 
    overflow: hidden; 
    margin-bottom: var(--spacing-sm); 
    width: 100%;
    border: 1px solid var(--border-light);
}

@media (hover: hover) {
    .quiz-container {
        transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    }
    .quiz-container:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }
}

.quiz-layout header,
.quiz-header {
    margin-bottom: 12px;
    padding: 0 2px;
}

.question-container { 
    padding: var(--spacing-md); 
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.question-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
    justify-content: flex-start;
    text-align: left;
    width: 100%;
}

.question-header > div:last-child {
    flex: 1;
    text-align: left;
}

.question-number {
    background: linear-gradient(135deg, var(--cyan), #3dba8c);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 0.85rem;
    margin-top: 2px;
    box-shadow: 0 2px 6px rgba(80, 191, 230, 0.35);
}

.question {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-body);
}

.options { 
    display: grid; 
    gap: 10px; 
}

.option { 
    padding: 12px; 
    min-height: 48px;
    border: 1.5px solid var(--border-light); 
    border-radius: var(--radius-md); 
    cursor: pointer; 
    transition: all var(--transition-fast); 
    display: flex; 
    align-items: flex-start; 
    gap: 10px;
    position: relative;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    background: #fff;
}

.option:hover { 
    background-color: rgba(232, 246, 252, 0.6);
    border-color: rgba(80, 191, 230, 0.4);
}

.option.selected { 
    background-color: rgba(232, 246, 252, 0.85); 
    border-color: var(--cyan); 
}

.option-label { 
    font-weight: bold; 
    width: 22px; 
    height: 22px; 
    background-color: rgba(80, 191, 230, 0.15); 
    color: var(--cyan-dark);
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.option-text {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    word-break: break-word;
    overflow-wrap: break-word;
    color: var(--text-body);
}

.option.selected .option-label { 
    background: linear-gradient(135deg, var(--cyan), #3dba8c);
    color: white; 
}

/* 单选题和多选题指示器样式 */
.radio-indicator, .checkbox-indicator {
    position: relative;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 2px solid var(--border-light);
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

.radio-indicator {
    border-radius: 50%;
}

.checkbox-indicator {
    border-radius: 4px;
}

.option.selected .radio-indicator {
    border-color: var(--cyan-dark);
    background: linear-gradient(135deg, var(--cyan), #3dba8c);
}

.option.selected .checkbox-indicator {
    border-color: var(--cyan-dark);
    background: linear-gradient(135deg, var(--cyan), #3dba8c);
}

/* 选中状态的内部圆点和勾选标记 */
.option.selected .radio-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: white;
}

.option.selected .checkbox-indicator::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 得分和进度显示区域 */
.score-progress-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: var(--spacing-sm);
    padding: 10px 15px;
    background-color: var(--primary-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.current-score, .answered-count {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-color);
}

.score-value {
    font-weight: bold;
    color: var(--primary-color);
    margin: 0 3px;
    font-size: 1.1rem;
}

/* 进度条样式 */
.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: var(--spacing-sm);
}

.progress-track {
    flex: 1;
    min-width: 0;
    height: 6px;
    background-color: rgba(80, 191, 230, 0.15);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    border-radius: var(--radius-sm);
    transition: width var(--transition-normal) ease;
}

.progress-text {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    line-height: 1;
}

/* 答案反馈样式 */
.answer-feedback {
    margin-top: 15px;
    padding: 10px;
    border-radius: var(--radius-md);
    background-color: #f5f5f5;
    transition: all var(--transition-normal);
}

.feedback-correct, .feedback-incorrect {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.feedback-correct {
    background-color: rgba(143, 245, 177, 0.35);
    color: #1a6b4a;
}

.feedback-incorrect {
    background-color: #ffebee;
    color: #c62828;
}

.feedback-correct svg, .feedback-incorrect svg {
    margin-right: 8px;
}

.correct-answer {
    font-weight: bold;
    margin-left: 5px;
}

/* 结果容器 */
.result-container { 
    background: white; 
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-md); 
    text-align: center; 
    margin-bottom: var(--spacing-md); 
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(203, 241, 255, 0.8);
    position: relative;
}

.result-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cyan), var(--green));
}

.results-scroll-container {
    width: 100%;
    margin: 0 auto;
}

/* 成绩展示区 */
.result-hero {
    padding: 32px 24px 24px;
    background: linear-gradient(180deg, rgba(232, 246, 252, 0.8) 0%, transparent 100%);
}

.result-greeting {
    font-size: 0.875rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.result-score-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.result-score { 
    font-size: 4rem; 
    font-weight: 700; 
    line-height: 1;
    background: linear-gradient(135deg, var(--cyan), #3dba8c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-score-unit {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
}

.result-employee {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.result-employee span {
    font-weight: 600;
    color: var(--cyan-dark);
}

/* 答题统计条 */
.result-stats {
    display: none;
    align-items: center;
    justify-content: center;
    margin: 0 24px 24px;
    padding: 16px 0;
    background: rgba(232, 246, 252, 0.6);
    border-radius: var(--radius-md);
}

.result-stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.result-stat-value {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--cyan-dark);
}

.result-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.result-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(80, 191, 230, 0.25);
}

/* 排行榜区域 */
.ranking-section {
    padding: 0 20px 24px;
    text-align: left;
}

.ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.ranking-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0;
    text-align: left;
}

.ranking-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(0, 54, 82, 0.15);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ranking-refresh-btn:hover {
    color: var(--primary-color);
    border-color: var(--cyan);
    background: rgba(203, 241, 255, 0.3);
    transform: none;
    box-shadow: none;
}

.ranking-list {
    max-height: 360px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.ranking-item + .ranking-item {
    margin-top: 2px;
}

.ranking-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 700;
    flex-shrink: 0;
}

.rank-badge-1 {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #7a5800;
}

.rank-badge-2 {
    background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
    color: #424242;
}

.rank-badge-3 {
    background: linear-gradient(135deg, #ffcc80, #ff9800);
    color: #6d3b00;
}

.ranking-employee {
    font-size: 0.875rem;
    color: var(--text-color);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-me-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--cyan-dark);
    background: rgba(80, 191, 230, 0.2);
    border-radius: 4px;
    vertical-align: middle;
}

.ranking-score {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--cyan-dark);
    flex-shrink: 0;
    margin-left: 12px;
}

.ranking-score small {
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 1px;
}

.ranking-item-current {
    background: rgba(232, 246, 252, 0.7);
    border-left: 3px solid var(--cyan);
    padding-left: 9px;
}

.ranking-item-current .ranking-employee {
    font-weight: 600;
    color: var(--cyan-dark);
}

.ranking-loading,
.ranking-empty {
    padding: 32px 16px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.ranking-note {
    margin-top: 10px;
    font-size: 0.75rem;
    color: #f57c00;
    text-align: center;
}

.points-info { 
    margin-top: var(--spacing-sm); 
    padding: 12px; 
    background-color: var(--primary-light); 
    border-radius: var(--radius-md); 
    text-align: center; 
}

.result-details { 
    display: flex; 
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm); 
    margin-top: var(--spacing-md); 
}

.result-detail { 
    text-align: center; 
    padding: 12px; 
    background-color: #f5f5f5; 
    width: 100%;
    max-width: 600px;
    border-bottom: 1px solid #e0e0e0;
}

/* 排名表格容器 */
.ranking-container {
    margin-top: var(--spacing-md);
    width: 100%;
    max-width: 600px;
}

.ranking-title {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
    font-weight: 600;
}

.detail-value { 
    font-size: 1.5rem; 
    font-weight: bold; 
    color: var(--primary-color); 
}

.detail-label { 
    font-size: 0.85rem; 
    color: #546e7a; 
}

/* 模态框样式 */
.modal { 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.5); 
    display: none; /* 默认不显示，避免遮挡滚动 */
    align-items: center; 
    justify-content: center; 
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.modal.show {
    display: flex; /* 仅在显示时启用布局 */
    opacity: 1;
}

.modal-content { 
    background-color: white; 
    padding: var(--spacing-md); /* 减小内边距 */
    border-radius: var(--radius-lg); 
    width: 90%; 
    max-width: 350px; 
    text-align: center; 
    box-shadow: var(--shadow-lg); 
    transform: translateY(20px);
    opacity: 0;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-title { 
    font-size: 1.2rem; 
    margin-bottom: var(--spacing-sm); 
    font-weight: 600; 
}

/* 简化的模态框内容 */
.modal-simple-text {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
}

.modal-buttons { 
    margin-top: var(--spacing-md); 
    display: flex; 
    justify-content: center; 
    gap: 10px; 
    flex-wrap: wrap;
}

/* 头部操作区 */
.header-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-top: var(--spacing-sm);
    -webkit-overflow-scrolling: touch;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 0;
    box-shadow: var(--shadow-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

th {
    padding: 10px;
    border-bottom: 2px solid var(--primary-color);
    background-color: var(--primary-light);
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.animate-fadeIn {
    animation: fadeIn var(--transition-normal) ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .page-wrapper {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .page-wrapper:has(.card) {
        min-height: calc(100vh - 80px);
    }

    .card {
        max-width: 520px;
    }

    .card-header {
        padding: 28px 32px 22px;
    }

    .card-content {
        padding: 24px 32px 32px;
    }

    .container {
        padding: 0;
    }
    
    h1, .page-title {
        font-size: 1.75rem;
    }

    .question {
        font-size: 1.0625rem;
    }
    
    .question-number {
        width: 26px;
        height: 26px;
    }
    
    .option {
        padding: 14px 16px;
    }
    
    .option-label {
        min-width: 24px;
        height: 24px;
    }
    
    .result-score {
        font-size: 4.5rem;
    }

    .ranking-list {
        max-height: 420px;
    }
    
    button {
        padding: 12px 28px;
        font-size: 1rem;
    }

    .login-btn-container button {
        width: auto;
        min-width: 200px;
    }
    
    .btn-container {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .page-wrapper {
        padding: 12px;
        padding-top: max(8px, env(safe-area-inset-top));
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .card {
        max-width: 100%;
        border-radius: var(--radius-md);
    }

    .card-header {
        padding: 20px 16px 16px;
    }

    .card-content {
        padding: 16px 16px 24px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .quiz-container,
    .result-container {
        border-radius: var(--radius-md);
    }

    .question-container {
        padding: 16px;
    }

    .option {
        padding: 12px 10px;
        min-height: 48px;
        gap: 8px;
    }

    .option-text {
        font-size: 0.875rem;
        line-height: 1.45;
    }

    .btn-container {
        position: static;
        background: none;
        padding: 12px 0 0;
        margin-bottom: 0;
        flex-wrap: wrap;
    }

    .btn-container .btn,
    .btn-container .return-btn {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
        min-height: 44px;
        padding: 10px 12px;
        font-size: 0.9375rem;
    }

    .btn-container .btn:last-child:only-child,
    .btn-container .btn:nth-last-child(1):nth-child(1) {
        flex: 1 1 100%;
    }

    .result-hero {
        padding: 24px 16px 20px;
    }

    .result-score {
        font-size: 3.25rem;
    }

    .result-stats {
        margin: 0 16px 20px;
    }

    .ranking-section {
        padding: 0 12px 20px;
    }

    .captcha-container {
        flex-direction: row;
    }

    .captcha-container input[type="text"] {
        flex: 1 1 100%;
        order: 1;
    }

    .captcha-code {
        order: 2;
        flex: 1;
    }

    .refresh-btn {
        order: 3;
        flex: 0 0 auto;
    }
}

@media (max-width: 380px) {
    .quiz-title {
        font-size: 1rem;
    }

    .quiz-meta {
        font-size: 0.75rem;
    }

    .page-title {
        font-size: 1rem;
    }

    .captcha-container {
        flex-direction: column;
    }

    .captcha-container input[type="text"],
    .captcha-code,
    .refresh-btn {
        width: 100%;
        order: unset;
    }
}