/* ========== 基础重置 ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;}

/* 维吾尔语字体 — ALKATIP Basma 多种系统名称 */
body.lang-ug,
body.lang-ug *,
html[lang="ug"] body,
html[lang="ug"] body * {
    font-family:
        'ALKATIP Basma',
        'Alkatip Basma',
        'ALKATIP_Basma',
        'ALKATIP Basma Tom',
        'Alkatip Basma Tom',
        'ALKATIP',
        'Alkatip',
        'ئالكىتىپ باسما',
        sans-serif !important;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: env(safe-area-inset-top, 16px) env(safe-area-inset-right, 16px) env(safe-area-inset-bottom, 16px) env(safe-area-inset-left, 16px);
}

/* ========== 主容器 ========== */
.app-container {
    width: 100%;
    max-width: 520px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: fadeIn 0.5s ease;
    margin: 0 auto;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 语言切换栏 ========== */
.lang-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.lang-btn {
    padding: 8px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    color: #555;
    font-weight: 500;
    white-space: nowrap;
}

.lang-btn:hover {
    border-color: #4facfe;
    color: #4facfe;
}

.lang-btn:active {
    transform: scale(0.95);
}

.lang-btn.active {
    background: #4facfe;
    color: white;
    border-color: #4facfe;
    box-shadow: 0 2px 8px rgba(79,172,254,0.3);
}

.lang-divider {
    color: #ccc;
    font-size: 14px;
}

/* ========== 头部 ========== */
.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px 20px 28px;
    text-align: center;
}

.header-logo {
    margin-bottom: 12px;
}

.header-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.header h1 {
    font-size: clamp(22px, 5vw, 28px);
    margin-bottom: 6px;
    font-weight: 700;
}

.subtitle {
    font-size: clamp(12px, 2.5vw, 14px);
    opacity: 0.9;
    line-height: 1.5;
}

/* ========== 年龄标记 ========== */
.age-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.25);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.age-badge:hover {
    background: rgba(255,255,255,0.4);
}

.age-badge-edit {
    font-size: 11px;
    opacity: 0.7;
}

/* ========== 年龄选择页 ========== */
#age-select.active {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.age-select-content {
    max-width: 400px;
    padding: 20px;
    animation: fadeIn 0.4s ease;
}

.age-select-icon {
    font-size: 56px;
    margin-bottom: 12px;
}

.age-select-title {
    font-size: clamp(18px, 4vw, 22px);
    color: #333;
    margin: 0 0 6px 0;
}

.age-select-desc {
    font-size: clamp(13px, 2.6vw, 15px);
    color: #777;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.age-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.age-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.age-opt:active {
    transform: scale(0.96);
}

.age-opt:hover {
    border-color: #4facfe;
    box-shadow: 0 4px 16px rgba(79,172,254,0.2);
}

.age-opt-icon {
    font-size: 36px;
}

.age-opt-label {
    font-size: clamp(13px, 2.8vw, 16px);
    color: #333;
    font-weight: 600;
    line-height: 1.5;
}

.age-opt-label small {
    display: block;
    font-weight: 400;
    color: #999;
    font-size: 12px;
    margin-top: 2px;
}

/* ========== 页面切换 ========== */
.page {
    display: none;
    padding: clamp(16px, 3vw, 24px);
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

/* ========== 菜单网格 ========== */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(10px, 2vw, 16px);
    padding: clamp(12px, 3vw, 20px);
}

.menu-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    padding: clamp(18px, 4vw, 24px) clamp(10px, 2vw, 16px);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    user-select: none;
    -webkit-user-select: none;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #4facfe;
}

.menu-card:active {
    transform: scale(0.96);
}

.menu-icon {
    font-size: clamp(32px, 7vw, 44px);
    margin-bottom: 10px;
}

.menu-card h3 {
    font-size: clamp(14px, 3vw, 16px);
    color: #333;
    margin-bottom: 6px;
}

