:root {
    /* 科技风配色 */
    --primary-color: #2563eb; /* 科技蓝 */
    --primary-hover: #1d4ed8;
    --secondary-color: #06b6d4; /* 霓虹青 */
    --accent-color: #f97316; /* 活力橙 (积分/奖品) */
    --bg-color: #f1f5f9; /* 浅灰背景 */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --danger-color: #ef4444;
    
    /* 尺寸与圆角 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* 字体 */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 通用容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部导航 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

header h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-main);
    font-weight: 800;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

header h1 .en {
    font-size: 1.4rem;
    font-weight: 800;
    opacity: 1;
}

header h1 span {
    display: block;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    gap: 8px;
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn:hover:not(:disabled) { 
    background: #f8fafc; 
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn:active:not(:disabled) { 
    transform: scale(0.98) translateY(0); 
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
    color: var(--text-muted);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover:not(:disabled) { 
    filter: brightness(1.1); 
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-secondary { 
    background: white; 
    color: var(--text-main); 
    border: 1px solid var(--border-color); 
}
.btn-secondary:hover:not(:disabled) { 
    background: #f8fafc; 
    border-color: #cbd5e1; 
}

.btn-danger { 
    background: var(--danger-color); 
    color: white;
    border: none;
}
.btn-danger:hover:not(:disabled) { 
    background: #dc2626; 
}

.btn-jump { 
    background: linear-gradient(135deg, var(--secondary-color), #0891b2);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.3);
    flex: 0 0 auto;
    min-width: 100px;
}
.btn-jump:hover:not(:disabled) { 
    filter: brightness(1.1);
    box-shadow: 0 4px 8px rgba(6, 182, 212, 0.4);
}

/* 内容控制区域 */
.content-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.content-controls .btn {
    min-width: 120px;
}

.btn-icon {
    font-size: 0.9rem;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.btn:hover:not(:disabled) .btn-icon {
    opacity: 1;
}

.btn-nav-prev:hover:not(:disabled) .btn-icon {
    transform: translateX(-2px);
}

.btn-nav-next:hover:not(:disabled) .btn-icon {
    transform: translateX(2px);
}

.btn-caption {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.05));
    border-color: rgba(249, 115, 22, 0.3);
}

.btn-caption:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.08));
    border-color: rgba(249, 115, 22, 0.5);
}

/* showJsonNameBtn 的 ？ 图标样式，与 💬 呼应 */
#showJsonNameBtn .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25em;
    height: 1.25em;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 1em;
    font-weight: 700;
    margin-right: 5px;
    flex-shrink: 0;
    vertical-align: middle;
    /* 修正文字基线导致的偏移 */
    line-height: 0;
}

#showJsonNameBtn .btn-icon svg {
    width: 0.72em;
    height: 0.72em;
    display: block;
}

#contentInfo {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    min-width: 120px;
    justify-content: center;
}

#totalContents {
    color: var(--primary-color);
    font-weight: 700;
}

/* 跳转控制区域 */
.content-jump-controls {
    display: flex;
    gap: 12px;
    align-items: stretch;
    padding: 16px;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.content-jump-controls input[type="number"] {
    flex: 1;
    margin: 0;
    min-width: 0;
}

/* 快捷键提示区域 */
.shortcuts-info {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(6, 182, 212, 0.05));
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.shortcuts-info small {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.shortcuts-info small::before {
    content: '⌨️';
    font-size: 1.1rem;
    margin-right: 6px;
}

/* 加载指示器 */
.loading-indicator {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    margin: 16px 0;
    color: var(--text-main);
    font-weight: 500;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* iframe遮罩层：引擎未就绪或 JSON 尚未送入前挡住数字人 */
.iframe-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(2px);
}

.iframe-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.iframe-overlay .loading-spinner {
    border-color: rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
}

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

/* 卡片样式 */
.card, .video-section, .questionnaire-section, .auth-container, .lottery-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.6);
    margin-bottom: 24px;
    transition: transform 0.2s ease;
}

/* 表单元素 */
input[type="text"], input[type="password"], input[type="email"], input[type="number"], select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: #f8fafc;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

