/* ===== 无限流板块专用样式（暗色+琥珀金，独立于全局主题）===== */

.iflow-dark {
  background: #14100c !important;
  color: #e8d9b0 !important;
}

.iflow-dark .mod-hdr {
  background: #1c1712 !important;
  border-bottom: 1px solid #3a2f1e !important;
  color: #e8d9b0 !important;
}
.iflow-dark .mod-hdr .mod-title { color: #e8d9b0 !important; }
.iflow-dark .mod-hdr .back { color: #c9a85c !important; }

/* 大厅 */
.iflow-btn-main {
  display: block;
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  background: linear-gradient(135deg, #2a2115, #1c1712);
  border: 1px solid #8a6d3b;
  border-radius: 12px;
  color: #e8d9b0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all .2s;
  box-sizing: border-box;
}
.iflow-btn-main:hover, .iflow-btn-main:active {
  border-color: #c9a85c;
  box-shadow: 0 0 12px rgba(201, 168, 92, .25);
}

.iflow-section-title {
  text-align: center;
  font-size: 12px;
  color: #8a6d3b;
  letter-spacing: 3px;
  margin: 22px 0 10px;
}

.iflow-save-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #1c1712;
  border: 1px solid #3a2f1e;
  border-radius: 10px;
  cursor: pointer;
}
.iflow-save-item:active { border-color: #8a6d3b; }

.iflow-del-btn {
  background: none;
  border: none;
  color: #6b5a3d;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

/* 设置页表单（沿用 form-group 结构，覆盖配色） */
.iflow-dark .form-label { color: #c9a85c !important; }
.iflow-dark .form-inp, .iflow-dark .form-area {
  background: #1c1712 !important;
  border: 1px solid #3a2f1e !important;
  color: #e8d9b0 !important;
}
.iflow-dark .btn-primary {
  background: linear-gradient(135deg, #8a6d3b, #c9a85c) !important;
  color: #14100c !important;
  font-weight: 700;
}

/* 游戏界面 */
.iflow-toolbar {
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  background: #1c1712;
  border-bottom: 1px solid #3a2f1e;
  flex-shrink: 0;
}
.iflow-toolbar button {
  flex: 1;
  padding: 7px 0;
  background: #14100c;
  border: 1px solid #3a2f1e;
  border-radius: 8px;
  color: #c9a85c;
  font-size: 12px;
  cursor: pointer;
}
.iflow-toolbar button:active { border-color: #8a6d3b; }

.iflow-narrative {
  font-size: 15px;
  line-height: 2;
  margin: 14px 0;
  color: #e8d9b0;
  text-shadow: 0 0 20px rgba(201, 168, 92, .06);
}

.iflow-player-action {
  margin: 12px 0;
  padding: 8px 12px;
  border-left: 3px solid #8a6d3b;
  background: rgba(138, 109, 59, .08);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #c9a85c;
}
.iflow-to-comp { border-left-color: #7d6ba0; color: #b3a4d4; background: rgba(125, 107, 160, .08); }

.iflow-companion {
  margin: 12px 0;
  padding: 10px 14px;
  background: rgba(125, 107, 160, .12);
  border: 1px solid rgba(125, 107, 160, .35);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.8;
  color: #d8cfe8;
}
.iflow-comp-name {
  display: block;
  font-size: 11px;
  color: #9d8bc0;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.iflow-sysmsg {
  text-align: center;
  font-size: 12px;
  color: #8a6d3b;
  margin: 10px 0;
  letter-spacing: 1px;
}

.iflow-option-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  margin: 6px 0;
  background: #1c1712;
  border: 1px solid #3a2f1e;
  border-radius: 10px;
  color: #e8d9b0;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  transition: all .15s;
  box-sizing: border-box;
}
.iflow-option-btn:hover, .iflow-option-btn:active {
  border-color: #c9a85c;
  background: #241d13;
}

.iflow-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #1c1712;
  border-top: 1px solid #3a2f1e;
  align-items: flex-end;
  flex-shrink: 0;
}
.iflow-input-row textarea {
  flex: 1;
  min-height: 40px;
  max-height: 100px;
  padding: 10px 12px;
  background: #14100c;
  border: 1px solid #3a2f1e;
  border-radius: 10px;
  color: #e8d9b0;
  font-size: 14px;
  resize: none;
  box-sizing: border-box;
}
.iflow-input-row textarea.iflow-comp-mode { border-color: #7d6ba0; }
.iflow-input-row button {
  padding: 10px 14px;
  background: #2a2115;
  border: 1px solid #8a6d3b;
  border-radius: 10px;
  color: #c9a85c;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
}
.iflow-input-row button.iflow-comp-active {
  border-color: #7d6ba0;
  color: #b3a4d4;
  background: rgba(125, 107, 160, .15);
}

.iflow-loading {
  text-align: center;
  padding: 18px;
  color: #8a6d3b;
  font-size: 13px;
  font-style: italic;
}
.iflow-dice {
  display: inline-block;
  animation: iflowRoll 1.1s ease-in-out infinite;
}
@keyframes iflowRoll {
  0%, 100% { transform: rotate(0deg); opacity: .5; }
  50% { transform: rotate(180deg); opacity: 1; }
}

/* 面板弹窗 */
.iflow-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, .65);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}
.iflow-modal-box {
  background: #1c1712;
  border: 1px solid #8a6d3b;
  border-radius: 14px;
  width: 88%;
  max-width: 420px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e8d9b0;
}
.iflow-modal-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #3a2f1e;
  font-weight: 700;
  color: #c9a85c;
}
.iflow-modal-body {
  padding: 14px 16px;
  overflow-y: auto;
}
.iflow-modal-item {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #14100c;
  border: 1px solid #3a2f1e;
  border-radius: 10px;
}

/* 结局页 */
.iflow-ending-summary {
  padding: 16px;
  background: #1c1712;
  border: 1px solid #3a2f1e;
  border-radius: 12px;
  font-size: 14px;
  line-height: 2;
}
.iflow-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: center;
  font-size: 12px;
  color: #a8987a;
}
.iflow-stats-grid > div {
  padding: 12px 0;
  background: #1c1712;
  border: 1px solid #3a2f1e;
  border-radius: 10px;
}
.iflow-stats-grid b { font-size: 17px; color: #e8d9b0; }
