/* puzzle80：教练摆棋出题 + 学员做题 + 题库列表三套样式 */

/* ===== puzzle_custom_create 出题页 ===== */
.puzzle-custom-create .pcc-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 380px);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .puzzle-custom-create .pcc-layout { grid-template-columns: 1fr; }
}
.pcc-board-area {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.pcc-board-frame {
  position: relative;
  display: flex;
  justify-content: center;
}
#pcc-board, #pcs-board {
  display: flex;
  justify-content: center;
}
.pcc-btable {
  border-collapse: collapse;
  font-size: 36px;
  user-select: none;
}
.pcc-btable th {
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 500;
  color: #888;
}
.pcc-btable td.pcc-sq {
  width: 56px;
  height: 56px;
  text-align: center;
  vertical-align: middle;
  border: 1px solid #d0d0d0;
  background: #fff8e6;
  cursor: pointer;
  transition: background .15s;
}
.pcc-btable td.pcc-sq:nth-child(even) { background: #f5e6c0; }
.pcc-btable td.pcc-sq:hover { background: #ffec99; }
.pcc-btable td.pcc-sq-sel { box-shadow: inset 0 0 0 4px #667eea; }
.pcc-btable td.pcc-sq-last { background: #c8e6c9 !important; }

.pcc-picker-tray {
  margin-top: 16px;
  padding: 16px;
  background: #f8f9fb;
  border-radius: 8px;
}
.pcc-tray-label {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}
.pcc-tray-pieces {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pcc-piece {
  width: 48px;
  height: 48px;
  font-size: 28px;
  background: #fff;
  border: 2px solid #d0d0d0;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
}
.pcc-piece:hover { background: #eef1ff; border-color: #667eea; }
.pcc-piece.active { background: #667eea; border-color: #667eea; color: #fff; }
.pcc-piece-clear { font-size: 12px; width: 80px; }

.pcc-board-overlay {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: #888;
}
.pcc-tip { padding: 8px 16px; background: #fff8e6; border-radius: 6px; display: inline-block; }

.pcc-solution-bar {
  display: flex;
  margin-top: 16px;
  gap: 8px;
}
.pcc-mode-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  background: #f5f5f5;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  transition: all .15s;
}
.pcc-mode-tab:hover { background: #eef1ff; }
.pcc-mode-tab.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-weight: 600;
}

/* ===== 字段区 ===== */
.puzzle-custom-create .pcc-fields {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.pcc-fen-block {
  background: #eef1ff;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.pcc-fen-block summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
}
.pcc-fen-input {
  width: 100%;
  margin-top: 8px;
  padding: 8px 12px;
  font-family: monospace;
  font-size: 13px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  box-sizing: border-box;
}
.pcc-fen-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.pcc-error {
  margin-top: 8px;
  font-size: 13px;
  color: #e64340;
  min-height: 18px;
}
.pcc-field-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.pcc-field-block {
  flex-direction: column;
  align-items: stretch;
}
.pcc-label {
  min-width: 64px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}
.pcc-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  box-sizing: border-box;
  background: #f8f9fb;
  font-family: inherit;
}
.pcc-input:focus { outline: none; border-color: #667eea; background: #fff; }
.pcc-solution-list-block {
  border-top: 1px solid #eee;
  padding-top: 12px;
  margin-top: 16px;
}
.pcc-solution-list {
  padding: 12px;
  background: #f8f9fb;
  border-radius: 6px;
  font-family: monospace;
  font-size: 14px;
  min-height: 40px;
  word-break: break-all;
}
.pcc-solution-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.pcc-bottom-bar {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.pcc-bottom-bar .cu-btn { flex: 1; }

/* ===== puzzle_custom_solve 做题页 ===== */
.puzzle-custom-solve .pcs-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(240px, 300px);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .puzzle-custom-solve .pcs-layout { grid-template-columns: 1fr; }
}
.pcs-board-area {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  text-align: center;
}
.pcs-hint {
  margin-top: 12px;
  padding: 8px 16px;
  background: #fff8e6;
  border-radius: 6px;
  font-size: 14px;
  color: #888;
  display: inline-block;
}
.pcs-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
}
.pcs-side {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.pcs-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 16px;
  word-break: break-all;
}
.pcs-meta div { margin-bottom: 4px; }
.pcs-note-block {
  background: #fff8e6;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.pcs-note-label {
  font-size: 12px;
  font-weight: 600;
  color: #b58900;
  margin-bottom: 6px;
}
.pcs-note-text {
  font-size: 13px;
  color: #5d4037;
  line-height: 1.6;
}
.pcs-status {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  min-height: 18px;
  background: transparent;
  color: #888;
}
.pcs-status.ok { background: #e8f5e9; color: #2e7d32; }
.pcs-status.fail { background: #fdeeee; color: #c62828; }
.pcs-moves {
  padding: 12px;
  background: #f8f9fb;
  border-radius: 6px;
  font-family: monospace;
  font-size: 13px;
  min-height: 40px;
  word-break: break-all;
  color: #555;
}

/* ===== puzzle_custom_list 题库列表 ===== */
.puzzle-custom-list { max-width: 1200px; margin: 0 auto; }
.pcl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.pcl-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
}
.pcl-card.pcl-done { border-left: 4px solid #4caf50; }
.pcl-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
}
.pcl-card-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}
.pcl-card-note {
  font-size: 13px;
  color: #666;
  background: #fff8e6;
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  line-height: 1.5;
}
.pcl-card-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 10px;
  align-self: flex-start;
}
.pcl-status-ok { background: #e8f5e9; color: #2e7d32; }
.pcl-status-fail { background: #fdeeee; color: #c62828; }
.pcl-status-pending { background: #f5f5f5; color: #888; }
.pcl-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.pcl-card-actions .cu-btn { font-size: 13px; padding: 6px 12px; }
.pcl-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
.pcl-page-info { font-size: 13px; color: #666; }