/* 视频/Iframe 容器 */
.content-container {
    position: relative;
    width: 100%;
    height: 500px; 
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.video-container video, .iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 问卷区域 */
.questionnaire-section h2 {
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
    color: var(--text-main);
    margin-bottom: 20px;
}

/* 问卷内容容器 - 添加滚动条 */
#questionnaireContent {
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    margin-bottom: 16px;
}

/* 自定义滚动条样式（Webkit浏览器） */
#questionnaireContent::-webkit-scrollbar {
    width: 10px;
}

#questionnaireContent::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

#questionnaireContent::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

#questionnaireContent::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Firefox滚动条样式 */
#questionnaireContent {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.form-group {
    background: #f8fafc;
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.form-actions-row1,
.form-actions-row2 {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-actions-row1 .btn,
.form-actions-row2 .btn {
    flex: 1 1 auto;
    min-width: 140px;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: var(--text-main);
}

/* 1-5 评分滑条 */
.rating-slider {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 460px;
}
.rating-slider-value {
    min-height: 1.6em;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
}
.rating-slider input[type="range"] {
    width: 100%;
    accent-color: var(--primary-color);
    cursor: pointer;
}
.rating-slider-labels {
    display: flex;
    justify-content: space-between;
    gap: 4px;
}
.rating-slider-tick {
    flex: 1;
    border: 1px solid var(--border-color);
    background: #fff;
    color: #475569;
    border-radius: 8px;
    padding: 4px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.rating-slider-tick:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 选项组 */
.rating-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.rating-group label {
    font-weight: normal;
    cursor: pointer;
    padding: 8px 16px;
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.rating-group label:hover { border-color: var(--primary-color); }
.rating-group input[type="radio"]:checked + span, 
.rating-group input[type="radio"]:checked {
    accent-color: var(--primary-color);
}

/* 用户信息栏 */
.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.user-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-info a:not(.btn) {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.user-info a:not(.btn):hover {
    color: var(--primary-hover);
}

.lang-hidden {
    display: none !important;
}

.zh,
.en {
    display: inline;
}

header h1 .zh,
header h1 .en {
    display: block;
}

/* 主布局：视频 + 问卷并排 */
main {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: nowrap;
}

main .video-section,
main .questionnaire-section {
    flex: 1 1 0;
}

/* 弹窗模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6); /* 深色遮罩 */
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 消息提示 */
.message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    border-radius: 50px;
    color: white;
    font-weight: 500;
    z-index: 2000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.27);
    box-shadow: var(--shadow-lg);
}

.message.show { transform: translateX(-50%) translateY(0); }
.message.info { background: var(--primary-color); }
.message.success { background: var(--success-color); }
.message.error { background: var(--danger-color); }

/* 标注状态区域 */
.annotation-status {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.annotation-status summary {
    cursor: pointer;
    padding: 16px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    list-style: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease;
}

.annotation-status summary::-webkit-details-marker {
    display: none;
}

.annotation-status summary::before {
    content: '▼';
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary-color);
    transition: transform 0.2s ease;
}

.annotation-status:not([open]) summary::before {
    transform: rotate(-90deg);
}

.annotation-status summary:hover {
    background: rgba(255, 255, 255, 0.95);
}

.status-summary {
    display: flex;
    gap: 24px;
    padding: 20px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.status-summary > span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    flex: 1;
    min-width: 200px;
}

.status-summary > span > span:first-child {
    font-weight: 600;
    color: var(--text-muted);
}

.status-summary #annotatedCount {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-left: 4px;
}

.status-summary #currentSet {
    font-weight: 600;
    color: var(--primary-color);
    word-break: break-word;
}

.annotated-list {
    padding: 20px;
    background: white;
}

.annotated-list h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    border-left: 3px solid var(--secondary-color);
    padding-left: 12px;
}

.annotated-videos-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 60px;
}

.annotation-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
    cursor: default;
    transition: all 0.2s ease;
}

.annotation-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* 磁贴悬停时显示删除按钮 */
.annotation-tile {
    position: relative;
}

