/* ============================================================
   components.css —— 按钮、卡片、进度条、模态框、通知
   ============================================================ */

/* ===== 印章按钮 ===== */
.btn {
  display: inline-block;
  padding: 8px 18px;
  font-family: 'Noto Serif SC', serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  background: var(--cinnabar);
  color: #fff;
  border-radius: 3px;
  box-shadow: 2px 2px 0 var(--cinnabar-dark), 0 0 0 1px var(--cinnabar-dark);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  user-select: none;
}

.btn:hover:not(:disabled) {
  background: var(--cinnabar-dark);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--cinnabar-dark);
}

.btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--cinnabar-dark);
}

.btn:disabled {
  background: var(--paper-dark);
  color: var(--ink-light);
  box-shadow: 2px 2px 0 var(--shadow);
}

.btn.btn-gold {
  background: var(--gold-dark);
  box-shadow: 2px 2px 0 #5a4209, 0 0 0 1px #5a4209;
}
.btn.btn-gold:hover:not(:disabled) { background: #5a4209; }

.btn.btn-copper {
  background: var(--copper);
  box-shadow: 2px 2px 0 #2d4d36, 0 0 0 1px #2d4d36;
}
.btn.btn-copper:hover:not(:disabled) { background: #2d4d36; }

.btn.btn-spirit {
  background: var(--spirit);
  box-shadow: 2px 2px 0 #1f4d75, 0 0 0 1px #1f4d75;
}
.btn.btn-spirit:hover:not(:disabled) { background: #1f4d75; }

.btn.btn-ghost {
  background: transparent;
  color: var(--ink-light);
  box-shadow: 0 0 0 1px var(--gold-dark);
}
.btn.btn-ghost:hover:not(:disabled) {
  background: var(--paper-dark);
  color: var(--ink);
}

.btn.btn-cinnabar {
  background: var(--cinnabar);
  color: #fff;
  box-shadow: 2px 2px 0 #7a1a1a, 0 0 0 1px #7a1a1a;
}
.btn.btn-cinnabar:hover:not(:disabled) { background: var(--cinnabar-dark); }

.btn.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: 1px;
}

.btn.btn-lg {
  padding: 12px 32px;
  font-size: 18px;
}

/* ===== 开始界面 ===== */
.start-screen {
  text-align: center;
  padding: 60px 20px;
  animation: fade-in 0.6s ease-out;
}

.start-screen .title {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 64px;
  color: var(--cinnabar-dark);
  letter-spacing: 16px;
  text-shadow: 3px 3px 0 rgba(139,105,20,0.2), 0 0 40px rgba(58,124,184,0.2);
  margin-bottom: 12px;
}

.start-screen .subtitle {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  color: var(--ink-light);
  letter-spacing: 6px;
  margin-bottom: 40px;
}

.start-screen .lore {
  max-width: 560px;
  margin: 0 auto 40px;
  font-family: 'Noto Serif SC', serif;
  font-size: 15px;
  line-height: 2;
  color: var(--ink-light);
  text-align: left;
  background: var(--paper-light);
  border: 1px solid var(--gold-dark);
  padding: 24px 32px;
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--shadow);
  position: relative;
}

.start-screen .lore::before {
  content: '「';
  position: absolute;
  top: 0; left: 8px;
  font-size: 40px;
  color: var(--gold);
  opacity: 0.4;
}

.start-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

/* ===== 事件卷轴 ===== */
.event-scroll {
  background: var(--paper-light);
  border: 2px solid var(--gold-dark);
  border-radius: 4px;
  padding: 24px 32px;
  box-shadow: 3px 3px 0 var(--shadow);
  position: relative;
  animation: fade-in 0.5s ease-out;
}

.event-scroll::before,
.event-scroll::after {
  content: '';
  position: absolute;
  left: -2px; right: -2px;
  height: 12px;
  background: var(--gold-dark);
  border-radius: 2px;
}
.event-scroll::before { top: -14px; }
.event-scroll::after { bottom: -14px; }

.event-title {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 28px;
  color: var(--cinnabar-dark);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 4px;
}

.event-type-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  color: #fff;
  margin-bottom: 12px;
}
.event-type-tag.jianghu { background: var(--cinnabar); }
.event-type-tag.neili { background: var(--copper); }
.event-type-tag.shisu { background: var(--gold-dark); }
.event-type-tag.xiuzhen { background: var(--spirit); }

