/**
 * @file student.css
 * @description 川小小编程闯关平台 - 学生端专用样式表
 * @version 2.0.0
 * @date 2026-07-16
 * @description 包含学生登记页、六关地图页、单关学习页、学生报告页的专属样式。
 *              V2.0: 左侧面板缩小至 360px、登记信息默认折叠、
 *                    右侧操作与验证中心、编程工具按钮、验证清单样式。
 */

/* ==================== 学生登记页 ==================== */

/* 登记卡片容器 */
.login-card {
  background: #FFFFFF;
  border-radius: 28px;
  -webkit-box-shadow: 0 8px 32px rgba(79, 195, 247, 0.25);
  box-shadow: 0 8px 32px rgba(79, 195, 247, 0.25);
  padding: 40px 48px;
  width: 100%;
  max-width: 480px;
}

/* 登记页 Logo 区域 */
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #4FC3F7, #29B6F6);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 40px;
  color: #FFFFFF;
  font-weight: bold;
  -webkit-box-shadow: 0 6px 20px rgba(79, 195, 247, 0.4);
  box-shadow: 0 6px 20px rgba(79, 195, 247, 0.4);
}

.login-title {
  font-size: 28px;
  font-weight: bold;
  color: #263238;
  text-align: center;
}

.login-subtitle {
  font-size: 16px;
  color: #90A4AE;
  text-align: center;
  margin-top: 8px;
}


/* ==================== 六关地图页 ==================== */