/* ===================== 已标注项目悬停弹窗 ===================== */
.annotation-popup {
    position: fixed;
    z-index: 9999;
    width: 320px;
    max-width: calc(100vw - 32px);
    max-height: 480px;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.10);
    border: 1px solid rgba(99, 102, 241, 0.15);
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px) scale(0.97);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.annotation-popup.ap-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ap-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, var(--primary-color, #2563eb), var(--primary-hover, #1d4ed8));
    border-radius: 12px 12px 0 0;
}

.ap-index {
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    letter-spacing: 0.03em;
}

.ap-time {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.75);
}

.ap-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ap-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ap-question {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.ap-answer {
    font-size: 0.88rem;
    color: #1e293b;
    line-height: 1.55;
    word-break: break-word;
}

.ap-answer-empty {
    font-size: 0.85rem;
    color: #94a3b8;
    font-style: italic;
}

/* issue-list 答案样式 */
.ap-issue-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ap-issue-item {
    background: #fff8f0;
    border: 1px solid #fed7aa;
    border-radius: 7px;
    padding: 7px 10px;
}

.ap-issue-badge {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 4px;
    padding: 1px 7px;
    margin-bottom: 5px;
    letter-spacing: 0.02em;
}

.ap-issue-field {
    font-size: 0.83rem;
    color: #374151;
    line-height: 1.5;
}

.ap-issue-field-key {
    font-weight: 600;
    color: #6b7280;
}

.ap-divider {
    border: none;
    border-top: 1px solid #f1f5f9;
    margin: 0;
}

.tile-delete-btn {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: #ef4444;
    color: white;
    font-size: 10px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    z-index: 1;
    padding: 0;
}

.annotation-tile:hover .tile-delete-btn {
    opacity: 1;
    transform: scale(1);
}

.tile-delete-btn:hover {
    background: #b91c1c !important;
    transform: scale(1.15) !important;
}

/* 删除确认状态 */
.annotation-tile.tile-confirming {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    animation: tile-shake 0.25s ease;
}

/* 删除中/消失动画 */
.annotation-tile.tile-deleting {
    transform: scale(0) !important;
    opacity: 0 !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
}

.no-annotations {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    font-style: italic;
}

.no-annotations::before {
    content: '📝 ';
    font-size: 1.3rem;
    margin-right: 8px;
}

/* 登录/注册页特定样式 */
.auth-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    overflow: hidden;
}
.auth-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37,99,235,0.1) 0%, transparent 60%);
    animation: rotate 60s linear infinite;
}
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* --- 响应式设计 --- */

/* 1. 平板电脑和小型笔记本 (屏幕宽度 <= 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }

    header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        text-align: center;
    }

    header h1 {
        margin-bottom: 10px;
    }

    .user-info {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* 强制垂直布局 */
    main {
        flex-direction: column;
    }

    /* 视频和问卷区域占满宽度 */
    main .video-section,
    main .questionnaire-section {
        flex: none;
        width: 100%;
    }

    .content-container {
        height: 400px; /* 稍微减小高度 */
    }
}

/* 2. 手机端 (屏幕宽度 <= 768px) */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 12px 16px;
    }

    header h1 {
        font-size: 1.3rem;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        width: 100%; /* 按钮在手机上占满宽度 */
        justify-content: center;
        margin-bottom: 8px; /* 增加按钮间距 */
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }

    /* 内容控制区调整 */
    .content-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .content-controls .btn {
        width: 100%;
    }

    #contentInfo {
        width: 100%;
        text-align: center;
        order: -1; /* 将信息显示在按钮上方 */
        margin-bottom: 10px;
    }

    /* 跳转控制区 */
    .content-jump-controls {
        flex-direction: column;
    }

    /* 视频高度自适应，但保持最小高度 */
    .content-container {
        height: 0;
        padding-bottom: 56.25%; /* 16:9 比例 */
        min-height: 250px;
    }

    /* 问卷区域 */
    .questionnaire-section {
        padding: 16px;
    }

    #questionnaireContent {
        max-height: none; /* 手机上取消最大高度，允许页面滚动 */
        overflow-y: visible;
    }

    .form-group {
        padding: 12px;
    }

    /* 选项组垂直排列 */
    .rating-group {
        flex-direction: column;
        gap: 8px;
    }

    .rating-group label {
        width: 100%;
        text-align: left;
        padding: 10px 16px;
        border-radius: 8px; /* 在垂直排列时圆角稍微小一点 */
        box-sizing: border-box;
    }

    /* 模态框全屏 */
    .modal-content {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* 登录/注册页面适配 */
    .auth-container {
        padding: 24px;
        max-width: 100%;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    /* 标注状态区域适配 */
    .status-summary {
        flex-direction: column;
        gap: 12px;
    }
    
    .status-summary > span {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}

/* 3. 超小屏幕 (屏幕宽度 <= 480px) */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
    }
    
    .user-info {
        font-size: 0.8rem;
    }
    
    .annotation-tile {
        min-width: 36px;
        height: 36px;
        font-size: 0.8rem;
        padding: 0 8px;
    }
}

