/* ==========================================
   1453 血肉与锈蚀的审判 - 全局 UI 样式表
   ========================================== */

/* 全局容器重置与防呆 */
.if-container, .if-container * {
  box-sizing: border-box !important;
}

.if-container {
  border: 2px solid #3a3a3a;
  border-radius: 12px;
  padding: 20px;
  background-color: #1a1a1a !important;
  color: #dcdcdc !important;
  font-family: 'Noto Serif TC', 'Times New Roman', serif;
  line-height: 1.6;
  max-width: 950px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

/* 引用区块 ( > ) 样式修正 - 彻底防止字体隐形 */
.if-container blockquote {
  background-color: #242424 !important;
  border-left: 4px solid #d4af37 !important;
  color: #e0e0e0 !important;
  margin: 12px 0 !important;
  padding: 10px 15px !important;
  border-radius: 4px;
}
.if-container blockquote p,
.if-container blockquote span,
.if-container blockquote li {
  color: #e0e0e0 !important;
}

/* 响应式表格 (Table) - 手机端滑动保护 */
.if-container .table-wrapper {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  margin: 15px 0 !important;
  border: 1px solid #333;
  border-radius: 6px;
}

.if-container table {
  width: 100% !important;
  border-collapse: collapse !important;
  white-space: nowrap !important;
  background-color: #1e1e1e !important;
  margin: 0 !important;
}

.if-container th, 
.if-container td {
  border: 1px solid #333 !important;
  padding: 10px 14px !important;
  text-align: left !important;
  color: #e0e0e0 !important;
  font-size: 0.9em !important;
}

.if-container th {
  background-color: #2a2a2a !important;
  color: #d4af37 !important;
  font-weight: bold !important;
}

/* 面板与卡片设计 */
.if-header {
  display: flex;
  align-items: center;
  margin: 0 0 10px 0;
  font-size: 1.3em;
  text-shadow: 1px 1px 2px #000;
}

.if-divider {
  border: 0;
  border-top: 1px dashed #444;
  margin: 20px 0;
}

.panel-time {
  border-bottom: 2px solid #8b0000;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.panel-narrative {
  margin-bottom: 25px;
  border: 1px solid #333;
  background: #151515 !important;
  padding: 18px;
  border-radius: 6px;
}

.panel-nav {
  background-color: #151515 !important;
  border: 2px solid #d4af37;
  border-radius: 8px;
  padding: 18px;
}

.box-glass {
  font-size: 0.95em;
  background: rgba(255,255,255,0.03);
  padding: 12px;
  border-radius: 4px;
  color: #dcdcdc !important;
}

.box-atmosphere {
  margin-top: 10px;
  background-color: #252525 !important;
  padding: 10px 12px;
  border-left: 4px solid #8b0000;
  font-style: italic;
  color: #dcdcdc !important;
}

.box-mission {
  background-color: #1c1917 !important;
  border-left: 4px solid #7f1d1d;
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 4px;
}

/* 折叠菜单 (Details & Summary) */
.if-details {
  margin-bottom: 15px;
  background: #222222 !important;
  padding: 12px;
  border-radius: 6px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.4);
}

.if-summary {
  font-weight: bold;
  font-size: 1.05em;
  cursor: pointer;
  outline: none;
  list-style: none;
  display: block;
}

.if-summary::-webkit-details-marker {
  display: none;
}

.details-content {
  margin-top: 15px;
  font-size: 0.92em;
  border-top: 1px solid #333;
  padding-top: 12px;
  color: #dcdcdc !important;
}

/* 颜色与边框样式 */
.border-gold { border-left: 5px solid #d4af37 !important; }
.border-blue { border-left: 5px solid #4a90e2 !important; }
.border-purple { border-left: 5px solid #9b59b6 !important; }
.border-green { border-left: 5px solid #2ecc71 !important; }
.border-gray { border-left: 5px solid #7f8c8d !important; }
.border-orange { border-left: 5px solid #e67e22 !important; }
.border-red { border-left: 5px solid #e74c3c !important; }

.c-gold { color: #d4af37 !important; }
.c-silver { color: #c0c0c0 !important; }
.c-blue { color: #4a90e2 !important; }
.c-purple { color: #9b59b6 !important; }
.c-green { color: #2ecc71 !important; }
.c-orange { color: #e67e22 !important; }
.c-red { color: #e74c3c !important; }
.c-light { color: #ffffff !important; }
.c-muted { color: #aaaaaa !important; }
.c-dark { color: #888888 !important; }

.sub-header {
  border-bottom: 1px dashed #555;
  margin-top: 0;
  padding-bottom: 5px;
}

.sub-header-red {
  border-bottom: 1px solid #e74c3c;
  margin: 15px 0 10px 0;
  padding-bottom: 3px;
}

.if-footer {
  margin-top: 25px;
  text-align: center;
  border-top: 1px solid #333;
  padding-top: 20px;
  font-size: 0.85em;
  letter-spacing: 2px;
}

/* 📱 移动端 Responsive 适配 */
@media (max-width: 600px) {
  .if-container {
    padding: 12px !important;
    border-radius: 8px !important;
  }
  .panel-narrative, .panel-nav {
    padding: 12px !important;
  }
  .if-header { font-size: 1.15em !important; }
  .if-summary { font-size: 0.98em !important; }
  .details-content { font-size: 0.88em !important; }
}