* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    background: var(--app-background-color, #C9D3FD);
    min-height: 100vh;
    height: 100%;
    width: 100%;
    padding: 0;
    color: #333;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-wrap: wrap;
    vertical-align: top;
}



/* ============================================
   马卡龙紫色主题样式（PRD要求）
   ============================================ */

:root {
    --primary-color: #E1C2FF;       /* 辅助色：马卡龙紫色 */
    --btn-blue-color: #5343FF;      /* 主按钮颜色：蓝色*/
    --btn-purple-color: #D37CDE;    /* 主按钮颜色：玫红色*/
    --secondary-color: #006daf;     /* 辅助色：深紫色 */
    --background-color: #FFFFFF;    /* 软件背景色：白色 */
    --btn-cut-background-blue-color: #C9D9FD;  /* 按钮剪刀：蓝色*/
    --btn-cut-border-blue-color: #808EFF;  /* 按钮剪刀-边框：蓝色*/
    --card-background-blue-color: #66E2F6;  /* 首页卡片：蓝色*/
    --card-border-blue-color: #8BE9FF;  /* 首页卡片-边框：蓝色*/
    --card-background-purple-color: #ECA8FE;  /* 首页卡片：紫色*/
    --card-border-purple-color: #FFBDF8;  /* 首页卡片-边框：紫色*/
    --text-color: #333333;          /* 文字颜色 */
    --border-radius: 12px;          /* 圆角 */
    --back-button-color: rgba(0, 0, 203, 0.15); /* 返回按钮颜色，初始值：#0000CB，15%透明度 */
}


/* 添加iOS 动画 专用CSS修复，粘贴子deepseek 在 CSS 中添加这些样式 */
.word-row {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* 移除点击高亮 */
    touch-action: manipulation; /* 告诉浏览器这是可操作元素 */
}

.scissors-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* 确保按钮在 iOS 上可点击 */
    min-height: 44px; /* Apple 推荐的最小点击区域 */
    min-width: 44px;
}



* {
    -webkit-touch-callout: none; /* 禁用长按菜单 */
    -webkit-user-select: none;    /* 禁用文本选择 */
    user-select: none;
}


/*——————————————————————————————————— 截止此处 ———————————————————————————————————————*/

h3 {
    color: rgba(43, 1, 137, 1);
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    margin-bottom: 20px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-menu a:hover {
    background: #f0f0f0;
}

.nav-user {
    color: #667eea;
    font-weight: bold;
    padding: 8px 15px;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0px 0px;
    max-width: 100%;
    vertical-align: top;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

/* 移动端优化 */
@media (min-width: 768px) {
    .container {
        max-width: 1920px;
        padding: 0px 0px;
    }
}

/* 首页样式 - 已在上面更新，这里保留兼容 */

.avatar-link {
    display: inline-block;
}




/* 登录/注册表单 - 移动端优化 */
.login-form {
    background: white;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 30px;
    padding-bottom: 30px;
    border-radius: 120px 120px 30px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-top: 50px;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin-left: 0px;
    margin-right: 0px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-form h2 {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 50px;
    padding-top: 0px;
    color: rgba(43, 1, 137, 1);
    font-size: 32px;
    font-weight: 900;
}

@media (min-width: 768px) {
    .login-form {
        max-width: 400px;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 30px;
        padding-bottom: 30px;
        border-radius: 120px 120px 30px 30px;
        margin-top: 50px;
        width: auto;
        height: auto;
        margin-left: 0px;
        margin-right: 0px;
    }
    
    .login-form h2 {
        font-size: 32px;
        font-weight: 900;
        color: rgba(43, 1, 137, 1);
        padding-top: 0px;
    }
}

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

.form-group:first-child {
    margin-top: 20px;
}

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

.form-group input {
    width: 100%;
    min-height: 48px; /* 移动端触摸目标最小高度 */
    font-size: 16px; /* 防止iOS自动缩放 */
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: rgba(255, 255, 255, 1);
}

#passwordPhoneInput,
#passwordInput,
#confirmPasswordInput {
    background-color: rgba(255, 255, 255, 1);
    color: rgba(43, 1, 137, 1);
    font-size: 18px;
    font-family: -apple-system;
}

#passwordPhoneInput {
    font-weight: 800;
    color: rgba(43, 1, 137, 1);
}

#passwordInput {
    font-weight: 800;
}

#confirmPasswordInput {
    font-weight: 800;
}

#phoneInput {
    background-color: rgba(255, 255, 255, 1);
    color: rgba(43, 1, 137, 1);
    font-size: 18px;
    font-family: -apple-system;
    font-weight: 600;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* 按钮样式 */
/* 按钮样式 - 移动端优化 */
.btn-primary, .btn-secondary, .btn-success, .btn-danger {
    min-height: 48px; /* 移动端触摸目标最小高度 */
    padding: 12px 24px;
    font-size: 14px;
    border-radius: 18px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation; /* 优化触摸响应 */
    user-select: none;
}

.btn-primary:active, .btn-secondary:active, .btn-success:active, .btn-danger:active {
    transform: scale(0.98);
}

@media (min-width: 768px) {
    .btn-primary, .btn-secondary, .btn-success, .btn-danger {
        min-height: 44px;
        padding: 10px 20px;
    }
    
    .btn-primary:hover, .btn-secondary:hover {
        transform: translateY(-1px);
    }
}

.btn-primary {
    background: rgba(83, 67, 255, 1);
    color: white;
    border-radius: 18px;
    box-shadow: 0px 3px 6px 0px rgba(0, 29, 255, 0.15);
    vertical-align: middle;
    width: 100%;
    margin-left: 0px;
    margin-right: 0px;
}