.menu-card p {
    font-size: clamp(11px, 2vw, 12px);
    color: #666;
    line-height: 1.4;
}

/* ========== 页面头部 ========== */
.page-header {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    gap: 10px;
    flex-wrap: wrap;
}

.page-header h2 {
    font-size: clamp(16px, 3.5vw, 20px);
    color: #333;
    flex: 1;
}

.back-btn {
    background: #f0f0f0;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: background 0.2s;
    white-space: nowrap;
}

.back-btn:hover {
    background: #e0e0e0;
}

.back-btn:active {
    transform: scale(0.95);
}

/* ========== 测试说明 ========== */
.test-instructions {
    background: #f0f8ff;
    border-radius: 12px;
    padding: clamp(12px, 2.5vw, 16px);
    margin-bottom: 20px;
    font-size: clamp(13px, 2.5vw, 14px);
    color: #555;
    line-height: 1.7;
}

/* ========== 视力测试 ========== */
.vision-chart {
    text-align: center;
    padding: clamp(20px, 4vw, 30px);
    background: #fafafa;
    border-radius: 16px;
    margin-bottom: 20px;
}

.e-char {
    /* font-size 由 JS 根据视力等级动态设置，CSS 不覆盖 */
    font-weight: bold;
    color: #333;
    display: inline-block;
    transition: transform 0.3s ease;
    user-select: none;
    line-height: 1;
}

.vision-level {
    margin-top: 14px;
    font-size: clamp(14px, 2.8vw, 16px);
    color: #666;
}

.vision-score {
    font-size: clamp(16px, 3vw, 18px);
    color: #4facfe;
    font-weight: bold;
    margin-top: 6px;
}

.direction-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px, 1.5vw, 12px);
    margin-bottom: 16px;
}

.dir-btn {
    padding: clamp(14px, 3vw, 18px) clamp(10px, 2vw, 16px);
    font-size: clamp(16px, 3vw, 18px);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.dir-btn:hover {
    background: #4facfe;
    color: white;
    border-color: #4facfe;
}

.dir-btn:active {
    transform: scale(0.94);
    background: #3d8fd9;
}

/* ========== 色盲测试 ========== */
.color-plate-container {
    text-align: center;
    margin-bottom: 20px;
}

#color-plate {
    width: 100%;
    max-width: 300px;
    height: auto !important;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    /* Canvas 内部坐标 300x300，CSS 只缩放显示，不改变绘制精度 */
    image-rendering: auto;
}

.color-input-area {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    align-items: center;
}

#color-answer {
    flex: 4 1 70%;
    padding: clamp(20px, 4vw, 28px) 24px;
    font-size: clamp(32px, 6vw, 40px);
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
    min-width: 120px;
}

.color-input-area .action-btn {
    flex: 1 0 auto;
    width: auto;
    white-space: nowrap;
    padding: clamp(14px, 2.8vw, 18px) clamp(18px, 4vw, 28px);
    font-size: clamp(16px, 3.5vw, 20px);
    margin-top: 0;
}

#color-answer:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79,172,254,0.15);
}

.progress-text {
    text-align: center;
    color: #999;
    font-size: clamp(12px, 2.5vw, 14px);
    margin-bottom: 14px;
}

/* ========== 散光测试 ========== */
.camera-container {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

#astigmatism-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) scaleX(-1); /* 镜像翻转 */
    object-fit: cover;
}

.overlay-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    pointer-events: none;
    z-index: 2;
}

.camera-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    z-index: 3;
    text-align: center;
    background: rgba(0,0,0,0.6);
    padding: 12px 20px;
    border-radius: 8px;
}

.astigmatism-question {
    text-align: center;
    margin-bottom: 18px;
}

.astigmatism-question p {
    font-size: clamp(14px, 2.8vw, 16px);
    color: #333;
    margin-bottom: 14px;
    line-height: 1.6;
}

.answer-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.answer-btn {
    padding: 14px 20px;
    font-size: clamp(13px, 2.5vw, 15px);
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    flex: 1;
    min-width: 140px;
}