/* 地图容器 - 16:9 比例 */
.map-container {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: 20px;
  overflow: hidden;
  -webkit-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 关卡按钮 - 绝对定位在背景图上 */
.map-hotspot {
  position: absolute;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  min-width: 120px;
  min-height: 52px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid #4FC3F7;
  border-radius: 20px;
  -webkit-box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  -webkit-transition: -webkit-transform 0.25s, box-shadow 0.25s;
  transition: transform 0.25s, box-shadow 0.25s;
  text-align: center;
  z-index: 10;
}

.map-hotspot:hover {
  -webkit-transform: translate(-50%, -50%) scale(1.12);
  transform: translate(-50%, -50%) scale(1.12);
  -webkit-box-shadow: 0 6px 24px rgba(79, 195, 247, 0.5);
  box-shadow: 0 6px 24px rgba(79, 195, 247, 0.5);
  border-color: #0288D1;
}

/* 关卡编号 */
.hotspot-id {
  font-size: 14px;
  font-weight: bold;
  color: #0288D1;
  line-height: 1.2;
}

/* 关卡名称 */
.hotspot-name {
  font-size: 13px;
  color: #546E7A;
  margin-top: 2px;
  line-height: 1.2;
}

/* 已完成关卡样式 */
.map-hotspot.completed {
  border-color: #66BB6A;
  background: rgba(232, 245, 233, 0.95);
}

.map-hotspot.completed .hotspot-id {
  color: #2E7D32;
}

.map-hotspot.completed .hotspot-name {
  color: #43A047;
}

/* 已完成标记 */
.hotspot-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: #FFD700;
  border-radius: 50%;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 14px;
  -webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* 地图顶部信息栏 */
.map-topbar {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-bottom: 16px;
}

.map-student-info {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 12px;
}

.map-legend {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: #546E7A;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.legend-dot.todo { background: #4FC3F7; }
.legend-dot.done { background: #66BB6A; }


/* ==================== 单关学习页 ==================== */

/* 学习页两栏布局（左侧 360px 紧凑版） */
.challenge-layout {
  display: -webkit-flex;
  display: flex;
  gap: 16px;
  padding: 16px;
  max-width: 1280px;
  margin: 0 auto;
}

/* 左侧信息面板（360px 紧凑版，1920x1080 下避免独立滚动） */
.challenge-left {
  -webkit-flex: 0 0 360px;
  flex: 0 0 360px;
  background: #FFFFFF;
  border-radius: 16px;
  -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 16px;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
}

/* 右侧面板 */
.challenge-right {
  -webkit-flex: 1;
  flex: 1;
  background: #FFFFFF;
  border-radius: 16px;
  -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  max-height: calc(100vh - 120px);
}

/* 关卡信息标题（紧凑） */
.level-info-header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #E3F2FD;
}

.level-info-id {
  display: inline-block;
  background: #E3F2FD;
  color: #0277BD;
  font-size: 13px;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 10px;
  margin-bottom: 6px;
}

.level-info-name {
  font-size: 20px;
  font-weight: bold;
  color: #263238;
}

/* 关卡目标与期望结果（紧凑） */
.level-info-section {
  margin-bottom: 10px;
}

.level-info-label {
  font-size: 14px;
  font-weight: bold;
  color: #546E7A;
  margin-bottom: 4px;
}

.level-info-text {
  font-size: 14px;
  color: #455A64;
  line-height: 1.6;
  background: #F5F9FF;
  padding: 8px 10px;
  border-radius: 10px;
}

/* 三种求助按钮（紧凑） */
.help-buttons {
  margin-top: 12px;
}

.help-buttons-title {
  font-size: 15px;
  font-weight: bold;
  color: #263238;
  margin-bottom: 8px;
}

.help-btn {
  display: block;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: bold;
  text-align: left;
  cursor: pointer;
  border: none;
  -webkit-transition: -webkit-transform 0.2s, box-shadow 0.2s;
  transition: transform 0.2s, box-shadow 0.2s;
}

.help-btn:hover {
  -webkit-transform: translateX(4px);
  transform: translateX(4px);
  -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.help-btn-start { background: #E3F2FD; color: #0277BD; }
.help-btn-debug { background: #FFF3E0; color: #E65100; }
.help-btn-pass  { background: #E8F5E9; color: #2E7D32; }

/* 对话区头部 */
.chat-header {
  padding: 12px 16px;
  background: linear-gradient(135deg, #4FC3F7, #29B6F6);
  border-radius: 16px 16px 0 0;
  color: #FFFFFF;
  font-size: 17px;
  font-weight: bold;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 10px;
}

.chat-header-avatar {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 16px;
}

/* ==================== 连接状态样式 ==================== */

.connection-status {
  display: inline-block;
  font-size: 12px;
  font-weight: normal;
  padding: 2px 10px;
  border-radius: 10px;
  margin-left: auto;
}

.status-ready {
  background: rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
}

.status-connecting {
  background: rgba(255, 193, 7, 0.4);
  color: #FFFFFF;
  -webkit-animation: pulse 1.5s infinite;
  animation: pulse 1.5s infinite;
}

.status-connected {
  background: rgba(76, 175, 80, 0.5);
  color: #FFFFFF;
}

.status-error {
  background: rgba(244, 67, 54, 0.5);
  color: #FFFFFF;
}

.status-warning {
  background: rgba(255, 152, 0, 0.5);
  color: #FFFFFF;
}

@-webkit-keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}


/* ==================== 右侧操作与验证中心 ==================== */

.ops-verify-panel {
  -webkit-flex: 1;
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

/* 操作区段落 */
.ops-section {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E0E0E0;
}

.ops-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.ops-section-title {
  font-size: 15px;
  font-weight: bold;
  color: #263238;
  margin-bottom: 6px;
}

.ops-section-text {
  font-size: 14px;
  color: #546E7A;
  line-height: 1.6;
}

.ops-hint-text {
  color: #78909C;
  font-size: 13px;
}

/* 操作步骤列表 */
.ops-steps-list {
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
  color: #455A64;
  line-height: 1.8;
}

.ops-steps-list li {
  margin-bottom: 2px;
}

/* 编程工具按钮 */
.tool-buttons {
  display: -webkit-flex;
  display: flex;
  gap: 10px;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

.tool-btn {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  border: 2px solid #4FC3F7;
  background: #E3F2FD;
  color: #0277BD;
  -webkit-transition: background 0.2s, -webkit-transform 0.15s;
  transition: background 0.2s, transform 0.15s;
}

.tool-btn:hover {
  background: #B3E5FC;
  -webkit-transform: translateY(-1px);
  transform: translateY(-1px);
}

.tool-btn:disabled {
  border-color: #B0BEC5;
  background: #ECEFF1;
  color: #90A4AE;
  cursor: not-allowed;
}

.tool-btn-alt {
  border-color: #FF9800;
  background: #FFF3E0;
  color: #E65100;
}

.tool-btn-alt:hover {
  background: #FFE0B2;
}

.tool-btn-alt:disabled {
  border-color: #B0BEC5;
  background: #ECEFF1;
  color: #90A4AE;
}

/* 运行验证清单 */
.verify-checklist {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 6px;
}

.verify-item {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #455A64;
  cursor: pointer;
  padding: 4px 0;
}

.verify-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}


/* ==================== 尝试次数/提示等级 ==================== */

.attempt-info {
  display: -webkit-flex;
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #E0E0E0;
}

.attempt-info-item {
  -webkit-flex: 1;
  flex: 1;
  text-align: center;
  background: #F5F9FF;
  border-radius: 10px;
  padding: 6px;
}

.attempt-info-value {
  font-size: 22px;
  font-weight: bold;
  color: #0288D1;
}

.attempt-info-label {
  font-size: 11px;
  color: #90A4AE;
  margin-top: 2px;
}


/* ==================== 学生报告页 ==================== */

.report-container {
  max-width: 800px;
  margin: 0 auto;
}

.report-header {
  text-align: center;
  margin-bottom: 24px;
}

.report-student-name {
  font-size: 28px;
  font-weight: bold;
  color: #263238;
}

.report-level-name {
  font-size: 18px;
  color: #546E7A;
  margin-top: 6px;
}

.report-total-score {
  text-align: center;
  background: linear-gradient(135deg, #66BB6A, #43A047);
  border-radius: 20px;
  padding: 28px;
  color: #FFFFFF;
  margin-bottom: 24px;
}

.report-total-score-value {
  font-size: 56px;
  font-weight: bold;
  line-height: 1;
}

.report-total-score-label {
  font-size: 16px;
  opacity: 0.9;
  margin-top: 8px;
}

.score-dimensions {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 16px;
}

.score-dim-item {
  -webkit-flex: 1 1 140px;
  flex: 1 1 140px;
  background: #F5F9FF;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.score-dim-label {
  font-size: 14px;
  color: #546E7A;
  margin-bottom: 6px;
}

.score-dim-value {
  font-size: 28px;
  font-weight: bold;
  color: #0288D1;
}

.badge-display {
  text-align: center;
  padding: 24px;
}

.badge-icon-large {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, #FFD700, #FFA000);
  border-radius: 50%;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 40px;
  -webkit-box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.badge-name {
  font-size: 18px;
  font-weight: bold;
  color: #F57F17;
}

.review-notice {
  background: #FFF8E1;
  border: 2px solid #FFEE58;
  border-radius: 14px;
  padding: 16px 20px;
  text-align: center;
  color: #F57F17;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 24px;
}

.report-text-body {
  background: #FAFAFA;
  border-radius: 14px;
  padding: 20px 24px;
  font-size: 15px;
  line-height: 1.8;
  color: #455A64;
  white-space: pre-wrap;
}

.pass-suggestion {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: bold;
}

.pass-suggestion.recommend { background: #E8F5E9; color: #2E7D32; }
.pass-suggestion.review    { background: #FFF3E0; color: #E65100; }
.pass-suggestion.retry      { background: #FFEBEE; color: #C62828; }


/* ==================== 入口选择页 ==================== */
.entry-hero {
  text-align: center;
  padding: 40px 24px;
}

.entry-hero-title {
  font-size: 40px;
  font-weight: bold;
  color: #FFFFFF;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 12px;
}

.entry-hero-subtitle {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.entry-choices {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

.entry-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 32px 40px;
  width: 300px;
  text-align: center;
  cursor: pointer;
  -webkit-transition: -webkit-transform 0.3s, box-shadow 0.3s;
  transition: transform 0.3s, box-shadow 0.3s;
  -webkit-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.entry-card:hover {
  -webkit-transform: translateY(-8px);
  transform: translateY(-8px);
  -webkit-box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.entry-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 36px;
}

.entry-card-icon.student {
  background: linear-gradient(135deg, #4FC3F7, #29B6F6);
  color: #FFFFFF;
}

.entry-card-icon.teacher {
  background: linear-gradient(135deg, #BA68C8, #9C27B0);
  color: #FFFFFF;
}

.entry-card-title {
  font-size: 22px;
  font-weight: bold;
  color: #263238;
  margin-bottom: 8px;
}

.entry-card-desc {
  font-size: 15px;
  color: #90A4AE;
}

/* 响应式 */
@media (max-width: 768px) {
  .challenge-layout {
    -webkit-flex-direction: column;
    flex-direction: column;
  }
  .challenge-left {
    -webkit-flex: none;
    flex: none;
    max-height: none;
  }
  .entry-choices {
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
  }
}


/* ==================== 召唤小川编程教练按钮 ==================== */

.coach-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px dashed #E0E0E0;
}

.coach-summon-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #7C4DFF, #651FFF);
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  -webkit-box-shadow: 0 4px 16px rgba(101, 31, 255, 0.35);
  box-shadow: 0 4px 16px rgba(101, 31, 255, 0.35);
  -webkit-transition: -webkit-transform 0.25s, box-shadow 0.25s;
  transition: transform 0.25s, box-shadow 0.25s;
  letter-spacing: 1px;
}

.coach-summon-btn:hover {
  -webkit-transform: translateY(-3px) scale(1.02);
  transform: translateY(-3px) scale(1.02);
  -webkit-box-shadow: 0 8px 28px rgba(101, 31, 255, 0.45);
  box-shadow: 0 8px 28px rgba(101, 31, 255, 0.45);
}

.coach-summon-btn:active {
  -webkit-transform: translateY(0) scale(0.98);
  transform: translateY(0) scale(0.98);
}


/* ==================== 登记信息卡片（默认折叠版） ==================== */

.reg-info-card {
  margin-top: 10px;
  background: #F3E5F5;
  border: 1px solid #CE93D8;
  border-radius: 12px;
  padding: 8px 12px;
}

/* 折叠/展开触发按钮 */
.reg-info-toggle {
  font-size: 14px;
  font-weight: bold;
  color: #6A1B9A;
  cursor: pointer;
  padding: 2px 0;
  -webkit-user-select: none;
  user-select: none;
}

.reg-info-toggle:hover {
  color: #4A148C;
}

/* 展开后的详情区域 */
.reg-info-detail {
  margin-top: 8px;
}

.reg-info-row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: baseline;
  align-items: baseline;
  margin-bottom: 4px;
  font-size: 13px;
}

.reg-info-label {
  color: #7B1FA2;
  font-weight: bold;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  min-width: 70px;
}

.reg-info-value {
  color: #4A148C;
}

/* 建议发送给智能体的登记语句 */
.reg-info-message {
  margin-top: 6px;
  padding: 6px 8px;
  background: #FFFFFF;
  border-radius: 8px;
  font-size: 13px;
  color: #333333;
  line-height: 1.5;
  border: 1px dashed #CE93D8;
  white-space: pre-wrap;
  word-break: break-all;
}

/* 复制按钮区域 */
.reg-info-actions {
  margin-top: 6px;
  text-align: right;
}


/* ==================== 状态提示区域 ==================== */

.status-tip-area {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.4;
  display: none;
  -webkit-transition: opacity 0.3s;
  transition: opacity 0.3s;
}

.status-tip-area.show {
  display: block;
}

.status-tip-info {
  background: #E3F2FD;
  color: #0D47A1;
  border: 1px solid #90CAF9;
}

.status-tip-success {
  background: #E8F5E9;
  color: #1B5E20;
  border: 1px solid #A5D6A7;
}

.status-tip-warning {
  background: #FFF3E0;
  color: #E65100;
  border: 1px solid #FFCC80;
}

.status-tip-error {
  background: #FFEBEE;
  color: #B71C1C;
  border: 1px solid #EF9A9A;
}


/* ==================== 响应式补充 ==================== */

@media (max-width: 768px) {
  .coach-summon-btn {
    font-size: 15px;
    padding: 10px 14px;
  }

  .reg-info-card {
    padding: 6px 10px;
  }

  .tool-buttons {
    -webkit-flex-direction: column;
    flex-direction: column;
  }
}
