/* ===== 模态弹窗与 Toast ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 3, 0.78);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: min(760px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  background: linear-gradient(160deg, #352115 0%, #20130c 100%);
  border: 2px solid rgba(230, 184, 92, 0.48);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  color: var(--text-light);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(230, 184, 92, 0.25);
}

.modal-header h2 {
  margin: 0;
  font-size: 19px;
  color: var(--gold-bright);
}

.modal-close {
  border: 1px solid rgba(230, 184, 92, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-light);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(230, 184, 92, 0.24);
}

.rule-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.rule-tab-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(230, 184, 92, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.rule-tab-btn.active {
  background: var(--gold);
  color: #241408;
  border-color: var(--gold-bright);
}

.rule-section {
  display: none;
  line-height: 1.7;
  font-size: 14px;
}

.rule-section.active {
  display: block;
}

.rule-section h3 {
  margin: 14px 0 6px;
  font-size: 15px;
  color: var(--gold-bright);
}

.rule-section ul {
  margin: 6px 0 10px;
  padding-left: 20px;
}

.rule-section li {
  margin-bottom: 4px;
}

.prob-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 12px;
  font-size: 13px;
}

.prob-table th,
.prob-table td {
  border: 1px solid rgba(230, 184, 92, 0.25);
  padding: 7px 10px;
  text-align: center;
}

.prob-table th {
  background: rgba(230, 184, 92, 0.16);
  color: var(--gold-bright);
}

/* 文物实拍画廊 */
.artifact-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.artifact-figure {
  margin: 0;
  background: rgba(15, 9, 5, 0.55);
  border: 1px solid rgba(230, 184, 92, 0.28);
  border-radius: 12px;
  overflow: hidden;
}

.artifact-figure img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.artifact-figure figcaption {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 胜利弹窗 */
.win-body {
  text-align: center;
  padding: 10px 4px 6px;
}

.win-trophy {
  font-size: 52px;
  margin-bottom: 6px;
}

.win-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-bright);
  margin: 0 0 8px;
}

.win-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 18px;
}

.win-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Toast 轻提示 */
.toast-banner {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(28, 17, 10, 0.95);
  color: var(--gold-bright);
  border: 1px solid rgba(230, 184, 92, 0.55);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 200;
}

.toast-banner.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== 交互式新手教学引导条 ===== */
.tutorial-banner {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(24, 92, 105, 0.94), rgba(20, 48, 58, 0.96));
  border: 2px solid #6be4ef;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.tutorial-banner.active {
  display: flex;
}

.tutorial-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tutorial-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.tutorial-step-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 217, 125, 0.22);
  border: 1px solid #ffd97d;
  color: #ffd97d;
  font-size: 12px;
  font-weight: 800;
}

.tutorial-title {
  font-size: 16px;
  color: #ffffff;
}

.tutorial-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #e8f8fa;
}

.tutorial-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(107, 228, 239, 0.4);
}

.tutorial-feedback {
  font-size: 14px;
  font-weight: 700;
  color: #ffe28a;
  line-height: 1.5;
  flex: 1;
}

/* ===== 实时战报头与对局记录弹窗 ===== */
.event-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn-mini {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 58dvh;
  overflow-y: auto;
  padding-right: 4px;
}

.history-empty {
  margin: 18px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.history-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(15, 9, 5, 0.55);
  border: 1px solid rgba(230, 184, 92, 0.22);
  font-size: 13px;
  line-height: 1.5;
}

.history-item.is-ai {
  border-left: 3px solid #28d3e3;
}

.history-item.is-human {
  border-left: 3px solid #ffd97d;
}

.history-meta {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(230, 184, 92, 0.16);
  color: var(--gold-bright);
  margin-top: 2px;
}

.history-text {
  color: var(--text-light);
  flex: 1;
}

/* ===== FAQ 常见疑问卡片 ===== */
.faq-item {
  background: rgba(15, 9, 5, 0.45);
  border: 1px solid rgba(230, 184, 92, 0.24);
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 10px;
}

.faq-item h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--gold-bright);
  line-height: 1.45;
}

.faq-item p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-light);
}

.faq-item ul {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 13.5px;
}

/* ===== 神话与诸神卡片网格 ===== */
.myth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.myth-card {
  background: rgba(15, 9, 5, 0.5);
  border: 1px solid rgba(230, 184, 92, 0.28);
  border-radius: 12px;
  padding: 10px 12px;
}

.myth-card h4 {
  margin: 0 0 5px;
  font-size: 13.5px;
  color: var(--gold-bright);
}

.myth-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.myth-illustration {
  margin: 10px 0 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(230, 184, 92, 0.38);
  background: rgba(15, 9, 5, 0.58);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.myth-illustration img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  display: block;
}

.myth-illustration figcaption {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--gold);
  line-height: 1.5;
}