.answer-btn.yes:hover, .answer-btn.yes:active {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.answer-btn.no:hover, .answer-btn.no:active {
    background: #f44336;
    color: white;
    border-color: #f44336;
}

/* ========== 结果展示 ========== */
.result-box {
    padding: clamp(16px, 3vw, 20px);
    border-radius: 12px;
    margin-top: 14px;
    margin-bottom: 14px;
    text-align: center;
    font-size: clamp(14px, 2.8vw, 16px);
    line-height: 1.8;
    white-space: pre-line;
    word-break: break-word;
}

.result-box.normal {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    color: #2e7d32;
}

.result-box.warning {
    background: #fff3e0;
    border: 2px solid #ff9800;
    color: #e65100;
}

.result-box.danger {
    background: #ffebee;
    border: 2px solid #f44336;
    color: #c62828;
}

/* ========== 度数参考区域 ========== */
.degree-ref {
    padding: clamp(14px, 2.5vw, 18px);
    border-radius: 12px;
    margin-top: 12px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    animation: fadeIn 0.4s ease;
}

.degree-title {
    text-align: center;
    font-size: clamp(15px, 3vw, 17px);
    color: #333;
    margin: 0 0 10px 0;
}

.degree-estimate {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: clamp(13px, 2.6vw, 15px);
    line-height: 1.7;
    margin: 0 0 12px 0;
}

.degree-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #ccc, transparent);
    margin: 12px 0;
}

.degree-subtitle {
    text-align: center;
    font-size: clamp(13px, 2.6vw, 15px);
    color: #555;
    margin: 0 0 8px 0;
}

.degree-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.degree-list li {
    padding: 6px 8px 6px 20px;
    font-size: clamp(12px, 2.4vw, 14px);
    color: #555;
    line-height: 1.7;
    position: relative;
}

.degree-list li::before {
    content: '•';
    position: absolute;
    left: 4px;
    font-weight: bold;
    color: #4facfe;
}

.degree-tip {
    margin: 10px 0 0 0;
    padding: 8px 12px;
    font-size: clamp(11px, 2.2vw, 13px);
    color: #888;
    text-align: center;
    background: #fff;
    border-radius: 8px;
    line-height: 1.6;
}

/* ========== 镜片分辨指南 ========== */
.lens-guide-content {
    padding: 0 4px;
}

.lens-intro {
    text-align: center;
    color: #555;
    font-size: clamp(13px, 2.6vw, 15px);
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.lens-method-card {
    background: #fff;
    border-radius: 12px;
    padding: clamp(14px, 2.5vw, 18px);
    margin-bottom: 14px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.lens-method-title {
    font-size: clamp(14px, 2.8vw, 16px);
    color: #333;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lens-method-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: bold;
    flex-shrink: 0;
}

.lens-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    font-size: clamp(12px, 2.4vw, 14px);
    color: #444;
    line-height: 1.7;
    border-bottom: 1px solid #f5f5f5;
}

.lens-item:last-child {
    border-bottom: none;
}

.lens-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 1px;
}

.lens-tag-minus {
    background: #e3f2fd;
    color: #1565c0;
}

.lens-tag-plus {
    background: #fce4ec;
    color: #c62828;
}

.lens-tag-tip {
    background: #fff3e0;
    color: #e65100;
}

.lens-tag-reading {
    background: #f3e5f5;
    color: #7b1fa2;
}

.lens-tag-hyperopia {
    background: #e8f5e9;
    color: #2e7d32;
}

.lens-subtitle {
    font-size: clamp(12px, 2.4vw, 14px);
    color: #777;
    margin: 4px 0 8px 0;
    padding-left: 2px;
}

.lens-summary-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border: 2px solid #d0d9f0;
}

.lens-summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 6px 0;
}

.lens-summary-list li {
    padding: 4px 0 4px 18px;
    font-size: clamp(12px, 2.4vw, 13px);
    color: #555;
    line-height: 1.7;
    position: relative;
}

