/**
 * Cyberball 实验自定义样式
 */

/* 全局样式 */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
}

#jspsych-target {
    min-height: 100vh;
}

/* jsPsych 容器 */
#jspsych-target {
    font-size: 18px;
    line-height: 1.8;
}

/* 指导语容器 */
.instruction {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.instruction h1 {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 20px;
}

.instruction h2 {
    color: #34495e;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.instruction h3 {
    color: #34495e;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.instruction p {
    color: #555;
    margin: 15px 0;
}

.instruction ul {
    text-align: left;
    /* display: inline-block; */
    margin: 15px auto;
}

.instruction li {
    /* margin: 8px 0; */
    color: #555;
}

.instruction hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 25px 0;
}

/* 高亮提示框 */
.highlight-box {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
    text-align: left;
}

.highlight-box h3 {
    color: #856404;
    margin-bottom: 10px;
}

.highlight-box p, .highlight-box li {
    color: #856404;
}

/* Debriefing 说明框 */
.debrief-box {
    background-color: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
}

.debrief-box h3 {
    color: #0c5460;
    margin-bottom: 15px;
}

.debrief-box p {
    color: #0c5460;
}

/* 游戏容器 */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 600px;
    padding: 20px;
    box-sizing: border-box;
}

.game-container iframe {
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: white;
    max-width: 100%;
}

.game-hint {
    margin-top: 15px;
    color: #888;
    font-size: 14px;
    text-align: center;
}

/* 确保 jsPsych 内容区居中 */
.jspsych-display-element {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.jspsych-content-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

.jspsych-content {
    max-width: 900px !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* 按钮样式 */
.jspsych-btn {
    font-family: inherit;
    font-size: 16px;
    padding: 12px 30px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin: 5px;
}

.jspsych-btn:hover {
    background-color: #2980b9;
}

.jspsych-btn:active {
    background-color: #21618c;
}

/* 量表提示 */
.scale-hint {
    font-size: 14px;
    color: #888;
    margin-top: 10px;
    font-style: italic;
}

/* Likert 量表样式 */
.jspsych-survey-likert-statement {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.jspsych-survey-likert-opts {
    margin-bottom: 25px;
}

.jspsych-survey-likert-opt-label {
    font-size: 13px;
    color: #666;
    white-space: pre-line;  /* 支持换行显示 */
}

/* 文本输入框 */
.jspsych-survey-text textarea,
.jspsych-survey-text input[type="text"] {
    font-family: inherit;
    font-size: 16px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    max-width: 500px;
}

.jspsych-survey-text textarea:focus,
.jspsych-survey-text input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 多选题样式 */
.jspsych-survey-multi-choice-question {
    margin-bottom: 25px;
}

.jspsych-survey-multi-choice-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.jspsych-survey-multi-choice-option {
    margin: 8px 0;
}

.jspsych-survey-multi-choice-option label {
    cursor: pointer;
    font-size: 15px;
    color: #555;
}

/* 进度条 */
#jspsych-progressbar-container {
    background-color: #e0e0e0;
    height: 8px;
    border-radius: 4px;
    margin-bottom: 20px;
}

#jspsych-progressbar-inner {
    background-color: #3498db;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .instruction {
        padding: 15px;
    }
    
    .instruction h1 {
        font-size: 1.5em;
    }
    
    .instruction h2 {
        font-size: 1.2em;
    }
    
    .game-container iframe {
        width: 100%;
        height: 400px;
    }
    
    .jspsych-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