.event-desc {
  font-family: 'Noto Serif SC', serif;
  font-size: 15px;
  line-height: 2;
  color: var(--ink);
  margin-bottom: 24px;
  text-indent: 2em;
}

.event-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice-btn {
  text-align: left;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--gold-dark);
  border-radius: 3px;
  font-family: 'Noto Serif SC', serif;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
}

.choice-btn:hover:not(:disabled) {
  background: var(--paper-dark);
  border-color: var(--cinnabar);
  transform: translateX(4px);
}

.choice-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== 事件结果 ===== */
.event-result {
  background: var(--paper-light);
  border: 2px solid var(--copper);
  border-radius: 4px;
  padding: 20px 28px;
  margin-top: 16px;
  animation: fade-in 0.5s ease-out;
}

.event-result-text {
  font-family: 'Noto Serif SC', serif;
  font-size: 15px;
  line-height: 2;
  color: var(--ink);
  text-indent: 2em;
  margin-bottom: 16px;
}

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fade-in 0.2s ease-out;
}

.modal {
  background: var(--paper-light);
  border: 2px solid var(--gold-dark);
  border-radius: 4px;
  padding: 24px 32px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 4px 4px 0 var(--shadow);
  position: relative;
}

.modal-title {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 24px;
  color: var(--cinnabar-dark);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 3px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--gold-dark);
}

.modal-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
}

.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 24px;
  color: var(--ink-light);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { color: var(--cinnabar); }

/* ===== 通知 ===== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--ink);
  color: var(--paper-light);
  padding: 12px 20px;
  border-radius: 4px;
  border-left: 4px solid var(--gold);
  font-family: 'Noto Serif SC', serif;
  font-size: 14px;
  z-index: 200;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.3);
  transform: translateX(400px);
  transition: transform 0.3s ease;
  max-width: 320px;
}

.notification.show {
  transform: translateX(0);
}

.notification.success { border-left-color: var(--copper); }
.notification.error { border-left-color: var(--cinnabar); }
.notification.spirit { border-left-color: var(--spirit); }

/* ===== 论剑排名榜 ===== */
.tournament-board {
  background: var(--paper-light);
  border: 2px solid var(--gold-dark);
  border-radius: 4px;
  padding: 20px 28px;
  animation: fade-in 0.5s ease-out;
}

.tournament-title {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 32px;
  color: var(--cinnabar-dark);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 6px;
}

.tournament-rank {
  text-align: center;
  font-family: 'Noto Serif SC', serif;
  font-size: 20px;
  color: var(--gold-dark);
  margin-bottom: 20px;
}

.rank-list {
  list-style: none;
  margin-bottom: 20px;
}

.rank-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  margin-bottom: 4px;
  background: var(--paper);
  border-radius: 2px;
  font-size: 14px;
}

.rank-item.player {
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
}

.rank-item .rank-num {
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
  color: var(--cinnabar-dark);
  min-width: 40px;
}

/* ===== 行动点显示 ===== */
.action-points {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-light);
  font-family: 'Noto Serif SC', serif;
}

.ap-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 4px var(--copper-light);
}

.ap-dot.used {
  background: var(--paper-dark);
  box-shadow: none;
}

/* ===== 候选弟子卡 ===== */
.candidate-card {
  background: var(--paper);
  border: 2px solid var(--gold-dark);
  border-radius: 3px;
  padding: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.candidate-card:hover {
  border-color: var(--cinnabar);
  background: var(--paper-dark);
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--shadow);
}

.candidate-card .name {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--cinnabar-dark);
  margin-bottom: 8px;
}

.candidate-attrs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 12px;
  font-size: 12px;
  color: var(--ink-light);
}

/* ===== 日志 ===== */
.log-list {
  max-height: 200px;
  overflow-y: auto;
  font-size: 12px;
  font-family: 'Noto Serif SC', serif;
  color: var(--ink-light);
  line-height: 1.8;
}

.log-list .log-item {
  padding: 2px 0;
  border-bottom: 1px dotted var(--paper-dark);
}

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