button.btn,
button.btn-primary {
    width: fit-content;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary.btn-large {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 18px;
    min-width: 120px;
    height: 40px;
    width: auto;
    background: #5343FF !important;
    color: white !important;
    border: none;
}

.btn-primary.btn-large:hover {
    background: #4333EF !important;
    color: white !important;
}

.btn-primary.btn-large:active:not(:disabled) {
    background: #3323DF !important;
    color: white !important;
    transform: scale(0.98);
}

.btn-primary.btn-large:disabled {
    color: white !important;
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

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

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-large {
    padding-left: 40px;
    padding-right: 40px;
    padding-top: 15px;
    padding-bottom: 15px;
    font-size: 20px;
    height: 66px;
    margin-top: 16px;
}

/* 开始识记按钮特定样式 */
#startLearningBtn {
    height: 48px;
    width: auto;
    border-radius: 18px;
    box-shadow: 0px 3px 6px 0px rgba(0, 29, 255, 0.3);
    margin-top: 10px;
    margin-bottom: 10px;
    font-family: -apple-system;
    font-size: 16px;
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 开始测试按钮特定样式 - 与开始识记按钮保持一致 */
#startTestBtn {
    height: 66px;
    width: auto;
    border-radius: 18px;
    box-shadow: 0px 3px 6px 0px rgba(0, 29, 255, 0.3);
    margin-top: 0px;
    margin-bottom: 10px;
    font-family: -apple-system;
    font-size: 20px;
}

/* 趣味复习按钮特定样式 */
#funReviewBtn {
    height: 66px;
    border-radius: 18px;
    font-family: -apple-system;
    font-size: 20px;
    box-shadow: 0px 3px 6px 0px rgba(253, 70, 211, 0.3);
    margin-top: 10px;
    margin-bottom: 10px;
}

