/* 双任务测试页面特有样式 */

/* 测试区域样式 */
.dual-task-area {
    position: relative;
}

/* 进度条样式 */
.test-progress-bar {
    width: 100%;
    margin-bottom: 15px;
}

.progress-track {
    width: 100%;
    height: 6px;
    background-color: rgba(229, 231, 235, 0.5);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: right;
    margin-top: 4px;
}

/* 双任务显示区域 */
.dual-task-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
    position: relative;
}

.primary-task, .secondary-task {
    width: 100%;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(229, 231, 235, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dark-theme .primary-task, .dark-theme .secondary-task {
    background-color: rgba(31, 41, 55, 0.7);
    border: 1px solid rgba(55, 65, 81, 0.5);
}

.task-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-align: center;
}

.primary-stimulus-container, .secondary-stimulus-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    position: relative;
}

.instruction-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 10px;
    font-weight: 500;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.dark-theme .instruction-text {
    background-color: rgba(31, 41, 55, 0.8);
}

/* 测试状态样式 */
.test-box.waiting .instruction-text {
    display: block;
}

.test-box.testing .instruction-text {
    display: none;
}

.test-box.waiting .response-buttons {
    display: none;
}

.test-box.testing .response-buttons {
    display: flex;
    flex-direction: column;
}

/* 结果文本样式 */
.result-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 10px 0;
    text-align: center;
}

.result-text.excellent {
    color: #10b981;
}

.result-text.good {
    color: #3b82f6;
}

.result-text.average {
    color: #f59e0b;
}

.result-text.slow {
    color: #ef4444;
}

/* 结果详情样式 */
.result-details {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 10px 0;
}

.result-item {
    text-align: center;
}

.result-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 5px;
}

.result-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* 响应按钮样式 */
.dual-task-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.response-buttons {
    display: none;
    width: 100%;
    margin-top: 15px;
}

.primary-response, .secondary-response {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.response-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    background-color: #f3f4f6;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.dark-theme .response-btn {
    background-color: #374151;
    color: var(--text-primary);
}

.response-btn:hover {
    background-color: #e5e7eb;
    transform: translateY(-2px);
}

.dark-theme .response-btn:hover {
    background-color: #4b5563;
}

.primary-btn {
    border-bottom: 3px solid #6366f1;
}

.secondary-btn {
    border-bottom: 3px solid #8b5cf6;
}