/* ── Issue-list 题型样式 ─────────────────────────────────────────────────── */
.issue-list-container {
    margin-top: 8px;
}

.issue-list-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 10px;
}

.issue-item {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 14px;
    background: #f8fafc;
    position: relative;
}

.issue-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.issue-item-num {
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    font-size: 0.9rem;
}

.issue-type-select {
    flex: 1;
    min-width: 180px;
    padding: 5px 8px;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #fff;
    color: var(--text-main);
}

.issue-remove-btn {
    padding: 4px 10px;
    font-size: 0.85rem;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
}
.issue-remove-btn:hover { background: #dc2626; }

.issue-item-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.issue-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.issue-field-group label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
}

.issue-field-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
}

.issue-field-group textarea {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    resize: vertical;
    background: #fff;
    color: var(--text-main);
    transition: border-color 0.2s;
}
.issue-field-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

.issue-add-btn {
    margin-top: 4px;
    font-size: 0.9rem;
    padding: 6px 16px;
    background: #e0f2fe;
    color: var(--primary-color);
    border: 1px dashed var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.issue-add-btn:hover { background: #bae6fd; }

/* ── Annotation Help Tour ─────────────────────────────────────────────── */
.language-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-help {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(6, 182, 212, 0.08));
    border-color: rgba(37, 99, 235, 0.22);
    color: var(--primary-color);
}

.help-tour-root {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
}

.help-tour-shade {
    position: fixed;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(1px);
    pointer-events: auto;
    z-index: 10000;
    transition: left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease;
}

.help-tour-highlight-box {
    position: fixed;
    border: 3px solid rgba(37, 99, 235, 0.96);
    border-radius: var(--radius-md);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 18px 44px rgba(37, 99, 235, 0.32);
    pointer-events: none;
    z-index: 10001;
    transition: left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease;
}

.help-tour-card {
    position: fixed;
    width: min(420px, calc(100vw - 24px));
    padding: 22px 24px 18px;
    background: #fff;
    color: var(--text-main);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(226, 232, 240, 0.9);
    pointer-events: auto;
    z-index: 10002;
}

.help-tour-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #f8fafc;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
}

.help-tour-close:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.help-tour-kicker {
    margin-bottom: 6px;
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.help-tour-title {
    margin: 0 34px 10px 0;
    font-size: 1.12rem;
    line-height: 1.35;
    color: var(--text-main);
}

.help-tour-body {
    margin: 0;
    color: #475569;
    line-height: 1.7;
    font-size: 0.95rem;
}

.help-tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
}

.help-tour-progress {
    color: var(--text-muted);
    font-size: 0.88rem;
    white-space: nowrap;
}

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

.help-tour-actions .btn {
    min-width: 86px;
    padding: 8px 14px;
    margin-bottom: 0;
}

@media (max-width: 720px) {
    .help-tour-card {
        width: auto;
        padding: 20px 18px 16px;
    }

    .help-tour-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .help-tour-actions {
        width: 100%;
    }

    .help-tour-actions .btn {
        width: 100%;
    }
}

.avatar-speed-controls {
    margin: 10px 0;
    padding: 0;
    border: 0;
}
.avatar-speed-controls legend { font-weight: 600; }
.avatar-speed-controls label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px 5px 0;
    cursor: pointer;
}
.avatar-speed-controls input { width: auto; margin: 0; }
