/* codex: 2026-09-09 奇偶棋子谜题模态弹窗、数学证明表格与多端适配样式 */

/* 达成状态提示条 */
.status-banner {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.4;
  font-weight: 500;
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #564739;
}

.status-banner.optimal {
  background: rgba(56, 176, 0, 0.25);
  border-color: var(--color-success);
  color: #70e000;
}

.status-banner.valid {
  background: rgba(255, 183, 3, 0.2);
  border-color: var(--color-warning);
  color: #ffd166;
}

/* 提示气泡框 */
.hint-box {
  background: rgba(255, 183, 3, 0.15);
  border: 1px solid rgba(255, 183, 3, 0.4);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.82rem;
  color: #ffe082;
  line-height: 1.4;
  margin-top: 10px;
  display: none;
}

/* 原理解析与模态弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-content {
  background: #342a21;
  border: 2px solid var(--accent-gold);
  border-radius: 14px;
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-title {
  font-size: 1.35rem;
  color: var(--accent-gold);
  margin-bottom: 14px;
  text-align: center;
}

/* 核心问答高亮提问区 */
.proof-question-box {
  background: rgba(229, 179, 88, 0.12);
  border: 1px solid rgba(229, 179, 88, 0.4);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}

.proof-question-title {
  color: var(--accent-gold);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.proof-question-desc {
  font-size: 0.9rem;
  color: #fff;
  line-height: 1.55;
}

/* 分块矩阵算法展示与三重保证卡片 */
.proof-algorithm-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #705842;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 18px;
}

.proof-algo-title {
  color: var(--accent-gold);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.proof-algo-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 10px;
}

.proof-formula-list {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
  border-left: 3px solid #e5b358;
}

.proof-formula-item {
  font-size: 0.85rem;
  color: #fff;
  line-height: 1.6;
  font-family: monospace;
}

.proof-matrix-pre {
  background: #201710;
  color: #f7c978;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #564030;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-x: auto;
  margin-bottom: 14px;
}

.proof-guarantee-card {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--color-success);
  border-radius: 0 6px 6px 0;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.proof-guarantee-name {
  font-weight: 700;
  color: #70e000;
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.proof-guarantee-detail {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.proof-step {
  margin-bottom: 14px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--accent-gold);
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
}

.proof-step-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
}

.proof-step-content {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* 总结表格样式 */
.proof-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #564739;
}

.proof-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.proof-table th,
.proof-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.proof-table th {
  background: #251c14;
  color: var(--accent-gold);
  font-weight: 600;
  white-space: nowrap;
}

.proof-table tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.15);
}

.proof-table td:nth-child(2) {
  white-space: nowrap;
  font-weight: 600;
}

.proof-table td:nth-child(3) {
  white-space: nowrap;
  color: var(--accent-gold);
}

/* 庆祝特效 Canvas */
#celebrationCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

/* 移动端与平板适配 */
@media (max-width: 600px) {
  .modal-content {
    padding: 16px 12px;
    max-width: 95vw;
  }
  .modal-title {
    font-size: 1.15rem;
    padding-right: 24px;
  }
  .proof-step {
    padding: 10px;
  }
  .proof-table th,
  .proof-table td {
    padding: 8px 6px;
    font-size: 0.78rem;
  }
}