/* 刺激物样式 */
.visual-stimulus {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.visual-stimulus.left {
    background-color: #3b82f6;
}

.visual-stimulus.right {
    background-color: #ef4444;
}

.auditory-stimulus {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.memory-stimulus {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 2px;
}

/* 历史记录样式 */
.history-section {
    margin-top: 20px;
}

.history-section h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.history-container {
    position: relative;
    min-height: 100px;
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.dark-theme .history-container {
    background-color: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(55, 65, 81, 0.5);
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.empty-history {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    padding: 20px;
    text-align: center;
}

.empty-history i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.clear-btn {
    background-color: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 5px;
}

.clear-btn:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.clear-btn i {
    font-size: 0.8rem;
}

/* 图表标签样式 */
.chart-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.chart-tab {
    padding: 8px 15px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.chart-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.chart-tab:hover {
    color: var(--primary-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .result-details {
        flex-direction: column;
        gap: 10px;
    }
    
    .primary-response, .secondary-response {
        flex-wrap: wrap;
    }
    
    .response-btn {
        flex: 1;
        min-width: 0;
        padding: 10px 5px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

/* 图标修复 */
.achievement-icon i.fas.fa-eye-ear:before {
    content: "\f06e\f2a2";
    letter-spacing: -5px;
}

/* 成本分析图表样式 */
#cost-analysis-chart-wrapper, #task-comparison-chart-wrapper {
    display: none;
}

/* 分享卡片中的成本显示 */
.share-cost {
    margin: 5px 0;
    color: #4b5563;
}

.dark-theme .share-cost {
    color: #d1d5db;
}

/* 双任务成本显示 */
#dual-task-cost {
    color: #8b5cf6;
}

/* 图表容器样式 */
.charts-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    margin-top: 20px;
}

.chart-content {
    flex: 1;
    position: relative;
    min-height: 300px;
}

.chart-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    padding: 15px;
    box-sizing: border-box;
}

.dark-theme .chart-wrapper {
    background-color: rgba(31, 41, 55, 0.5);
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* 游戏化元素样式 */
.level-section {
    margin-bottom: 20px;
}

.level-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.level-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.level-badge i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.level-details {
    flex: 1;
}

.level-details h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.achievements-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.achievement-tab {
    padding: 8px 15px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.achievement-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.achievements-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.dark-theme .achievement-item {
    background-color: rgba(31, 41, 55, 0.7);
    border: 1px solid rgba(55, 65, 81, 0.5);
}

.achievement-item.locked {
    opacity: 0.6;
}

.achievement-item.unlocked {
    border-color: #10b981;
}

.achievement-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.dark-theme .achievement-icon {
    background-color: #374151;
}

.achievement-item.unlocked .achievement-icon {
    background-color: #10b981;
    color: white;
}

.achievement-info {
    flex: 1;
}

.achievement-info h4 {
    margin: 0 0 3px 0;
    font-size: 0.9rem;
}

.achievement-info p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.challenge-item {
    padding: 15px;
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(229, 231, 235, 0.5);
    margin-bottom: 15px;
}

.dark-theme .challenge-item {
    background-color: rgba(31, 41, 55, 0.7);
    border: 1px solid rgba(55, 65, 81, 0.5);
}

.challenge-info h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
}

.challenge-status {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.challenge-reward {
    color: #10b981;
}

/* 通知样式 */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.notification {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border-radius: var(--border-radius);
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    animation: slideIn 0.3s ease forwards;
    overflow: hidden;
}

.dark-theme .notification {
    background-color: #1f2937;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.notification-icon {
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.level-up-notification .notification-icon {
    background-color: #3b82f6;
    color: white;
}

.achievement-notification .notification-icon {
    background-color: #10b981;
    color: white;
}

.challenge-notification .notification-icon {
    background-color: #f59e0b;
    color: white;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.notification-message {
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 3px;
}

.notification-detail {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.notification-close {
    margin-left: 10px;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.notification-hiding {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .achievements-list {
        grid-template-columns: 1fr;
    }
}

/* 统计卡片样式 */
.reaction-stats {
    margin-bottom: 20px;
}

.reaction-stats h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.reaction-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.reaction-stat-item {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(229, 231, 235, 0.5);
    transition: transform 0.2s ease;
}

.dark-theme .reaction-stat-item {
    background-color: rgba(31, 41, 55, 0.7);
    border: 1px solid rgba(55, 65, 81, 0.5);
}

.reaction-stat-item:hover {
    transform: translateY(-2px);
}

.reaction-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.reaction-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

#primary-accuracy, #secondary-accuracy {
    color: #6366f1;
}

#dual-task-cost {
    color: #8b5cf6;
}

#average-time {
    color: #10b981;
}

@media (max-width: 768px) {
    .reaction-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 历史记录项样式 */
.history-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    position: relative;
}

.history-date {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.history-mode {
    flex: 1.5;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.history-accuracy {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.history-accuracy .primary {
    color: #6366f1;
}

.history-accuracy .secondary {
    color: #8b5cf6;
}

.history-cost {
    flex: 1;
    font-weight: 600;
    font-size: 0.85rem;
}

.history-cost.excellent {
    color: #10b981;
}

.history-cost.good {
    color: #3b82f6;
}

.history-cost.average {
    color: #f59e0b;
}

.history-cost.slow {
    color: #ef4444;
}

.delete-history-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-history-btn:hover {
    background-color: rgba(229, 231, 235, 0.5);
    color: #ef4444;
}

/* 确保第一个图表默认显示 */
#performance-chart-wrapper {
    display: block;
} 