/* 统计卡片 */
.welcome-title {
    text-align: center;
    color: white;
    font-size: 32px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-card h3 {
    color: #666;
    font-size: 16px;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 42px;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0;
}

.stat-subtitle {
    color: #999;
    font-size: 14px;
}

/* 操作按钮区域 */
.action-buttons {
    text-align: center;
    margin: 40px 80px;
    padding: 40px 60px;
    width: auto;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 提醒框 */
.reminder {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.reminder p {
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
}

/* 单词卡片 */
.word-card {
    background: white;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-top: 10px;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 100px;
}

.word-header {
    text-align: center;
    margin-bottom: 30px;
}

.word-header h2 {
    font-size: 56px;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.phonetic {
    color: #666;
    font-size: 24px;
    font-style: italic;
    margin-bottom: 10px;
    font-family: 'AlimamaFangYuanTiVF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-feature-settings: 'liga' 1, 'kern' 1;
    -webkit-font-feature-settings: 'liga' 1, 'kern' 1;
    -moz-font-feature-settings: 'liga' 1, 'kern' 1;
}

.review-info {
    color: #999;
    font-size: 14px;
    margin-top: 10px;
}

.word-content {
    margin: 30px 0;
    flex-grow: 1;
}

.meaning, .example {
    margin-bottom: 25px;
}

.meaning h3, .example h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 20px;
}

.meaning p, .example p {
    font-size: 18px;
    line-height: 1.8;
    color: #555;
}

.example p {
    font-style: italic;
    color: #666;
    border-left: 4px solid #667eea;
    padding-left: 15px;
}

.word-actions {
    text-align: center;
    margin-top: 0px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    height: 44px;
    vertical-align: middle;
    padding: 6px;
}

.word-actions button {
    min-width: 10px;
}

/* 消息卡片 */
.message-card {
    background: white;
    padding: 60px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-top: 50px;
    text-align: center;
}

.message-card h2 {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 20px;
}

.message-card p {
    font-size: 20px;
    color: #666;
    margin-bottom: 30px;
}

/* 阶段进度条 */
.stage-progress {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.stage-progress-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 18px;
}

.stage-label {
    color: #666;
    font-weight: 600;
}

.stage-current {
    color: #667eea;
    font-size: 24px;
    font-weight: bold;
}

.stage-separator {
    color: #999;
    font-size: 20px;
}

.stage-total {
    color: #999;
    font-size: 20px;
}

.stage-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.stage-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.stage-indicators {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
}

.stage-dot {
    flex: 1;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s;
}

.stage-dot.completed {
    background: #28a745;
    transform: scale(1.2);
}

.stage-dot.current {
    background: #667eea;
    transform: scale(1.4);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* 单词选择页面 */
.select-words-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-top: 30px;
}

.select-words-card h2 {
    text-align: center;
    color: #667eea;
    font-size: 28px;
    margin-bottom: 15px;
}

.select-words-desc {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

.stage-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.stage-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stage-info-item .stage-number {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
}

.stage-info-item .stage-label {
    font-size: 14px;
    color: #666;
}

.select-words-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 15px;
}

.selected-count {
    font-weight: 600;
    color: #667eea;
    font-size: 16px;
}

.words-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.word-item {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
}

.word-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.word-checkbox {
    display: block;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.word-checkbox-input {
    display: none;
}

.word-checkbox-input:checked + .word-checkbox-content {
    background: #e8f0fe;
    border-color: #667eea;
}

.word-checkbox-input:checked + .word-checkbox-content .word-checkbox-word {
    color: #667eea;
    font-weight: bold;
}

.word-checkbox-content {
    padding: 20px;
    transition: all 0.3s;
    position: relative;
}

.word-checkbox-content::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 4px;
    transition: all 0.3s;
}

.word-checkbox-input:checked + .word-checkbox-content::before {
    background: #667eea;
    border-color: #667eea;
}

.word-checkbox-input:checked + .word-checkbox-content::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.word-checkbox-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    padding-right: 40px;
}

.word-checkbox-word {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.word-checkbox-phonetic {
    font-size: 14px;
    color: #999;
    font-style: italic;
    font-family: 'AlimamaFangYuanTiVF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-feature-settings: 'liga' 1, 'kern' 1;
    -webkit-font-feature-settings: 'liga' 1, 'kern' 1;
    -moz-font-feature-settings: 'liga' 1, 'kern' 1;
}

.word-checkbox-meaning {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.6;
}

.word-checkbox-example {
    font-size: 13px;
    color: #777;
    font-style: italic;
    border-left: 3px solid #667eea;
    padding-left: 10px;
    margin-bottom: 8px;
}

.word-checkbox-stages {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.stages-label {
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
}

.form-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

/* 错误和成功消息 */
.error {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
}

.success {
    background: #efe;
    color: #3c3;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3c3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0px 0px;
    }
    
    .login-form {
        margin-top: 50px;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 30px;
        padding-bottom: 30px;
        border-radius: 120px 120px 30px 30px;
        width: 100%;
        height: auto;
        margin-left: 0px;
        margin-right: 0px;
    }
    
    .word-card {
        padding: 30px 20px;
    }
    
    .word-header h2 {
        font-size: 40px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .words-grid {
        grid-template-columns: 1fr;
    }
    
    .stage-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .select-words-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons a {
        width: 100%;
        text-align: center;
    }
    
    .stage-indicators {
        gap: 3px;
    }
    
    .stage-dot {
        height: 8px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}



/* 功能模块卡片 - 移动端优化 */
.module-cards {
    width: 100%;
    display: -webkit-box; /* iOS Safari 兼容 */
    display: -webkit-flex; /* iOS Safari 兼容 */
    display: flex;
    -webkit-box-orient: vertical; /* iOS Safari 兼容 */
    -webkit-box-direction: normal; /* iOS Safari 兼容 */
    -webkit-flex-direction: column; /* iOS Safari 兼容 */
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 20px;
    padding-right: 20px;
    /* iOS 14.5以下兼容：使用margin替代gap */
}

/* iOS 14.5以下兼容：gap fallback */
@supports not (gap: 16px) {
    .module-cards > * + * {
        margin-top: 16px;
    }
}

.module-card {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    -webkit-transition: all 0.2s ease; /* iOS Safari 兼容 */
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(225, 194, 255, 0.15);
    position: relative;
    border: 3px solid transparent;
    min-height: 120px;
    height: auto;
    display: -webkit-box; /* iOS Safari 兼容 */
    display: -webkit-flex; /* iOS Safari 兼容 */
    display: flex;
    -webkit-box-orient: vertical; /* iOS Safari 兼容 */
    -webkit-box-direction: normal; /* iOS Safari 兼容 */
    -webkit-flex-direction: column; /* iOS Safari 兼容 */
    flex-direction: column;
    -webkit-box-pack: center; /* iOS Safari 兼容 */
    justify-content: center;
    -webkit-box-align: center; /* iOS Safari 兼容 */
    align-items: center;
    gap: 20px;
    /* iOS Safari 兼容性优化 */
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    will-change: transform;
}

/* 词汇量检测卡片样式 */
.module-card-vocabulary-test {
    background: var(--card-background-blue-color);
    border-radius: 30px;
    border-width: 3px;
    border-style: solid;
    border-color: var(--card-border-blue-color);
    box-shadow: 0px 24px 36px -10px rgba(0, 111, 255, 0.5);
}

.module-card-vocabulary-test h3 {
    font-size: 30px;
    font-weight: 600;
    color: #50C4D3;
    margin-bottom: 8px;
}

.module-card-vocabulary-test p {
    color: #ffffff;
    font-size: 13px;
    line-height: 1.5;
}

/* 单词速记卡片样式 */
.module-card-word-memory {
    background: var(--card-background-purple-color);
    border-radius: 30px;
    border-width: 3px;
    border-style: solid;
    border-color: var(--card-border-purple-color);
    box-shadow: 0px 24px 36px -10px rgba(153, 0, 255, 0.5);
}

.module-card-word-memory h3 {
    font-size: 32px;
    font-weight: 600;
    color: rgba(255, 255, 255, 1);
    margin-bottom: 8px;
}

.module-card-word-memory p {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
}

.module-card:active {
    -webkit-transform: scale(0.98) translateZ(0);
    transform: scale(0.98) translateZ(0);
    box-shadow: 0 1px 5px rgba(225, 194, 255, 0.2);
}

/* iOS 14.5以下兼容：gap fallback for module-card */
@supports not (gap: 20px) {
    .module-card > * + * {
        margin-top: 20px;
    }
}

@media (min-width: 768px) {
    .module-cards {
        grid-template-columns: repeat(2, 1fr);
        display: -ms-grid; /* IE兼容 */
        display: grid;
        -ms-grid-columns: 1fr 20px 1fr; /* IE兼容 */
        gap: 20px;
    }
    
    /* iOS 14.5以下兼容：grid gap fallback */
    @supports not (gap: 20px) {
        .module-cards {
            grid-column-gap: 20px;
            grid-row-gap: 20px;
        }
    }
    
    .module-card {
        padding: 30px;
        min-height: auto;
    }
    
    .module-card:hover {
        -webkit-transform: translateY(-5px); /* iOS Safari 兼容 */
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(225, 194, 255, 0.3);
    }
    
    .module-card-vocabulary-test:hover {
        border-color: var(--primary-color);
    }
    
    .module-card-word-memory:hover {
        border-color: rgba(168, 229, 255, 1);
    }
}

.module-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.module-card.disabled:hover {
    -webkit-transform: none; /* iOS Safari 兼容 */
    transform: none;
}

.module-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

/* 通用样式 - 如果没有特定类，使用默认样式 */
.module-card h3 {
    font-size: 30px;
    font-weight: 600;
    color: rgba(43, 1, 137, 1);
    margin-bottom: 8px;
}

.module-card p {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.vip-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* 底部导航 - 移动端优化 */
.bottom-nav {
    display: -webkit-box; /* iOS Safari 兼容 */
    display: -webkit-flex; /* iOS Safari 兼容 */
    display: flex;
    -webkit-box-pack: distribute; /* iOS Safari 兼容 */
    justify-content: space-around;
    -webkit-box-align: center; /* iOS Safari 兼容 */
    align-items: center;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom)); /* iOS安全区域 */
    padding-bottom: calc(12px + -webkit-env(safe-area-inset-bottom)); /* iOS Safari 兼容 */
    background: var(--footer-background-color, rgba(255, 255, 255, 0));
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 10px rgba(225, 194, 255, 0.2);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* iOS Safari 兼容 */
    z-index: 1000;
    /* iOS Safari fixed定位优化 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.nav-item {
    display: -webkit-box; /* iOS Safari 兼容 */
    display: -webkit-flex; /* iOS Safari 兼容 */
    display: flex;
    -webkit-box-orient: vertical; /* iOS Safari 兼容 */
    -webkit-box-direction: normal; /* iOS Safari 兼容 */
    -webkit-flex-direction: column; /* iOS Safari 兼容 */
    flex-direction: column;
    -webkit-box-align: center; /* iOS Safari 兼容 */
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    text-decoration: none;
    color: #666;
    -webkit-transition: all 0.2s; /* iOS Safari 兼容 */
    transition: all 0.2s;
    min-width: 60px;
    -webkit-tap-highlight-color: transparent;
}

/* iOS 14.5以下兼容：gap fallback for nav-item */
@supports not (gap: 4px) {
    .nav-item > * + * {
        margin-top: 4px;
    }
}

.nav-item:active {
    -webkit-transform: scale(0.95); /* iOS Safari 兼容 */
    transform: scale(0.95);
}

.nav-icon {
    font-size: 24px;
    color: rgba(255, 255, 255, 1);
}

.nav-label {
    font-size: 12px;
}

@media (min-width: 768px) {
    .bottom-nav {
        max-width: 600px;
        padding: 20px;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

.nav-item:hover {
    color: var(--secondary-color);
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 1);
}

.nav-label {
    font-size: 12px;
}

/* VIP提示 */
.vip-notice {
    background: -webkit-linear-gradient(135deg, var(--primary-color), var(--secondary-color)); /* iOS Safari 兼容 */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    margin-top: 20px;
    margin-bottom: 80px;
}

.vip-notice p {
    margin-bottom: 15px;
    font-size: 16px;
}

.btn-vip {
    display: inline-block;
    background: white;
    color: var(--secondary-color);
    padding: 10px 30px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    -webkit-transition: transform 0.3s; /* iOS Safari 兼容 */
    transition: transform 0.3s;
    -webkit-tap-highlight-color: transparent; /* iOS Safari 移除点击高亮 */
}

.btn-vip:hover {
    -webkit-transform: scale(1.05); /* iOS Safari 兼容 */
    transform: scale(1.05);
}

.btn-vip:active {
    -webkit-transform: scale(0.98); /* iOS Safari 兼容 */
    transform: scale(0.98);
}

/* 词汇量检测页面样式 */
.vocabulary-test-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding-top: 30px;
    padding-right: 20px;
    padding-bottom: 0px;
    padding-left: 20px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 10px;
}

.page-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    width: 100%;
}

/* 版本选择 */
.version-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    padding:30px;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.version-card {
    background: var(--background-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.version-card:hover {
    background: var(--primary-color);
    color: white;
}

.version-card.selected {
    background-color: var(--card-background-blue-color);
    color: white;
    border-color: var(--card-border-blue-color);
}

.version-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.version-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

/* 测试进度 */
.test-progress {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 157, 255, 1) 0%, rgba(255, 0, 111, 1) 100%);
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* 测试时长提示 */
.test-time-hint {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 40px;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(225, 194, 255, 0.2);
    border-radius: 8px;
}

/* 测试内容 */
.test-content {
    padding-left: 20px;
    padding-right: 20px;
}

/* 单词显示 */
.word-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px;
    background: var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(225, 194, 255, 0.15);
}

.word-text {
    font-size: 48px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.word-phonetic {
    font-size: 18px;
    color: #999;
    font-style: italic;
    font-family: 'AlimamaFangYuanTiVF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-feature-settings: 'liga' 1, 'kern' 1;
    -webkit-font-feature-settings: 'liga' 1, 'kern' 1;
    -moz-font-feature-settings: 'liga' 1, 'kern' 1;
}

/* 倒计时 */
.countdown-timer {
    font-size: 24px;
    font-weight: 600;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    text-align: center;
}

/* 倒计时在测试内容区域（已废弃，保留以防其他地方使用） */
.test-content .countdown-timer {
    text-align: center;
    font-size: 36px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

/* 答案选项 */
.answer-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.option-btn {
    padding: 20px;
    background: var(--background-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
    /* iOS Safari 兼容性优化 */
    -webkit-tap-highlight-color: transparent; /* 移除点击高亮 */
    -webkit-appearance: none; /* 移除默认样式 */
    -webkit-touch-callout: none; /* 禁用长按菜单 */
    -webkit-user-select: none; /* 禁用文本选择 */
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation; /* 优化触摸响应 */
    -webkit-backface-visibility: hidden; /* 硬件加速 */
    backface-visibility: hidden;
    -webkit-transform: translateZ(0); /* 强制硬件加速 */
    transform: translateZ(0);
    will-change: transform; /* 提示浏览器优化 */
}

.option-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.option-btn.selected {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 不认识按钮 - 与选项按钮大小一致 */
#unknownBtn {
    padding: 20px;
    background-color: rgba(143, 143, 143, 1);
    border: 2px solid rgba(92, 92, 92, 1);
    border-radius: var(--border-radius);
    font-size: 16px;
    width: 100%;
    transition: all 0.3s;
    /* iOS Safari 兼容性优化 */
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

#unknownBtn:hover {
    transform: scale(1.05);
}

#unknownBtn:active {
    transform: scale(0.98);
}

/* 测试结果 */
.test-result-card {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 4px 15px rgba(225, 194, 255, 0.15);
    display: flex;
    flex-direction: column;
}

.result-info-table {
    margin-bottom: 30px;
}

.info-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e8e8e8;
}

.info-section:last-child {
    border-bottom: none;
}

.info-section-title {
    color: var(--secondary-color);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #666;
    font-size: 16px;
}

.info-value {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 16px;
}

.info-value-large {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 28px;
    text-align: center;
    display: block;
    padding: 10px 0;
}

.result-analysis,
.result-evaluation,
.learning-suggestions {
    margin-bottom: 25px;
}

.result-analysis h3,
.result-evaluation h3,
.learning-suggestions h3 {
    color: rgba(43, 1, 137, 1);
    margin-bottom: 10px;
    font-size: 18px;
}

.result-analysis p,
.result-evaluation p {
    color: #666;
    line-height: 1.8;
}

.learning-suggestions ul {
    list-style: none;
    padding: 0;
}

.learning-suggestions li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: #666;
    line-height: 1.8;
}

.learning-suggestions li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 底部固定栏 - 词汇量检测页面 */
.bottom-fixed-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--footer-background-color);
    padding: 0px 66px;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    vertical-align: bottom;
    z-index: 100;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .module-cards {
        grid-template-columns: 1fr;
    }
    
    .version-select-grid {
        grid-template-columns: 1fr;
    }
    
    .answer-options {
        grid-template-columns: 1fr;
    }
    
    .word-text {
        font-size: 36px;
    }
    
    .home-header {
        padding: 15px;
    }
    
    .container {
        padding-bottom: 0px;
    }
}

/* 统一返回按钮样式 */
.back-btn {
    background: var(--back-button-color, rgba(0, 0, 203, 0.15));
    color: rgba(112, 104, 198, 1); /* 文字颜色设为透明，因为使用图标 */
    -webkit-text-fill-color: rgba(112, 104, 198, 1); /* iOS Safari 兼容 */
    border: none !important;
    border-radius: 0 8px 8px 0 !important;
    -webkit-border-radius: 0 8px 8px 0 !important; /* iOS Safari 兼容 */
    padding: 12px 20px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important; /* iOS Safari 兼容 */
    transition: all 0.3s ease !important;
    -webkit-transition: all 0.3s ease !important; /* iOS Safari 兼容 */
    margin: 0 !important;
    margin-left: 0 !important;
    align-self: flex-start !important;
    text-align: center !important; /* 改为居中，因为使用图标 */
    display: inline-flex !important; /* 改为flex以便图标居中 */
    align-items: center !important;
    -webkit-align-items: center !important; /* iOS Safari 兼容 */
    justify-content: center !important;
    -webkit-justify-content: center !important; /* iOS Safari 兼容 */
    box-sizing: border-box !important;
    -webkit-box-sizing: border-box !important; /* iOS Safari 兼容 */
    -webkit-tap-highlight-color: transparent !important; /* iOS Safari 触摸高亮优化 */
    touch-action: manipulation !important; /* 优化触摸响应 */
    user-select: none !important; /* 防止文本选择 */
}

.back-btn img {
    width: 24px;
    height: 24px;
    display: block;
    background-color: unset;
    background: unset;
    border-width: 0px;
    border-color: rgba(0, 0, 0, 0);
    border-style: none;
    border-image: none;
    color: rgba(255, 240, 247, 0);
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 0px;
    padding-right: 0px;
}

.more-affect-btn {
    background: var(--back-button-color, rgba(0, 0, 203, 0.15));
    color: rgba(112, 104, 198, 1); /* 文字颜色设为透明，因为使用图标 */
    -webkit-text-fill-color: rgba(112, 104, 198, 1); /* iOS Safari 兼容 */
    border: none !important;
    border-radius:  8px 0 0 8px !important;
    -webkit-border-radius: 8px 0 0 8px !important; /* iOS Safari 兼容 */
    padding: 12px 20px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important; /* iOS Safari 兼容 */
    transition: all 0.3s ease !important;
    -webkit-transition: all 0.3s ease !important; /* iOS Safari 兼容 */
    margin: 0 !important;
    margin-right: 0 !important;
    align-self: flex-start !important;
    text-align: center !important; /* 改为居中，因为使用图标 */
    display: inline-flex !important; /* 改为flex以便图标居中 */
    align-items: center !important;
    -webkit-align-items: center !important; /* iOS Safari 兼容 */
    justify-content: center !important;
    -webkit-justify-content: center !important; /* iOS Safari 兼容 */
    box-sizing: border-box !important;
    -webkit-box-sizing: border-box !important; /* iOS Safari 兼容 */
    -webkit-tap-highlight-color: transparent !important; /* iOS Safari 触摸高亮优化 */
    touch-action: manipulation !important; /* 优化触摸响应 */
    user-select: none !important; /* 防止文本选择 */
}

.back-btn:hover {
    background: var(--back-button-color, rgba(0, 0, 203, 0.15)) !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important; /* iOS Safari 兼容 */
    box-shadow: none !important;
    -webkit-box-shadow: none !important; /* iOS Safari 兼容 */
    padding: 12px 20px !important;
    margin: 0 !important;
    margin-left: 0 !important;
}

.more-affect-btn:hover {
    background: var(--back-button-color, rgba(0, 0, 203, 0.15)) !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important; /* iOS Safari 兼容 */
    padding: 12px 20px !important;
    margin: 0 !important;
    margin-left: 0 !important;
}

.back-btn:active {
    background: var(--back-button-color, rgba(0, 0, 203, 0.15)) !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important; /* iOS Safari 兼容 */
    transform: translateY(1px) !important;
    -webkit-transform: translateY(1px) !important; /* iOS Safari 兼容 */
}

.more-affect-btn:active {
    background: var(--back-button-color, rgba(0, 0, 203, 0.15)) !important;
    transform: translateY(1px) !important;
    -webkit-transform: translateY(1px) !important; /* iOS Safari 兼容 */
}

/* ============================================
   统一的页面 Header 样式
   ============================================ */

/* 页面 Header 容器 - 统一布局 */
.page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: -webkit-flex; /* iOS Safari 兼容 */
    display: flex;
    -webkit-justify-content: space-between; /* iOS Safari 兼容 */
    justify-content: space-between;
    -webkit-align-items: center; /* iOS Safari 兼容 */
    align-items: center;
    padding: 0;
    min-height: 75px; /* 统一最小高度 */
    height: 75px; /* 统一固定高度 */
    background-color: var(--header-background-color, var(--app-background-color, #C9D3FD));
    -webkit-background-color: var(--header-background-color, var(--app-background-color, #C9D3FD)); /* iOS Safari 兼容 */
    padding-top: calc(12px + env(safe-area-inset-top)); /* 支持安全区域（刘海屏等） */
    -webkit-padding-top: calc(12px + env(safe-area-inset-top)); /* iOS Safari 兼容 */
    padding-left: 0 !important; /* 返回按钮紧贴左侧 */
    -webkit-padding-left: 0 !important; /* iOS Safari 兼容 */
    padding-right: calc(20px + env(safe-area-inset-right));
    -webkit-padding-right: calc(20px + env(safe-area-inset-right)); /* iOS Safari 兼容 */
    margin-bottom: 0;
    background: var(--header-background-color, var(--app-background-color, #C9D3FD)); /* Header背景颜色 */
    -webkit-background: var(--header-background-color, var(--app-background-color, #C9D3FD)); /* iOS Safari 兼容 */
    box-shadow: none;
    -webkit-box-shadow: none; /* iOS Safari 兼容 */
    box-sizing: border-box;
    -webkit-box-sizing: border-box; /* iOS Safari 兼容 */
    opacity: 1;
    -webkit-opacity: 1; /* iOS Safari 兼容 */
    border: none;
    -webkit-border: none; /* iOS Safari 兼容 */
    -webkit-backface-visibility: hidden; /* iOS Safari 性能优化 */
    backface-visibility: hidden;
    -webkit-transform: translateZ(0); /* iOS Safari 硬件加速 */
    transform: translateZ(0);
}

/* Header模糊效果 */
.page-header.header-blur-enabled {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* iOS Safari 兼容 */
}

/* 页面头部按钮 - 统一样式 */
.page-header .back-btn {
    background: var(--back-button-color, rgba(0, 0, 203, 0.15));
    color: rgba(112, 104, 198, 1); /* 文字颜色设为透明，因为使用图标 */
    -webkit-text-fill-color: rgba(112, 104, 198, 1); /* iOS Safari 兼容 */
    border: none;
    border-radius: 0 8px 8px 0; /* 左侧圆角 */
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: none;
    -webkit-box-shadow: none; /* iOS Safari 兼容 */
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease; /* iOS Safari 兼容 */
    margin: 0;
    margin-left: 0 !important; /* 左侧已经通过 padding-left: 0 紧贴边缘 */
    flex-shrink: 0;
    white-space: nowrap;
    width: 56px;
    box-sizing: border-box;
    -webkit-box-sizing: border-box; /* iOS Safari 兼容 */
    display: inline-flex;
    align-items: center;
    -webkit-align-items: center; /* iOS Safari 兼容 */
    justify-content: center;
    -webkit-justify-content: center; /* iOS Safari 兼容 */
    -webkit-tap-highlight-color: transparent; /* iOS Safari 触摸高亮优化 */
    touch-action: manipulation; /* 优化触摸响应 */
    user-select: none; /* 防止文本选择 */
}

.page-header .more-affect-btn {
    background: var(--back-button-color, rgba(0, 0, 203, 0.15));
    border: none;
    border-radius: 8px 0 0 8px; /* 右侧圆角 */
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: none;
    -webkit-box-shadow: none; /* iOS Safari 兼容 */
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease; /* iOS Safari 兼容 */
    margin: 0;
    margin-right: calc(-20px - env(safe-area-inset-right)) !important; /* 确保右侧按钮紧贴边缘 */
    flex-shrink: 0;
    white-space: nowrap;
    box-sizing: border-box;
    -webkit-box-sizing: border-box; /* iOS Safari 兼容 */
    display: inline-flex;
    align-items: center;
    -webkit-align-items: center; /* iOS Safari 兼容 */
    justify-content: center;
    -webkit-justify-content: center; /* iOS Safari 兼容 */
    -webkit-tap-highlight-color: transparent; /* iOS Safari 触摸高亮优化 */
    touch-action: manipulation; /* 优化触摸响应 */
    user-select: none; /* 防止文本选择 */
}

.page-header .back-btn img {
    width: 24px;
    height: 24px;
    display: block;
    background-color: unset;
    background: unset;
    border-width: 0px;
    border-color: rgba(0, 0, 0, 0);
    border-style: none;
    border-image: none;
    color: rgba(255, 240, 247, 0);
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 0px;
    padding-right: 0px;
}

/* 按钮交互状态 */
.page-header .back-btn:hover {
    color: transparent; /* 返回按钮保持透明，因为使用图标 */
    -webkit-text-fill-color: transparent; /* iOS Safari 兼容 */
    background: var(--back-button-color, rgba(0, 0, 203, 0.15));
    box-shadow: none;
    -webkit-box-shadow: none; /* iOS Safari 兼容 */
    padding: 12px 20px;
}

.page-header .more-affect-btn:hover {
    background: var(--back-button-color, rgba(0, 0, 203, 0.15));
    box-shadow: none;
    -webkit-box-shadow: none; /* iOS Safari 兼容 */
    padding: 12px 20px;
}

.page-header .back-btn:hover {
    margin-left: -20px;
}

.page-header .more-affect-btn:hover {
    margin-right: -20px;
}

.page-header .back-btn:active {
    background: var(--back-button-color, rgba(0, 0, 203, 0.15));
    color: transparent; /* 返回按钮保持透明，因为使用图标 */
    -webkit-text-fill-color: transparent; /* iOS Safari 兼容 */
    transform: translateY(1px);
    -webkit-transform: translateY(1px); /* iOS Safari 兼容 */
    padding: 12px 20px;
}

.page-header .more-affect-btn:active {
    background: var(--back-button-color, rgba(0, 0, 203, 0.15));
    transform: translateY(1px);
    -webkit-transform: translateY(1px); /* iOS Safari 兼容 */
    padding: 12px 20px;
}

.page-header .back-btn:active {
    margin-left: -20px;
}

.page-header .more-affect-btn:active {
    margin-right: -20px;
}

/* 选择词库按钮 - 移除背景色 */
#selectLibraryBtn,
.page-header #selectLibraryBtn {
    background-color: var(--back-button-color) !important;
    background: var(--back-button-color) !important;
    font-family: -apple-system !important;
    color: rgba(255, 255, 255, 1) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 1) !important; /* iOS Safari 兼容 */
    margin-right: 0px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

#selectLibraryBtn:hover,
.page-header #selectLibraryBtn:hover {
    color: rgba(255, 255, 255, 1) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 1) !important; /* iOS Safari 兼容 */
    margin-right: 0px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

#selectLibraryBtn:active,
.page-header #selectLibraryBtn:active {
    color: rgba(255, 255, 255, 1) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 1) !important; /* iOS Safari 兼容 */
    margin-right: 0px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

/* 页面标题组 */
.page-header .page-title-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 10px;
}

.page-header .page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--secondary-color, #7068C6);
    margin: 0;
    line-height: 1.2;
}

.page-header .page-title:only-child {
    margin: 0;
}

.page-header .page-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-color, #7068C6);
    margin: 4px 0 0 0;
    line-height: 1.2;
}

/* 右侧按钮区域 */
.page-header > button:not(.back-btn),
.page-header > button:not(.more-affect-btn),
.page-header > div:last-child:not(.page-title-group) {
    flex-shrink: 0;
    min-width: 60px;
    text-align: right;
}

/* 占位元素 */
.page-header > div[style*="width"] {
    flex-shrink: 0;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .page-header {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        -webkit-padding-left: 0; /* iOS Safari 兼容 */
        padding-right: 0;
        -webkit-padding-right: 0; /* iOS Safari 兼容 */
        width: calc(100%);
        -webkit-width: calc(100%); /* iOS Safari 兼容 */
        min-height: 75px; /* 统一最小高度 */
        height: 75px; /* 统一固定高度 */
        background-color: var(--header-background-color, var(--app-background-color)) !important; /* Header背景颜色 */
        background: var(--header-background-color, var(--app-background-color)) !important; /* iOS Safari 兼容 */
        -webkit-background-color: var(--header-background-color, var(--app-background-color)) !important; /* iOS Safari 兼容 */
        -webkit-background: var(--header-background-color, var(--app-background-color)) !important; /* iOS Safari 兼容 */
    }
    
    .page-header .back-btn, .page-header .more-affect-btn {
        padding: 10px 16px;
        font-size: 15px;
    }
    
    .page-header .back-btn {
        margin-left: 0 !important;
    }
    
    .page-header .more-affect-btn {
        margin-right: calc(-16px - env(safe-area-inset-right)) !important;
    }
    
    .page-header .back-btn:hover {
        background: var(--back-button-color, rgba(0, 0, 203, 0.15));
        color: transparent; /* 返回按钮保持透明，因为使用图标 */
        -webkit-text-fill-color: transparent; /* iOS Safari 兼容 */
        padding: 10px 16px;
        margin-left: 0 !important;
    }
    
    .page-header .more-affect-btn:hover {
        background: var(--back-button-color, rgba(0, 0, 203, 0.15));
        color: white; /* 确保文字颜色为白色 */
        -webkit-text-fill-color: white; /* iOS Safari 兼容 */
        padding: 10px 16px;
        margin-right: calc(-16px - env(safe-area-inset-right)) !important;
    }
    
    .page-header .back-btn:active {
        background: var(--back-button-color, rgba(0, 0, 203, 0.15));
        color: transparent; /* 返回按钮保持透明，因为使用图标 */
        -webkit-text-fill-color: transparent; /* iOS Safari 兼容 */
        padding: 10px 16px;
        margin-left: 0 !important;
    }
    
    .page-header .more-affect-btn:active {
        background: var(--back-button-color, rgba(0, 0, 203, 0.15));
        color: white; /* 确保文字颜色为白色 */
        -webkit-text-fill-color: white; /* iOS Safari 兼容 */
        padding: 10px 16px;
        margin-right: calc(-16px - env(safe-area-inset-right)) !important;
    }
    
    /* 选择词库按钮在移动端的颜色设置 */
    #selectLibraryBtn,
    .page-header #selectLibraryBtn {
        color: rgba(255, 255, 255, 1) !important;
        -webkit-text-fill-color: rgba(255, 255, 255, 1) !important;
        margin-right: 0px !important;
    }
    
    #selectLibraryBtn:hover,
    .page-header #selectLibraryBtn:hover {
        color: rgba(255, 255, 255, 1) !important;
        -webkit-text-fill-color: rgba(255, 255, 255, 1) !important;
        margin-right: 0px !important;
    }
    
    #selectLibraryBtn:active,
    .page-header #selectLibraryBtn:active {
        color: rgba(255, 255, 255, 1) !important;
        -webkit-text-fill-color: rgba(255, 255, 255, 1) !important;
        margin-right: 0px !important;
    }
    
    .page-header .page-title {
        font-size: 18px;
    }
    
    .page-header .page-subtitle {
        font-size: 12px !important;
    }
}

