/* FIRE-NINE MATRIX: 2026 九紫离火运空间吉凶体检与工位气场防御卡样式 */

.fire-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.fire-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.fire-modal-container {
  background: #0d111a;
  border: 1px solid rgba(242, 201, 117, 0.35);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 50px rgba(217, 56, 41, 0.15);
  border-radius: 20px;
  max-width: 1040px;
  width: 100%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(15px) scale(0.97);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fire-modal-backdrop.active .fire-modal-container {
  transform: translateY(0) scale(1);
}

.fire-modal-header {
  padding: 14px 22px;
  background: linear-gradient(90deg, #161b26 0%, #10141f 100%);
  border-bottom: 1px solid rgba(242, 201, 117, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fire-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  color: #f2c975;
  letter-spacing: 0.05em;
}

.fire-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.15s;
}

.fire-close-btn:hover {
  background: rgba(217, 56, 41, 0.2);
  color: #fff;
  border-color: #d93829;
}

.fire-modal-body {
  display: grid;
  grid-template-columns: 1fr 470px;
  gap: 20px;
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

@media (max-width: 960px) {
  .fire-modal-body {
    grid-template-columns: 1fr;
  }
}

/* 控制表单区 */
.fire-ctrl-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fire-tab-group {
  display: flex;
  background: rgba(9, 13, 21, 0.85);
  border: 1px solid rgba(242, 201, 117, 0.2);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.fire-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.fire-tab-btn.active {
  background: linear-gradient(135deg, rgba(217, 56, 41, 0.3) 0%, rgba(242, 201, 117, 0.15) 100%);
  color: #fce183;
  border: 1px solid rgba(242, 201, 117, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.fire-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #f2c975;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 8 大朝向快捷选择网格 */
.fire-facing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.fire-facing-card {
  padding: 9px 12px;
  background: rgba(16, 22, 35, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.fire-facing-card:hover {
  border-color: rgba(242, 201, 117, 0.4);
  background: rgba(242, 201, 117, 0.05);
}

.fire-facing-card.active {
  border-color: #f2c975;
  background: linear-gradient(135deg, rgba(217, 56, 41, 0.25) 0%, rgba(242, 201, 117, 0.1) 100%);
  box-shadow: 0 0 14px rgba(242, 201, 117, 0.15);
}

.fire-facing-name {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
}

.fire-facing-card.active .fire-facing-name {
  color: #fce183;
}

.fire-facing-desc {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 形煞标签胶囊多选 */
.fire-sha-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.fire-sha-tag {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(16, 22, 35, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.fire-sha-tag:hover {
  border-color: rgba(217, 56, 41, 0.4);
}

.fire-sha-tag.active {
  background: rgba(217, 56, 41, 0.2);
  border-color: #d93829;
  color: #fca5a5;
  box-shadow: 0 0 10px rgba(217, 56, 41, 0.2);
}

/* 3:4 黄金画幅海报容器 (450 x 600) */
.fire-poster-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#fire-nine-poster-card {
  width: 450px;
  height: 600px;
  background: radial-gradient(ellipse at 50% 10%, #1e131d 0%, #0d0f14 55%, #07080a 100%);
  border: 1.5px solid rgba(242, 201, 117, 0.45);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 0 45px rgba(217, 56, 41, 0.08);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  color: #f8fafc;
  position: relative;
  overflow: hidden;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
}

/* 海报边角金饰 */
.poster-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.poster-corner.tl { top: 10px; left: 10px; border-top: 1px solid #f2c975; border-left: 1px solid #f2c975; }
.poster-corner.tr { top: 10px; right: 10px; border-top: 1px solid #f2c975; border-right: 1px solid #f2c975; }
.poster-corner.bl { bottom: 10px; left: 10px; border-bottom: 1px solid #f2c975; border-left: 1px solid #f2c975; }
.poster-corner.br { bottom: 10px; right: 10px; border-bottom: 1px solid #f2c975; border-right: 1px solid #f2c975; }

/* 海报内部排版 */
.poster-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(242, 201, 117, 0.2);
  padding-bottom: 8px;
}
.poster-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #f2c975;
  display: flex;
  align-items: center;
  gap: 5px;
}
.poster-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d93829;
  box-shadow: 0 0 6px #d93829;
}
.poster-no {
  font-size: 10px;
  font-family: monospace;
  color: rgba(242, 201, 117, 0.6);
}

.poster-hero {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.poster-title-sub {
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
}
.poster-hero-name {
  font-size: 19px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, #fce183 60%, #f2c975 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 2px;
}

.poster-score-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(217, 56, 41, 0.15);
  border: 1px solid rgba(217, 56, 41, 0.4);
  padding: 4px 10px;
  border-radius: 8px;
}
.poster-score-num {
  font-size: 24px;
  font-weight: 900;
  color: #fce183;
  font-family: monospace;
}
.poster-score-label {
  font-size: 10px;
  color: #fca5a5;
  font-weight: 700;
  line-height: 1.2;
}

/* 核心吉位催旺区 */
.poster-corners-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(242, 201, 117, 0.05);
  border: 1px solid rgba(242, 201, 117, 0.2);
  border-radius: 10px;
  padding: 10px;
  margin-top: 2px;
}
.poster-corner-card {
  font-size: 10px;
  line-height: 1.4;
}
.poster-corner-title {
  font-weight: 800;
  color: #f2c975;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}
.poster-corner-tip {
  color: #cbd5e1;
  font-size: 9.5px;
}
.poster-corner-decor {
  color: #fca5a5;
  font-size: 9.5px;
  font-weight: 600;
  margin-top: 2px;
}

/* 形煞化解清单 */
.poster-shas-box {
  background: rgba(14, 18, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 9px 11px;
  margin-top: 2px;
}
.poster-shas-title {
  font-size: 10px;
  font-weight: 800;
  color: #f87171;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.poster-sha-item {
  font-size: 9.5px;
  line-height: 1.4;
  color: #cbd5e1;
  margin-bottom: 4px;
}
.poster-sha-item:last-child {
  margin-bottom: 0;
}
.poster-sha-name {
  color: #fca5a5;
  font-weight: 700;
}
.poster-sha-remedy {
  color: #fce183;
}

/* 离火护身金句 */
.poster-motto-box {
  background: linear-gradient(135deg, rgba(217, 56, 41, 0.2) 0%, rgba(242, 201, 117, 0.08) 100%);
  border-left: 3px solid #d93829;
  padding: 6px 10px;
  border-radius: 4px;
  margin-top: 2px;
}
.poster-motto-text {
  font-size: 10px;
  font-style: italic;
  color: #fef08a;
  line-height: 1.45;
  font-weight: 500;
}

/* 底部防伪与朱砂印 */
.poster-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(242, 201, 117, 0.2);
  padding-top: 8px;
}
.poster-auth-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.poster-seal-box {
  width: 32px;
  height: 32px;
  border: 1.5px solid #d93829;
  background: rgba(217, 56, 41, 0.2);
  color: #f87171;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: serif;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  transform: rotate(2deg);
}
.poster-auth-text {
  font-size: 9px;
  color: #94a3b8;
  line-height: 1.3;
}
.poster-auth-main {
  color: #fce183;
  font-weight: 700;
}

.fire-download-btn {
  background: linear-gradient(135deg, #d93829 0%, #f2c975 100%);
  color: #0d0f14;
  border: 1px solid #f2c975;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 24px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(217, 56, 41, 0.45);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.fire-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 56, 41, 0.6);
}
