/* =======================
   全局基础
======================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  }
  
  html, body {
    height: 100%;
    background: linear-gradient(135deg, #5b7cfa, #a047ff);
  }
  
  /* 强制隐藏元素 */
  .hidden {
    display: none !important;
  }
  
  /* =======================
     任务说明页
  ======================= */
  .task-screen {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 28px;
  }
  
  .task-card {
    width: min(980px, 92vw);
    background: rgba(255,255,255,0.96);
    border-radius: 24px;
    padding: 40px 44px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  }
  
  .task-title {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
  }
  
  .task-card p {
    font-size: 17px;
    line-height: 1.9;
    color: #111827;
    margin-bottom: 14px;
  }
  
  .task-note {
    margin-top: 10px;
    color: #374151;
  }
  
  .task-quote {
    font-weight: 700;
    font-style: normal; /* 防止被某些全局样式影响成斜体 */
  }
  
  .task-btn {
    margin-top: 18px;
    width: 180px;
  }
  
  /* =======================
     主界面布局（左情境 + 右聊天）
  ======================= */
  .main-layout {
    display: flex;
    gap: 20px;
    padding: 20px;
    min-height: 100dvh;
    height: auto;
  }
  
  /* 左侧情境栏 */
  .scenario-panel {
    width: 32%;
    background: rgba(255,255,255,0.9);
    border-radius: 20px;
    padding: 24px;
    overflow-y: auto;
  }
  
  .scenario-title {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 700;
  }
  
  .scenario-text {
    font-size: 18px;
    line-height: 1.85;
  }
  
  .scenario-text p {
    margin-bottom: 16px;
    line-height: 1.85;
    font-size: 18px;
    text-indent: 0; /* 如需首行缩进可改 2em */
  }
  
  /* 右侧聊天栏 */
  .chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.92);
    border-radius: 20px;
    overflow: hidden;
  }
  
  .chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #f6f7fc;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .header-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
  }
  
  /* 聊天窗口 */
  .chat-window {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
  }
  
  /* 系统提示 */
  .system-msg {
    text-align: center;
    background: #e5e7f5;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 18px;
    color: #555;
    width: 60%;
    margin: 0 auto 20px auto;
  }
  
  /* 对话气泡 */
  .message {
    max-width: 72%;
    padding: 14px 18px;
    margin-bottom: 16px;
    border-radius: 18px;
    font-size: 18px;
    line-height: 1.65;
    word-break: break-word;
  }
  
  /* 用户（右侧蓝色） */
  .message.user {
    margin-left: auto;
    background: #5b7cfa;
    color: white;
    border-bottom-right-radius: 4px;
  }
  
  /* 助手（左侧白色） */
  .message.assistant {
    margin-right: auto;
    background: white;
    color: #111827;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }
  
  /* 打字指示器气泡（沿用助手气泡） */
  .typing-bubble {
    opacity: 0.9;
  }
  
  /* =======================
     底部按钮
  ======================= */
  .chat-controls {
    padding: 20px;
    display: flex;
    gap: 16px;
    background: transparent;
  }
  
  .primary-btn, .secondary-btn {
    flex: 1;
    padding: 12px;
    border-radius: 999px;
    border: none;
    font-size: 18px;
    cursor: pointer;
  }
  
  .primary-btn {
    background: linear-gradient(90deg, #5b7cfa, #8d46ff);
    color: white;
  }
  
  .secondary-btn {
    background: #eef0ff;
    color: #4338ca;
  }
  
  .primary-btn:disabled,
  .secondary-btn:disabled {
    opacity: 0.5;
    cursor: default;
  }

  /* .highlight {
    background: rgba(186, 230, 253, 0.55);
    color: #0f172a;
    padding: 2px 4px;
    border-radius: 6px;
    font-weight: 600;
  } */
  .highlight {
    background: rgba(251, 207, 232, 0.6); /* 柔和粉 */
    color: #111827;                      /* 深玫红文字，保证对比度 */
    padding: 2px 4px;
    border-radius: 6px;
    font-weight: 600;
  }

  /* =======================
   实验完成页
======================= */
.end-screen {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 28px;
  }
  
  .end-card {
    width: min(720px, 92vw);
    background: rgba(255,255,255,0.96);
    border-radius: 24px;
    padding: 44px 48px;
    text-align: center;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  }
  
  .end-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    background: #22c55e;
    color: white;
    font-size: 42px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .end-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
  }
  
  .end-text {
    font-size: 17px;
    line-height: 1.8;
    color: #111827;
    margin-bottom: 12px;
  }
  
  .end-contact {
    margin-top: 18px;
    font-size: 15px;
    color: #374151;
  }
  
  .end-btn {
    margin-top: 26px;
    width: 160px;
  }
  
  .chat-next {
    padding: 0 20px 22px 20px;
    display: flex;
    justify-content: center;
  }
  
  #btn-next {
    width: 240px;
  }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  