/* 图片通用样式 */
img {
    /*border-radius: 8px;*/
    /*border-top-left-radius: 8px;*/
    /*border-top-right-radius: 8px;*/
    /*border-bottom-right-radius: 8px;*/
    /*border-bottom-left-radius: 8px;*/
    /*border-style: solid;*/
    /*border-width: 2px;*/
    /*border-color: rgba(255, 198, 216, 1);*/
    /*color: rgba(255, 240, 247, 1);*/
    /*background-color: rgba(255, 240, 246, 1);*/
    /*padding-top: 4px;*/
    /*padding-bottom: 4px;*/
    /*padding-left: 4px;*/
    /*padding-right: 4px;*/
    /*width: 30px;*/
    /*height: 30px;*/
}

/* 关闭抽屉按钮中的图片样式 */
#closeDrawerBtn img {
    padding-top: 7px;
    padding-bottom: 7px;
}

/* ============================================
   问卷页面样式优化
   ============================================ */

/* 问卷头部 */
.questionnaire-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 0;
}

.questionnaire-icon {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.questionnaire-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    background-image: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.questionnaire-subtitle {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* 问卷表单容器 */
.questionnaire-form {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px 100px;
}

/* 表单卡片 */
.form-card {
    background: var(--background-color);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(225, 194, 255, 0.12);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-card:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.form-card:focus-within::before {
    opacity: 1;
}

/* 表单卡片头部 */
.form-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.form-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(80, 196, 211, 0.1));
    border-radius: 12px;
    flex-shrink: 0;
}

.form-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
}

