/* ===== 사주 전투력 측정 페이지 전용 스타일 ===== */
.gh-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 0;
}
.gh-person-label {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: #8a6b1f;
  letter-spacing: .08em;
  margin-bottom: 12px;
  text-align: center;
}
@media (max-width: 560px) {
  .gh-form-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ===== 로딩 ===== */
#loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}
#results { display: none; }
#results.active { display: block; animation: fadeInUp 0.8s ease; }


.giga-battle-msg {
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(15px, 4vw, 20px);
  font-weight: 700;
  color: #1a1a2e;
  text-align: center;
  margin-bottom: 10px;
  line-height: 1.5;
  word-break: keep-all;
}

.giga-conquer {
  font-size: 13.5px;
  color: #8a6b1f;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ===== VS 그리드 ===== */
.giga-vs-grid {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 24px;
}
.giga-person-card {
  flex: 1;
  background: #fff;
  border: 2px solid rgba(201,168,76,0.2);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  transition: border-color 0.3s;
  min-width: 0;
}
.giga-person-card.giga-winner {
  border-color: #c9a84c;
  background: rgba(201,168,76,0.06);
  box-shadow: 0 4px 20px rgba(201,168,76,0.18);
}
.giga-vs-sep {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: #aaa;
  flex-shrink: 0;
  gap: 2px;
  min-width: 28px;
}
.giga-vs-sep span { font-weight: 700; font-size: 15px; color: #888; }

.giga-type-badge {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  font-weight: 700;
  color: #8a6b1f;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.giga-power-num {
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(36px, 10vw, 52px);
  font-weight: 900;
  color: #1a1a2e;
  line-height: 1;
  margin-bottom: 4px;
}
.giga-power-unit {
  font-size: 13px;
  font-weight: 400;
  color: #888;
  margin-left: 4px;
  vertical-align: middle;
}

.giga-bar-wrap {
  height: 7px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0 12px;
}
.giga-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}
.giga-bar-p1 { background: linear-gradient(90deg, #c9a84c, #a8822a); }
.giga-bar-p2 { background: linear-gradient(90deg, #b8324a, #8a1f35); }

.giga-person-name {
  font-size: 11px;
  color: #999;
  letter-spacing: .04em;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.giga-type-desc {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
  word-break: keep-all;
}

/* ===== 레이더 차트 ===== */
.giga-radar-wrap {
  text-align: center;
  margin: 8px 0 20px;
}
.giga-radar-wrap canvas {
  display: block;
  margin: 0 auto;
  max-width: 280px;
  max-height: 280px;
}
.giga-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 10px;
  font-size: 12px;
  font-family: 'Noto Serif KR', serif;
}
.giga-legend-p1 { color: #a8822a; font-weight: 700; }
.giga-legend-p2 { color: #b8324a; font-weight: 700; }

/* ===== 어드바이스 박스 ===== */
.giga-advice {
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.giga-advice p {
  margin: 0 0 6px;
  font-size: 13.5px;
  color: #444;
  line-height: 1.7;
  word-break: keep-all;
}
.giga-advice p:last-child { margin-bottom: 0; }


.fun-note {
  text-align: center;
  font-size: 13px;
  color: #888;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .giga-vs-grid { flex-direction: column; }
  .giga-vs-sep { flex-direction: row; gap: 6px; padding: 4px 0; }
  .giga-vs-sep span { display: inline; }
}

/* ===== 전투력 충돌 연출 ===== */
@keyframes gigaOrbLeft {
  0%   { transform: translateX(-110px) scale(0.35); opacity: 0; }
  55%  { transform: translateX(0)       scale(1.14); opacity: 1; }
  74%  { transform: translateX(9px)     scale(0.95); opacity: 1; }
  100% { transform: translateX(0)       scale(1);    opacity: 1; }
}
@keyframes gigaOrbRight {
  0%   { transform: translateX(110px)  scale(0.35); opacity: 0; }
  55%  { transform: translateX(0)       scale(1.14); opacity: 1; }
  74%  { transform: translateX(-9px)    scale(0.95); opacity: 1; }
  100% { transform: translateX(0)       scale(1);    opacity: 1; }
}
@keyframes gigaSpark {
  0%,43%  { transform: translate(-50%,-50%) scale(0)   rotate(0deg);   opacity: 0; }
  56%     { transform: translate(-50%,-50%) scale(2.5)  rotate(180deg); opacity: 1; }
  100%    { transform: translate(-50%,-50%) scale(0)   rotate(360deg); opacity: 0; }
}
@keyframes gigaRankPop {
  0%   { transform: scale(0) rotate(-10deg); opacity: 0; }
  62%  { transform: scale(1.14) rotate(3deg); opacity: 1; }
  80%  { transform: scale(0.96) rotate(-1deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes gigaRankGlow {
  0%,100% { text-shadow: 0 0 10px currentColor; }
  50%     { text-shadow: 0 0 32px currentColor, 0 0 60px currentColor; }
}
@keyframes gigaArenaShake {
  0%,100% { transform: translateX(0); }
  18%     { transform: translateX(-7px); }
  36%     { transform: translateX(7px); }
  54%     { transform: translateX(-5px); }
  72%     { transform: translateX(5px); }
}
.giga-clash-arena {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  margin: 6px 0 14px;
  overflow: visible;
  animation: gigaArenaShake 0.52s ease 0.9s both;
}
.giga-clash-orb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
  opacity: 0;
  animation-fill-mode: both;
  animation-duration: 0.82s;
  animation-timing-function: cubic-bezier(.34,1.56,.64,1);
  animation-delay: 0.08s;
}
.giga-orb1 { animation-name: gigaOrbLeft; }
.giga-orb2 { animation-name: gigaOrbRight; }
.giga-clash-spark {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 36px;
  line-height: 1;
  animation: gigaSpark 1s ease-out 0.5s both;
}
/* ===== 등급별 전용 애니메이션 ===== */
@keyframes gigaPredatorPulse {
  0%,100% { box-shadow: 0 0 14px rgba(193,18,31,.25); }
  50%     { box-shadow: 0 0 44px rgba(193,18,31,.72), 0 0 88px rgba(193,18,31,.18); }
}
@keyframes gigaUpperSurge {
  0%,100% { box-shadow: 0 0 10px rgba(224,123,0,.18); border-color: #e07b00; }
  50%     { box-shadow: 0 0 34px rgba(255,160,30,.60), 0 0 68px rgba(255,160,30,.14); border-color: #ffaa30; }
}
@keyframes gigaEqualElectric {
  0%,100% { border-color: #7968ee; box-shadow: 0 0 10px rgba(121,104,238,.28); }
  38%,62% { border-color: #ee5060; box-shadow: 0 0 26px rgba(238,80,96,.58), 0 0 52px rgba(238,80,96,.14); }
}
@keyframes gigaLowerBreath {
  0%,100% { box-shadow: 0 0 8px rgba(43,126,161,.14); opacity: .94; }
  50%     { box-shadow: 0 0 26px rgba(43,126,161,.42); opacity: 1; }
}
@keyframes gigaLambPeace {
  0%,100% { box-shadow: 0 0 8px rgba(64,145,108,.12); }
  50%     { box-shadow: 0 0 24px rgba(64,145,108,.38), 0 0 48px rgba(64,145,108,.08); }
}
/* ===== 배틀 등급 배너 ===== */
.giga-rank-banner {
  border-radius: 16px;
  padding: 20px 18px 16px;
  margin: 0 0 16px;
  text-align: center;
  opacity: 0;
}
.giga-rank-predator {
  background: linear-gradient(135deg, #fff5f5, #fff0f0);
  border: 1.5px solid #c1121f;
  color: #c1121f;
  animation: gigaRankPop 0.7s cubic-bezier(.34,1.56,.64,1) 0.92s both,
             gigaPredatorPulse 1.8s ease-in-out 1.65s infinite;
}
.giga-rank-upper {
  background: linear-gradient(135deg, #fffaf0, #fff5e0);
  border: 1.5px solid #e07b00;
  color: #b85e00;
  animation: gigaRankPop 0.7s cubic-bezier(.34,1.56,.64,1) 0.92s both,
             gigaUpperSurge 2.4s ease-in-out 1.65s infinite;
}
.giga-rank-equal {
  background: linear-gradient(135deg, #f8f7ff, #f2f0ff);
  border: 1.5px solid #7968ee;
  color: #5244c8;
  animation: gigaRankPop 0.7s cubic-bezier(.34,1.56,.64,1) 0.92s both,
             gigaEqualElectric 2s ease-in-out 1.65s infinite;
}
.giga-rank-lower {
  background: linear-gradient(135deg, #f0f8ff, #e8f4fb);
  border: 1.5px solid #2b7ea1;
  color: #1a5f7a;
  animation: gigaRankPop 0.7s cubic-bezier(.34,1.56,.64,1) 0.92s both,
             gigaLowerBreath 3.5s ease-in-out 1.65s infinite;
}
.giga-rank-lamb {
  background: linear-gradient(135deg, #f0faf5, #e8f5ee);
  border: 1.5px solid #40916c;
  color: #2d6a4f;
  animation: gigaRankPop 0.7s cubic-bezier(.34,1.56,.64,1) 0.92s both,
             gigaLambPeace 4s ease-in-out 1.65s infinite;
}
.giga-rank-label {
  font-family: 'Gowun Batang', serif;
  font-size: 11px;
  letter-spacing: .09em;
  opacity: 0.65;
  margin-bottom: 5px;
}
.giga-rank-title {
  font-family: 'Black Han Sans', 'Noto Serif KR', serif;
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 900;
  letter-spacing: .05em;
  margin-bottom: 8px;
  animation: gigaRankGlow 2.2s ease-in-out 1.6s infinite;
}
.giga-rank-desc {
  font-size: 13.5px;
  line-height: 1.65;
  opacity: 0.88;
  word-break: keep-all;
}
