/* field-extension.css - 视野扩展训练的特定样式 */

/* 训练容器 */
.training-container {
  position: relative;
  width: 100%;
  height: 400px;
  background-color: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

/* 注视点样式 */
.fixation-point {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: bold;
  color: #333;
  z-index: 10;
}

/* 刺激区域 */
.stimulus-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

/* 刺激点基本样式 */
.stimulus {
  position: absolute;
  background-color: #ff5722;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.1s ease;
}

.stimulus.flash {
  animation: flash-stimulus 0.5s ease-out;
}

/* 刺激点闪烁动画 */
@keyframes flash-stimulus {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 反馈区域 */
.feedback-area {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 5px;
  font-weight: bold;
}

.feedback-message {
  padding: 5px 10px;
  border-radius: 4px;
  display: inline-block;
  animation: fadeInOut 1.5s ease forwards;
}

.feedback-message.success {
  background-color: rgba(40, 167, 69, 0.8);
  color: white;
}

.feedback-message.error {
  background-color: rgba(220, 53, 69, 0.8);
  color: white;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(10px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* 训练控制区 */
.training-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

/* 训练数据显示 */
.training-stats {
  display: flex;
  justify-content: space-around;
  background-color: #f0f0f0;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
}

.stat-label {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 1.2em;
  font-weight: bold;
  color: #0056b3;
}

/* 训练结果样式 */
.training-results {
  text-align: center;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.result-item {
  padding: 10px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.result-label {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
  color: #6c757d;
}

.result-value {
  font-size: 1.4em;
  font-weight: bold;
  color: #0056b3;
}

.results-chart {
  margin: 30px 0;
  padding: 10px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.results-analysis {
  margin: 20px 0;
  padding: 15px;
  background-color: #e9f7fe;
  border-left: 4px solid #17a2b8;
  border-radius: 4px;
  text-align: left;
}

.results-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

/* 历史记录卡片 */
.history-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 100;
  overflow: hidden;
}

.history-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: #f0f0f0;
  border-bottom: 1px solid #dee2e6;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
}

.history-list {
  padding: 15px;
  overflow-y: auto;
  max-height: calc(80vh - 60px);
}

.history-item {
  padding: 10px;
  border-bottom: 1px solid #eee;
  margin-bottom: 10px;
}

.history-item:last-child {
  border-bottom: none;
}

.history-date {
  font-weight: bold;
  color: #0056b3;
  margin-bottom: 5px;
}

.history-details {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 0.9em;
  color: #6c757d;
}

/* 暂停屏幕 */
.pause-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 20;
  padding: 20px;
  text-align: center;
}

.pause-screen h2 {
  margin-bottom: 20px;
}

.pause-screen button {
  margin: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .training-container {
    height: 300px;
  }
  
  .training-controls {
    flex-direction: column;
    align-items: center;
  }
  
  .training-controls button {
    width: 80%;
    margin-bottom: 10px;
  }
  
  .training-stats {
    flex-direction: column;
    align-items: center;
  }
  
  .stat-item {
    margin-bottom: 10px;
  }
  
  .results-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .results-actions button {
    width: 80%;
    margin-bottom: 10px;
  }
}

/* 难度选择按钮 */
.difficulty-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.difficulty-btn {
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
}

.difficulty-btn.active {
  background-color: #0056b3;
  color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.difficulty-info {
  padding: 10px;
  background-color: #f0f0f0;
  border-radius: 4px;
  text-align: center;
  margin-top: 10px;
}

/* 区域强调样式 - 用于训练提示 */
.quadrant-highlight {
  position: absolute;
  background-color: rgba(255, 255, 0, 0.2);
  border: 2px dashed rgba(255, 165, 0, 0.5);
  z-index: 2;
}

/* 训练开始屏幕 */
.training-start-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
}

.training-start-screen h2 {
  margin-bottom: 20px;
}

.training-start-screen p {
  margin-bottom: 30px;
  max-width: 600px;
}