.required {
    color: #ff4757;
    font-weight: 700;
    margin-left: 4px;
}

.optional {
    color: #999;
    font-weight: 400;
    font-size: 14px;
}

/* 表单输入框 */
.form-select,
.form-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    color: var(--text-color);
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    font-family: inherit;
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px;
    padding-right: 50px;
    cursor: pointer;
}

.form-select:focus,
.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background-color: #fafbff;
}

.form-select:hover,
.form-input:hover {
    border-color: var(--primary-color);
}

.form-select option {
    padding: 12px;
}

.form-select optgroup {
    font-weight: 600;
    color: var(--secondary-color);
    padding: 8px 0;
}

/* 输入框包装器（带后缀） */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .form-input {
    padding-right: 50px;
}

.input-suffix {
    position: absolute;
    right: 20px;
    color: #999;
    font-size: 16px;
    pointer-events: none;
}

/* 表单提示文字 */
.form-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #999;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.form-hint::before {
    content: '💡';
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* 测试模式选择器 */
.test-mode-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.mode-option {
    display: block;
    cursor: pointer;
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(80, 196, 211, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mode-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.mode-card:hover::before {
    opacity: 1;
}

.mode-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(80, 196, 211, 0.08));
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.mode-card.selected::before {
    opacity: 1;
}

.mode-option input[type="radio"]:checked + .mode-card {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(80, 196, 211, 0.08));
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.mode-option input[type="radio"]:checked + .mode-card::before {
    opacity: 1;
}

.mode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.mode-icon {
    font-size: 32px;
    display: block;
}

.mode-badge {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.mode-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.mode-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.mode-card-adaptive .mode-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 底部按钮优化 */
.bottom-fixed-bar .btn-primary.btn-large {
    min-width: 200px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.bottom-fixed-bar .btn-primary.btn-large:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.bottom-fixed-bar .btn-primary.btn-large:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.bottom-fixed-bar .btn-primary.btn-large:not(:disabled):active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.bottom-fixed-bar .btn-primary.btn-large:hover .btn-icon {
    transform: translateX(4px);
}

/* 问卷页面响应式设计 */
@media (max-width: 768px) {
    .questionnaire-title {
        font-size: 26px;
    }
    
    .questionnaire-subtitle {
        font-size: 14px;
    }
    
    .questionnaire-form {
        padding: 0 16px 100px;
    }
    
    .form-card {
        padding: 20px;
        border-radius: 16px;
    }
    
    .form-label {
        font-size: 16px;
    }
    
    .test-mode-selector {
        grid-template-columns: 1fr;
    }
    
    .mode-card {
        padding: 20px;
    }
    
    .bottom-fixed-bar .btn-primary.btn-large {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .questionnaire-icon {
        font-size: 48px;
    }
    
    .questionnaire-title {
        font-size: 24px;
    }
    
    .form-card {
        padding: 16px;
    }
    
    .form-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

/* 表单验证动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}