.lens-summary-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
    font-size: 12px;
}

.lens-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #b0bec5, transparent);
    margin: 12px 0;
}

.lens-quick-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lens-quick-list li {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    line-height: 1.7;
    overflow: visible;
}

.lens-quick-list li span {
    font-size: clamp(12px, 2.5vw, 14px);
    font-weight: 600;
    color: #333;
    word-break: auto-phrase;
    overflow-wrap: break-word;
}

.lens-quick-list li:first-child {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-color: #90caf9;
}

.lens-quick-list li:last-child {
    background: linear-gradient(135deg, #fff3e0, #fce4ec);
    border-color: #ffcc80;
}

/* ========== 通用按钮 ========== */
.action-btn {
    width: 100%;
    padding: clamp(12px, 2.5vw, 14px);
    font-size: clamp(14px, 2.8vw, 16px);
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    margin-top: 6px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.action-btn:active {
    transform: scale(0.97);
}

/* ========== 下载按钮区域 ========== */
.download-area {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.download-btn {
    flex: 1;
    min-width: 140px;
    padding: clamp(10px, 2vw, 12px) clamp(12px, 2vw, 16px);
    font-size: clamp(13px, 2.5vw, 14px);
    background: white;
    color: #4facfe;
    border: 2px solid #4facfe;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    white-space: nowrap;
}

.download-btn:hover {
    background: #4facfe;
    color: white;
}

.download-btn:active {
    transform: scale(0.96);
}

/* ========== Toast 提示 ========== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ========== 提醒横幅 ========== */
.remind-banner {
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: white;
    text-align: center;
    padding: 12px 20px;
    font-size: clamp(13px, 2.5vw, 15px);
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    animation: slideDown 0.4s ease;
    position: relative;
}

.remind-banner::after {
    content: ' ✕';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.7;
}

.remind-banner.hidden {
    display: none;
}

@keyframes slideDown {
    from { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; }
    to { max-height: 80px; padding-top: 12px; padding-bottom: 12px; opacity: 1; }
}

/* 提醒通知按钮 */
.notify-btn {
    background: #fff3e0 !important;
    border-color: #ff9800 !important;
    color: #e65100 !important;
    font-weight: 600 !important;
}

.notify-btn:hover {
    background: #ff9800 !important;
    color: white !important;
    border-color: #ff9800 !important;
}

/* 声音切换按钮 */
#sound-toggle {
    width: 44px;
    height: 38px;
    padding: 4px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== 护眼知识 ========== */
.knowledge-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.knowledge-item {
    background: #f5f7fa;
    border-radius: 12px;
    padding: clamp(12px, 2.5vw, 16px);
    border-left: 4px solid #4facfe;
}

.knowledge-item h4 {
    font-size: clamp(13px, 2.5vw, 15px);
    color: #333;
    margin-bottom: 4px;
}

.knowledge-item p {
    font-size: clamp(12px, 2.2vw, 13px);
    color: #666;
    line-height: 1.5;
}

/* ========== 隐藏类 ========== */
.hidden {
    display: none !important;
}

/* ========== 免责声明 ========== */
.disclaimer {
    margin-top: 20px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    color: white;
    font-size: clamp(10px, 1.8vw, 12px);
    text-align: center;
    max-width: 520px;
    width: 100%;
    line-height: 1.5;
}

/* ========== 手机适配 (< 400px) ========== */
@media (max-width: 400px) {
    body {
        padding: 10px;
    }

    .app-container {
        border-radius: 14px;
    }

    .header {
        padding: 22px 16px;
    }

    .header h1 {
        font-size: 20px;
    }

    .menu-grid {
        gap: 8px;
        padding: 10px;
    }

    .menu-card {
        padding: 14px 8px;
        border-radius: 12px;
    }

    .menu-icon {
        font-size: 30px;
    }

    .e-char {
        /* JS 动态设置，CSS 不覆盖 */
    }

    .dir-btn {
        font-size: 15px;
        padding: 12px 10px;
    }

    .answer-buttons {
        flex-direction: column;
    }

    .answer-btn {
        min-width: unset;
    }

    .lang-bar {
        gap: 4px;
        padding: 8px 10px;
    }

    .lang-btn {
        padding: 6px 14px;
        font-size: 13px;
    }
}

/* ========== 平板适配 (401px - 768px) ========== */
@media (min-width: 401px) and (max-width: 768px) {
    .app-container {
        max-width: 480px;
    }

    .e-char {
        /* JS 动态设置 */
    }
}

/* ========== 电脑适配 (> 768px) ========== */
@media (min-width: 769px) {
    body {
        padding: 30px;
    }

    .app-container {
        max-width: 560px;
        border-radius: 24px;
    }

    .header {
        padding: 32px 28px;
    }

    .header h1 {
        font-size: 30px;
    }

    .menu-grid {
        gap: 16px;
        padding: 24px;
    }

    .menu-card {
        padding: 28px 20px;
        border-radius: 18px;
    }

    .menu-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    }

    .page {
        padding: 28px;
    }

    .e-char {
        /* JS 动态设置 */
    }

    .dir-btn {
        padding: 20px;
        font-size: 20px;
    }

    .action-btn {
        padding: 16px;
        font-size: 17px;
    }
}

/* ========== 大屏电脑 (> 1200px) ========== */
@media (min-width: 1200px) {
    .app-container {
        max-width: 600px;
    }
}

/* ========== RTL 支持 (维吾尔语) ========== */
[dir="rtl"] .knowledge-item {
    border-left: none;
    border-right: 4px solid #4facfe;
}

[dir="rtl"] .page-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .color-input-area {
    flex-direction: row-reverse;
}

[dir="rtl"] .answer-buttons {
    flex-direction: row-reverse;
}

@media (max-width: 400px) {
    [dir="rtl"] .answer-buttons {
        flex-direction: column;
    }
}

/* ========== 仪表盘 ========== */
.dashboard {
    background: linear-gradient(135deg, #e8f5e9, #e3f2fd);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.dash-title {
    font-size: 15px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 600;
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.dash-item {
    background: white;
    border-radius: 12px;
    padding: 10px 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dash-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.dash-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}

.dash-value {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.dash-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.dash-fill {
    height: 100%;
    width: 0%;
    background: #4caf50;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.dash-fill.warn {
    background: #ff9800;
}

.dash-fill.danger {
    background: #f44336;
}

.dash-overall {
    background: white;
    border-radius: 10px;
    padding: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.dash-score-num {
    font-size: 28px;
    font-weight: 800;
    color: #4facfe;
    margin: 0 4px;
}

.dash-grade {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 6px;
}

.dash-grade.good { background: #e8f5e9; color: #2e7d32; }
.dash-grade.fair { background: #fff3e0; color: #e65100; }
.dash-grade.poor { background: #ffebee; color: #c62828; }

/* ========== 立体视觉测试 ========== */
.stereo-canvas-area {
    text-align: center;
    margin-bottom: 16px;
}

#stereo-canvas {
    max-width: 100%;
    height: auto !important;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    background: #f5f5f5;
}

/* ========== 眨眼训练 ========== */
.blink-controls {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.blink-mode-select {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.mode-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
}

.mode-btn.active {
    border-color: #4facfe;
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 600;
}

.blink-timer-setup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
    flex-wrap: wrap;
    gap: 8px;
}

.duration-picker {
    display: flex;
    align-items: center;
    gap: 12px;
}

.duration-picker button {
    width: 36px;
    height: 36px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    background: white;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    color: #333;
}

.duration-picker span {
    font-size: 22px;
    font-weight: 700;
    color: #4facfe;
    min-width: 30px;
    text-align: center;
}

.stop-btn {
    background: #f44336 !important;
}

.blink-display {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.blink-icon {
    font-size: 80px;
    margin-bottom: 12px;
    animation: blinkPulse 1.5s ease-in-out infinite;
}

@keyframes blinkPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.blink-instruction {
    font-size: 18px;
    color: #333;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.5;
}

.blink-countdown {
    font-size: 48px;
    font-weight: 800;
    color: #4facfe;
    margin-bottom: 12px;
}

.blink-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.blink-progress-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    border-radius: 4px;
    transition: width 0.3s linear;
}

.blink-time-left {
    font-size: 14px;
    color: #888;
}

/* ========== 蓝光检测 ========== */
.bluelight-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.bluelight-swatch {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 3px solid transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bluelight-swatch:hover {
    transform: scale(1.05);
    border-color: #4facfe;
}

.bluelight-swatch:active {
    transform: scale(0.95);
}

.bluelight-vs {
    font-size: 20px;
    font-weight: 700;
    color: #999;
}

.bluelight-question-text {
    text-align: center;
    font-size: 15px;
    color: #555;
    margin-bottom: 16px;
}

.bluelight-brightness-area {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.bluelight-brightness-area h4 {
    font-size: 15px;
    color: #333;
    margin-bottom: 6px;
}

.bluelight-brightness-area p {
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
}

.brightness-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #333, #ffeb3b, #fff);
    border-radius: 4px;
    outline: none;
    margin-bottom: 6px;
}

.brightness-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #4facfe;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.brightness-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #aaa;
}

/* ========== 历史记录 ========== */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.history-empty {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 14px;
}

.history-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 14px 16px;
    border-left: 4px solid #4facfe;
    transition: all 0.2s;
}

.history-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.history-card .hist-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}

.history-card .hist-summary {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.history-card .hist-score {
    font-size: 14px;
    font-weight: 700;
    color: #4facfe;
    margin-top: 4px;
}

.history-card .hist-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 4px;
}

.hist-badge.good { background: #e8f5e9; color: #2e7d32; }
.hist-badge.warn { background: #fff3e0; color: #e65100; }
.hist-badge.danger { background: #ffebee; color: #c62828; }

/* ========== 用户中心 ========== */
.user-center-card {
    border: 2px solid #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
}

.uc-container {
    padding: 0 12px 24px;
    max-width: 600px;
    margin: 0 auto;
}

/* 个人资料卡片 */
.uc-profile-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(102,126,234,0.3);
}

.uc-avatar-section {
    cursor: pointer;
    text-align: center;
    position: relative;
}

.uc-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    border: 3px solid rgba(255,255,255,0.5);
    transition: transform 0.2s;
}

.uc-avatar:hover {
    transform: scale(1.1);
}

.uc-avatar-edit {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.8);
    margin-top: 4px;
}

.uc-profile-info {
    flex: 1;
}

.uc-nickname-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.uc-nickname-input {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    outline: none;
    width: 140px;
    transition: background 0.2s;
}

.uc-nickname-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.uc-nickname-input:focus {
    background: rgba(255,255,255,0.35);
    border-color: rgba(255,255,255,0.6);
}

.uc-edit-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uc-age-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
}

/* 头像选择弹窗 */
.uc-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uc-modal-mask {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
}

.uc-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    width: 90%;
    max-width: 360px;
    text-align: center;
    z-index: 1001;
    animation: ucSlideUp 0.3s ease;
}

@keyframes ucSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.uc-modal-content h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #333;
}

.uc-avatar-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

.uc-avatar-opt {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px solid transparent;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.uc-avatar-opt:hover {
    background: #e8e0ff;
    transform: scale(1.1);
}

.uc-avatar-opt.selected {
    border-color: #667eea;
    background: #e8e0ff;
}

.uc-btn {
    padding: 10px 24px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.uc-btn-primary {
    background: #667eea;
    color: #fff;
    width: 100%;
}

.uc-btn-primary:active {
    background: #5a6fd6;
    transform: scale(0.98);
}

/* 签到卡片 */
.uc-checkin-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.uc-checkin-header {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.uc-checkin-icon {
    margin-right: 6px;
}

.uc-checkin-streak {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.uc-streak-num {
    font-size: 28px;
    font-weight: 800;
    color: #ff6b6b;
    margin: 0 4px;
}

.uc-checkin-today {
    text-align: center;
    margin-bottom: 12px;
}

.uc-btn-checkin {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    font-size: 16px;
    padding: 10px 28px;
}
.uc-btn-checkin:active { transform: scale(0.96); }
.uc-btn-checkin:disabled { background: #ccc; cursor: not-allowed; }

.uc-checkin-done {
    display: inline-block;
    font-size: 14px;
    color: #4caf50;
    font-weight: 600;
    padding: 8px 16px;
    background: #e8f5e9;
    border-radius: 10px;
}

.uc-streak-week {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.uc-day-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s;
}

.uc-day-dot.checked {
    background: #4caf50;
    color: #fff;
}

.uc-day-dot.missed {
    background: #f0f0f0;
    color: #bbb;
}

.uc-day-dot.today-unchecked {
    background: #fff3e0;
    color: #ff9800;
    border: 2px dashed #ff9800;
}

/* 统计卡片 */
.uc-stats-card, .uc-badges-card, .uc-settings-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.uc-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px;
}

.uc-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.uc-stat-item {
    text-align: center;
    padding: 12px 8px;
    background: #f8f9ff;
    border-radius: 12px;
}

.uc-stat-val {
    font-size: 24px;
    font-weight: 800;
    color: #667eea;
}

.uc-stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* 分类统计 */
.uc-category-breakdown {
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.uc-cat-row {
    display: flex;
    align-items: center;
    padding: 6px 0;
    gap: 8px;
}

.uc-cat-icon {
    font-size: 18px;
    width: 28px;
    text-align: center;
}

.uc-cat-name {
    flex: 1;
    font-size: 13px;
    color: #555;
}

.uc-cat-count {
    font-size: 13px;
    font-weight: 700;
    color: #667eea;
    margin-right: 8px;
}

.uc-cat-bar {
    width: 60px;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.uc-cat-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* 徽章 */
.uc-badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.uc-badge {
    width: 64px;
    height: 84px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}

.uc-badge.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}

.uc-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffb300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(255,179,0,0.3);
}

.uc-badge.locked .uc-badge-icon {
    background: linear-gradient(135deg, #ddd, #ccc);
    box-shadow: none;
}

.uc-badge-name {
    font-size: 10px;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

/* 设置 */
.uc-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.15s;
}

.uc-setting-item:last-child { border-bottom: none; }
.uc-setting-item:active { background: #f8f9ff; margin: 0 -16px; padding: 12px 16px; }

.uc-setting-status {
    color: #4caf50;
    font-size: 13px;
    font-weight: 600;
}

.uc-setting-arrow {
    font-size: 20px;
    color: #ccc;
}

.uc-setting-danger span:first-child {
    color: #e53935;
}

/* 云同步卡片 */
.uc-sync-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.uc-sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0f7ff;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}
.uc-sync-status.syncing { background: #fff8e1; }
.uc-sync-status.synced { background: #e8f5e9; }
.uc-sync-status.error { background: #fff2f0; }
.uc-sync-info { margin-bottom: 12px; }
.uc-sync-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    color: #666;
}
.uc-sync-row span:last-child {
    font-weight: 600;
    color: #333;
}
.uc-sync-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.uc-btn-sync {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 14px;
    padding: 8px 20px;
}
.uc-btn-sync:active { transform: scale(0.96); }
.uc-btn-sync:disabled { background: #ccc; cursor: not-allowed; }

/* 自动同步开关 */
.uc-auto-sync-row { display: flex; align-items: center; }
.uc-switch-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    position: relative;
}
.uc-switch-label input[type="checkbox"] {
    display: none;
}
.uc-switch-track {
    width: 42px;
    height: 24px;
    background: #ddd;
    border-radius: 12px;
    position: relative;
    transition: background 0.3s;
}
.uc-switch-track::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.uc-switch-label input:checked + .uc-switch-track {
    background: #667eea;
}
.uc-switch-label input:checked + .uc-switch-track::after {
    transform: translateX(18px);
}

/* 微信一键登录 */
.uc-wx-login-box {
    margin-bottom: 16px;
}
.wx-login-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.wx-not-login {
    padding: 24px 16px;
}
.wx-login-icon {
    display: block;
    font-size: 36px;
    margin-bottom: 8px;
}
.wx-login-text {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}
.wx-login-btn {
    display: inline-block;
    padding: 10px 28px;
    background: linear-gradient(135deg, #07c160, #06ad56);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(7,193,96,0.35);
    transition: all .2s;
}
.wx-login-btn:active { transform: scale(.96); }
.wx-login-btn.wx-disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}
.wx-logged-in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
}
.wx-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wx-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #07c160;
    object-fit: cover;
}
.wx-user-detail {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}
.wx-user-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.wx-user-tag {
    font-size: 12px;
    color: #07c160;
}
.wx-unbind-btn {
    padding: 6px 14px;
    background: #f5f5f5;
    color: #999;
    border: none;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
}
.wx-unbind-btn:hover { background: #ffebee; color: #e74c3c; }

/* 套餐信息卡片 */
.uc-plan-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.uc-plan-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    color: #666;
}
.uc-plan-row:not(:last-child) { border-bottom: 1px solid #f5f5f5; }
.uc-plan-value { font-weight: 600; color: #333; }

/* 支付弹窗 */
.pay-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.6); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    animation: fadeIn .2s;
}
@keyframes fadeIn { from { opacity: 0; } }
.pay-modal {
    background: #fff; border-radius: 20px; padding: 28px;
    min-width: 320px; max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.pay-modal h3 { font-size: 18px; margin-bottom: 16px; text-align: center; }
.pay-info { margin-bottom: 20px; }
.pay-row {
    display: flex; justify-content: space-between; padding: 8px 12px;
    font-size: 14px; color: #555;
    background: #f8f9fa; border-radius: 6px; margin-bottom: 4px;
}
.pay-row.pay-highlight {
    background: #fff3cd; color: #856404; font-weight: 700; font-size: 15px;
}
.pay-danger { color: #e74c3c !important; font-weight: 700; }
.pay-buttons { display: flex; gap: 10px; }
.pay-btn-recharge {
    flex: 1; padding: 12px; background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.pay-btn-cancel {
    flex: 1; padding: 12px; background: #f0f0f0; color: #666;
    border: none; border-radius: 10px; font-size: 14px; cursor: pointer;
}
.pay-btn-recharge:active, .pay-btn-cancel:active { transform: scale(.97); }

.recharge-options { margin-bottom: 16px; }
.recharge-option {
    display: flex; align-items: center; gap: 12px; padding: 14px;
    border: 1px solid #eee; border-radius: 12px; margin-bottom: 8px; cursor: pointer;
    transition: .15s;
}
.recharge-option:hover { background: #f0f4ff; border-color: #667eea; }
.ro-icon { font-size: 28px; }
.recharge-option b { display: block; font-size: 14px; }
.recharge-option small { color: #999; font-size: 12px; }

/* 版本信息 */
.uc-version-info {
    text-align: center;
    font-size: 12px;
    color: #bbb;
    padding: 20px 0 8px;
}

/* ========== 小屏适配 (< 400px) 追加 ========== */
@media (max-width: 400px) {
    .dash-grid {
        grid-template-columns: 1fr 1fr;
    }
    .bluelight-swatch {
        width: 100px;
        height: 100px;
    }
    .blink-icon {
        font-size: 60px;
    }
    .blink-countdown {
        font-size: 36px;
    }
}
