: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);
}

#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遮罩层 */
.iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(2px);
}

.iframe-overlay::after {
    content: '⏳';
    font-size: 3rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@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: 600px;
    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-group label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: var(--text-main);
}

/* 选项组 */
.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;
}

@media (max-width: 1024px) {
    main {
        flex-direction: column;
    }
}

/* 弹窗模态框 */
.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;
    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: help;
    transition: all 0.2s ease;
}

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

.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); } }
