/* =====================================================
   HOW TO PLAY — Dedicated Stylesheet
   Everything centered. Animations on everything.
   BADASS EDITION.
   ===================================================== */

/* --- Hero Subtitle --- */
.htp-hero-subtitle {
  position: relative;
  z-index: 2;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  margin-top: 1.2rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.6s forwards;
}

/* --- Page Container --- */
.htp-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
  text-align: center;
}

/* --- Chapter Numbers --- */
.htp-chapter-num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(139, 0, 0, 0.25);
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
  user-select: none;
  animation: chapterPulse 4s ease-in-out infinite;
}

@keyframes chapterPulse {
  0%, 100% { -webkit-text-stroke-color: rgba(139, 0, 0, 0.2); }
  50% { -webkit-text-stroke-color: rgba(139, 0, 0, 0.45); }
}

/* --- Blood Divider --- */
.htp-blood-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 1rem 0 4rem;
  padding: 1rem 0;
}

.htp-blood-divider span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--crimson);
  opacity: 0.5;
  animation: bloodDot 2s ease-in-out infinite;
}

.htp-blood-divider span:nth-child(2) {
  animation-delay: 0.3s;
  width: 8px;
  height: 8px;
  opacity: 0.7;
}

.htp-blood-divider span:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes bloodDot {
  0%, 100% { transform: scale(1); opacity: 0.3; box-shadow: 0 0 0 rgba(139, 0, 0, 0); }
  50% { transform: scale(1.5); opacity: 0.8; box-shadow: 0 0 12px rgba(196, 30, 30, 0.5); }
}

/* --- Block Sections --- */
.htp-block {
  margin-bottom: 2rem;
}

.htp-title {
  text-align: center;
  margin-bottom: 0.8rem;
}

.htp-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  text-align: center;
}

/* --- Fact Pills --- */
.htp-facts {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.htp-fact-pill {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(15, 15, 25, 0.85);
  border: 1px solid rgba(139, 0, 0, 0.2);
  border-radius: 50px;
  padding: 0.8rem 1.4rem;
  transition: all 0.3s ease;
}

.htp-fact-pill:hover {
  border-color: rgba(139, 0, 0, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(139, 0, 0, 0.15);
}

.htp-fact-img { width: 30px; height: 30px; flex-shrink: 0; }
.htp-fact-emoji { font-size: 1.4rem; flex-shrink: 0; width: 30px; text-align: center; }
.htp-fact-pill strong { display: block; font-family: var(--font-ui); font-size: 0.8rem; color: #fff; text-transform: uppercase; letter-spacing: 0.03em; }
.htp-fact-pill span { font-family: var(--font-body); font-size: 0.7rem; color: var(--text-muted); }
.htp-fact-pill div { text-align: left; }

/* =====================================================
   STEPS — Each step is a centered card
   ===================================================== */
.htp-step {
  background: linear-gradient(135deg, rgba(15, 15, 25, 0.9) 0%, rgba(8, 8, 15, 0.95) 100%);
  border: 1px solid rgba(139, 0, 0, 0.15);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.htp-step::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--crimson), transparent);
}

.htp-step:hover {
  border-color: rgba(139, 0, 0, 0.35);
  box-shadow: 0 0 40px rgba(139, 0, 0, 0.1), inset 0 0 60px rgba(139, 0, 0, 0.02);
}

.htp-step--gold { border-color: rgba(212, 168, 50, 0.2); }
.htp-step--gold::before { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.htp-step--gold:hover { border-color: rgba(212, 168, 50, 0.4); box-shadow: 0 0 40px rgba(212, 168, 50, 0.1); }

.htp-step-badge {
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--crimson);
  border-radius: 50%;
  font-family: var(--font-ui);
  font-weight: 700; font-size: 1.2rem; color: #fff;
  margin-bottom: 1rem;
  box-shadow: 0 0 20px rgba(196, 30, 30, 0.3);
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 15px rgba(196, 30, 30, 0.2); }
  50% { box-shadow: 0 0 25px rgba(196, 30, 30, 0.5); }
}

.htp-step-badge--gold {
  background: var(--gold);
  color: #111;
  box-shadow: 0 0 20px rgba(212, 168, 50, 0.3);
  animation: badgePulseGold 3s ease-in-out infinite;
}

@keyframes badgePulseGold {
  0%, 100% { box-shadow: 0 0 15px rgba(212, 168, 50, 0.2); }
  50% { box-shadow: 0 0 25px rgba(212, 168, 50, 0.5); }
}

.htp-step-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.htp-step-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.8rem;
  max-width: 500px;
  margin-left: auto; margin-right: auto;
}

/* =====================================================
   CARD FLIP ANIMATION
   ===================================================== */
.htp-flip-scene {
  perspective: 800px;
  display: inline-block;
}

.htp-flip-card {
  width: 160px;
  height: 224px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  margin: 0 auto;
}

.htp-flip-scene:hover .htp-flip-card {
  transform: rotateY(180deg);
}

.htp-flip-front,
.htp-flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.htp-flip-front img,
.htp-flip-back img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.htp-flip-back {
  transform: rotateY(180deg);
}

.htp-flip-hint {
  display: block;
  margin-top: 0.8rem;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  opacity: 0.6;
  animation: hintPulse 2s ease infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* =====================================================
   BATTLE CLASH ANIMATION
   ===================================================== */
.htp-battle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1rem;
}

.htp-fighter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.htp-fighter img {
  width: 120px;
  border-radius: 8px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.htp-step:hover .htp-fighter-left img {
  transform: rotate(-5deg) translateX(-8px) scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 200, 0, 0.25);
}

.htp-step:hover .htp-fighter-right img {
  transform: rotate(5deg) translateX(8px) scale(1.05);
  box-shadow: 0 8px 30px rgba(200, 0, 0, 0.25);
}

.htp-fighter-tier {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.htp-fighter-tier strong { color: #fff; font-size: 0.85rem; }

.htp-clash {
  position: relative;
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.htp-clash-burst {
  position: absolute;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 0, 0, 0.3) 0%, transparent 70%);
  animation: clashPulse 1.5s ease infinite;
}

@keyframes clashPulse {
  0%, 100% { transform: scale(0.8); opacity: 0.3; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.htp-step:hover .htp-clash-burst {
  animation: clashExplode 0.4s ease forwards;
}

@keyframes clashExplode {
  0% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(2); opacity: 1; background: radial-gradient(circle, rgba(255, 100, 0, 0.5) 0%, transparent 70%); }
  100% { transform: scale(1.2); opacity: 0.6; }
}

.htp-clash-vs {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--crimson);
  text-shadow: 0 0 20px rgba(139, 0, 0, 0.6);
  z-index: 3;
  position: relative;
}

.htp-battle-result {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Winner tag badge */
.htp-winner-tag {
  display: inline-block;
  background: linear-gradient(135deg, #1a8a1a, #2cc02c);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 20px;
  box-shadow: 0 0 12px rgba(44, 192, 44, 0.3);
  animation: winnerGlow 2s ease-in-out infinite;
}

@keyframes winnerGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(44, 192, 44, 0.2); }
  50% { box-shadow: 0 0 18px rgba(44, 192, 44, 0.5); }
}

/* =====================================================
   GRAVEYARD SCENE
   ===================================================== */
.htp-graveyard-scene {
  position: relative;
  display: inline-block;
}

.htp-graveyard-img {
  width: 120px;
  filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.5));
}

.htp-grave-card {
  position: absolute;
  top: -10px; right: -30px;
  width: 55px;
  animation: cardFall 2s ease infinite;
}

.htp-grave-card img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  opacity: 0.7;
}

@keyframes cardFall {
  0% { transform: translateY(-15px) rotate(-5deg); opacity: 0.9; }
  60% { transform: translateY(8px) rotate(3deg); opacity: 0.5; }
  100% { transform: translateY(-15px) rotate(-5deg); opacity: 0.9; }
}

/* =====================================================
   DICE SCENE
   ===================================================== */
.htp-dice-scene {
  position: relative;
  display: inline-block;
}

.htp-dice-img {
  width: 220px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}

.htp-dice-bounce {
  position: absolute;
  bottom: -15px; right: -20px;
  width: 40px; height: 40px;
  animation: diceBounce 1.2s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
}

@keyframes diceBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-20px) rotate(90deg); }
  60% { transform: translateY(-5px) rotate(180deg); }
}

/* =====================================================
   CARD ANATOMY — Annotated card with labeled callouts
   ===================================================== */
.htp-card-anatomy {
  display: flex;
  gap: 3rem;
  align-items: center;
  justify-content: center;
}

.htp-anatomy-card {
  position: relative;
  flex-shrink: 0;
  width: 240px;
}

.htp-anatomy-card > img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 0, 0, 0.1);
  transition: transform 0.4s ease;
}

.htp-anatomy-card:hover > img {
  transform: scale(1.02);
}

.htp-anatomy-label {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  opacity: 0;
  animation: labelFadeIn 0.5s ease forwards;
}

.htp-anatomy-label:nth-child(2) { animation-delay: 0.3s; }
.htp-anatomy-label:nth-child(3) { animation-delay: 0.5s; }
.htp-anatomy-label:nth-child(4) { animation-delay: 0.7s; }
.htp-anatomy-label:nth-child(5) { animation-delay: 0.9s; }

@keyframes labelFadeIn {
  0% { opacity: 0; transform: translateX(10px); }
  100% { opacity: 1; transform: translateX(0); }
}

.htp-label-text {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.75);
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid rgba(212, 168, 50, 0.3);
}

.htp-label-line {
  display: block;
  width: 30px;
  height: 1px;
  background: rgba(212, 168, 50, 0.4);
}

.htp-label-name {
  top: 8%;
  left: -90px;
  flex-direction: row-reverse;
}

.htp-label-tier {
  top: 8%;
  right: -70px;
}

.htp-label-points {
  top: 18%;
  right: -70px;
}

.htp-label-logo {
  bottom: 8%;
  right: -80px;
}

.htp-anatomy-desc {
  flex: 1;
  text-align: left;
}

.htp-anatomy-desc p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.htp-anatomy-desc ul {
  list-style: none;
  padding: 0;
}

.htp-anatomy-desc li {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 0.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid rgba(139, 0, 0, 0.3);
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.htp-anatomy-desc li:hover {
  border-left-color: var(--crimson);
  padding-left: 1.3rem;
  background: rgba(139, 0, 0, 0.03);
}

/* =====================================================
   TIER TOWER — Centered, 1 card each, with rank numbers
   ===================================================== */
.htp-tier-tower {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 650px;
  margin: 0 auto 3rem;
}

.htp-tier {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.4s ease;
  text-align: left;
}

.htp-tier:hover {
  transform: translateX(6px);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

/* Rank number (#1, #2, etc.) */
.htp-tier-rank {
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.4;
  width: 20px;
  text-align: center;
  letter-spacing: -0.02em;
}

.htp-tier:hover .htp-tier-rank {
  opacity: 0.8;
}

.htp-tier-badge {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: flex;
  align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: var(--font-ui);
  font-weight: 700; font-size: 0.85rem;
  color: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease;
}

.htp-tier:hover .htp-tier-badge {
  transform: scale(1.1);
}

.htp-tier-body {
  flex: 1;
  min-width: 0;
}

.htp-tier-body h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 0.15rem;
}

.htp-tier-body p {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.htp-tier-card {
  flex-shrink: 0;
}

.htp-tier-card img {
  width: 60px;
  border-radius: 5px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.4s ease;
}

.htp-tier:hover .htp-tier-card img {
  transform: translateY(-5px) scale(1.08);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* Tier color accents */
.htp-tier--oracle:hover { border-color: rgba(212, 168, 50, 0.3); }
.htp-tier--oracle .htp-tier-body h3 { color: var(--gold); }
.htp-tier--oracle:hover .htp-tier-badge { box-shadow: 0 0 25px rgba(212, 168, 50, 0.5); }

.htp-tier--fallen:hover { border-color: rgba(100, 150, 220, 0.3); }
.htp-tier--fallen .htp-tier-body h3 { color: #8ab4f8; }
.htp-tier--fallen:hover .htp-tier-badge { box-shadow: 0 0 20px rgba(100, 150, 220, 0.4); }

.htp-tier--shadow:hover { border-color: rgba(100, 100, 130, 0.3); }
.htp-tier--shadow .htp-tier-body h3 { color: #aaa; }

.htp-tier--squad:hover { border-color: rgba(200, 120, 30, 0.3); }
.htp-tier--squad .htp-tier-body h3 { color: #e8a030; }

.htp-tier--demon:hover { border-color: rgba(200, 30, 30, 0.3); }
.htp-tier--demon .htp-tier-body h3 { color: #e84040; }
.htp-tier--demon:hover .htp-tier-badge { box-shadow: 0 0 20px rgba(200, 30, 30, 0.4); }

.htp-tier--monster:hover { border-color: rgba(50, 180, 50, 0.3); }
.htp-tier--monster .htp-tier-body h3 { color: #55cc55; }

.htp-tier--ghost:hover { border-color: rgba(80, 200, 140, 0.3); }
.htp-tier--ghost .htp-tier-body h3 { color: #60cc90; }

.htp-tier--undead:hover { border-color: rgba(160, 130, 50, 0.3); }
.htp-tier--undead .htp-tier-body h3 { color: #bba040; }

.htp-tier--warrior:hover { border-color: rgba(180, 130, 60, 0.3); }
.htp-tier--warrior .htp-tier-body h3 { color: #cc9944; }

.htp-tier--mortal:hover { border-color: rgba(100, 100, 100, 0.3); }
.htp-tier--mortal .htp-tier-body h3 { color: #999; }

/* =====================================================
   CHAOS CALLOUT
   ===================================================== */
.htp-chaos-callout {
  background: linear-gradient(135deg, rgba(20, 8, 8, 0.9) 0%, rgba(10, 5, 15, 0.95) 100%);
  border: 1px solid rgba(139, 0, 0, 0.25);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.htp-chaos-callout::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--crimson), var(--crimson-glow), var(--crimson), transparent);
  animation: chaosLine 3s ease-in-out infinite;
}

@keyframes chaosLine {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.htp-chaos-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  text-align: left;
}

.htp-chaos-icon {
  font-size: 2rem;
  animation: chaosRotate 4s linear infinite;
}

@keyframes chaosRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.htp-chaos-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--crimson);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.htp-chaos-header p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.htp-chaos-showcase {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.htp-showcase-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.htp-showcase-card img {
  width: 80px;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.htp-showcase-card:hover img {
  transform: translateY(-8px) scale(1.06);
  box-shadow: 0 12px 30px rgba(139, 0, 0, 0.3);
}

.htp-showcase-card span {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.htp-link-arrow {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--crimson);
  text-decoration: none;
  transition: all 0.3s ease;
}

.htp-link-arrow:hover {
  color: #ff4444;
  letter-spacing: 0.18em;
}

/* =====================================================
   SPECIAL MECHANICS — 3 columns
   ===================================================== */
.htp-mechanics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.htp-mechanic {
  background: linear-gradient(135deg, rgba(15, 15, 25, 0.9) 0%, rgba(8, 8, 15, 0.95) 100%);
  border: 1px solid rgba(139, 0, 0, 0.12);
  border-radius: 14px;
  padding: 2rem 1.2rem;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.htp-mechanic::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--crimson), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.htp-mechanic:hover::after {
  opacity: 1;
}

.htp-mechanic:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 0, 0, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(139, 0, 0, 0.08);
}

.htp-mechanic h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.htp-mechanic p {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.htp-mechanic-visual {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

/* --- Weapon Fan Animation --- */
.htp-weapon-fan {
  position: relative;
  width: 130px; height: 140px;
}

.htp-weapon-fan img {
  position: absolute;
  width: 70px;
  border-radius: 5px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  top: 50%; left: 50%;
  transform-origin: bottom center;
}

.htp-fan-1 { transform: translate(-50%, -85%) rotate(-15deg); }
.htp-fan-2 { transform: translate(-50%, -85%) rotate(-5deg); }
.htp-fan-3 { transform: translate(-50%, -85%) rotate(5deg); }
.htp-fan-4 { transform: translate(-50%, -85%) rotate(15deg); }

.htp-mechanic:hover .htp-fan-1 { transform: translate(-50%, -85%) rotate(-25deg) translateY(-5px); }
.htp-mechanic:hover .htp-fan-2 { transform: translate(-50%, -85%) rotate(-8deg) translateY(-8px); }
.htp-mechanic:hover .htp-fan-3 { transform: translate(-50%, -85%) rotate(8deg) translateY(-8px); }
.htp-mechanic:hover .htp-fan-4 { transform: translate(-50%, -85%) rotate(25deg) translateY(-5px); }

/* --- Rival Clash Animation --- */
.htp-rival-clash {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}

.htp-rival-l, .htp-rival-r {
  width: 70px;
  border-radius: 5px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.htp-mechanic:hover .htp-rival-l {
  transform: rotate(-8deg) translateX(-6px);
  box-shadow: 0 6px 20px rgba(200, 0, 0, 0.2);
}

.htp-mechanic:hover .htp-rival-r {
  transform: rotate(8deg) translateX(6px);
  box-shadow: 0 6px 20px rgba(200, 0, 0, 0.2);
}

.htp-rival-spark {
  font-size: 1.5rem;
  position: relative;
  z-index: 2;
  animation: sparkFlicker 0.8s ease infinite;
  margin: 0 -5px;
}

@keyframes sparkFlicker {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

.htp-mechanic:hover .htp-rival-spark {
  animation: sparkExplode 0.3s ease forwards;
}

@keyframes sparkExplode {
  0% { transform: scale(1); }
  50% { transform: scale(2); }
  100% { transform: scale(1.4); }
}

/* --- Tag Team Pair Animation --- */
.htp-tagteam-pair {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.htp-tag-l, .htp-tag-r {
  width: 70px;
  border-radius: 5px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.htp-mechanic:hover .htp-tag-l {
  transform: translateX(-4px) scale(1.05);
  box-shadow: 0 6px 20px rgba(85, 204, 85, 0.15);
}

.htp-mechanic:hover .htp-tag-r {
  transform: translateX(4px) scale(1.05);
  box-shadow: 0 6px 20px rgba(85, 204, 85, 0.15);
}

.htp-tag-plus {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--gold);
  text-shadow: 0 0 15px rgba(212, 168, 50, 0.5);
  transition: all 0.3s ease;
}

.htp-mechanic:hover .htp-tag-plus {
  transform: scale(1.3);
  text-shadow: 0 0 25px rgba(212, 168, 50, 0.8);
}

/* =====================================================
   WINNING
   ===================================================== */
.htp-win-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.htp-win {
  background: linear-gradient(135deg, rgba(15, 15, 25, 0.9) 0%, rgba(8, 8, 15, 0.95) 100%);
  border: 1px solid rgba(212, 168, 50, 0.15);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  flex: 1;
  max-width: 280px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.htp-win::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.htp-win:hover::before {
  opacity: 1;
}

.htp-win:hover {
  border-color: rgba(212, 168, 50, 0.4);
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(212, 168, 50, 0.1), 0 0 40px rgba(0, 0, 0, 0.3);
}

.htp-win-icon {
  width: 80px;
  height: 100px;
  margin: 0 auto 0.8rem;
}
.htp-win-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(212, 168, 50, 0.3));
  transition: transform 0.3s ease;
}
.htp-win:hover .htp-win-icon img {
  transform: scale(1.15) rotate(-3deg);
}

/* Oracle Fan — 3 cards fanned out */
.htp-oracle-fan {
  position: relative;
  width: 140px;
  height: 110px;
  margin: 0 auto 0.8rem;
}
.oracle-fan-card {
  position: absolute;
  width: 70px;
  border-radius: 5px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  transition: transform 0.4s ease;
  top: 50%;
  left: 50%;
  transform-origin: bottom center;
}
.oracle-fan-1 {
  transform: translate(-50%, -50%) rotate(-15deg);
  z-index: 1;
}
.oracle-fan-2 {
  transform: translate(-50%, -50%) rotate(0deg);
  z-index: 2;
}
.oracle-fan-3 {
  transform: translate(-50%, -50%) rotate(15deg);
  z-index: 1;
}
.htp-win:hover .oracle-fan-1 {
  transform: translate(-50%, -50%) rotate(-22deg);
}
.htp-win:hover .oracle-fan-2 {
  transform: translate(-50%, -55%) rotate(0deg) scale(1.05);
}
.htp-win:hover .oracle-fan-3 {
  transform: translate(-50%, -50%) rotate(22deg);
}

.htp-win h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.htp-win p {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* =====================================================
   FINAL CTA — Killer ending
   ===================================================== */
.htp-final-cta {
  text-align: center;
  padding: 4rem 2rem;
  margin-top: 2rem;
  position: relative;
}

.htp-final-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 0, 0, 0.3), transparent);
}

.htp-cta-skull {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
  animation: skullPulse 3s ease-in-out infinite;
}

@keyframes skullPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); filter: drop-shadow(0 0 15px rgba(139, 0, 0, 0.4)); }
}

.htp-cta-headline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--crimson);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(196, 30, 30, 0.3);
}

.htp-cta-sub {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.htp-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =====================================================
   SCROLL-DRIVEN INITIAL STATES
   transition: none kills CSS transitions so JS has
   instant, 1:1 control tied to scroll position.
   ===================================================== */

/* Steps: fade up */
.htp-step {
  opacity: 0;
  transition: none;
  will-change: opacity, transform;
}

/* Tier rows: fade up, staggered */
.htp-tier {
  opacity: 0;
  transition: none;
  will-change: opacity, transform;
}
.htp-tier-badge { transition: none; }
.htp-tier-card img { transition: none; }

/* Mechanic cards: rise up staggered */
.htp-mechanic {
  opacity: 0;
  transition: none;
  will-change: opacity, transform;
}
/* Kill transitions on all inner mechanic elements so JS controls them */
.htp-weapon-fan img { transition: none; }
.htp-rival-l, .htp-rival-r { transition: none; }
.htp-rival-spark { transition: none; animation: none; }
.htp-tag-l, .htp-tag-r { transition: none; }
.htp-tag-plus { transition: none; }

/* Win cards: scale up from small */
.htp-win {
  opacity: 0;
  transition: none;
  will-change: opacity, transform;
}
.htp-win-icon img { transition: none; }
.oracle-fan-card { transition: none; }

/* Fact pills: stagger in */
.htp-fact-pill {
  opacity: 0;
  transition: none;
  will-change: opacity, transform;
}

/* Chaos showcase cards: stagger in */
.htp-chaos-showcase .htp-showcase-card {
  opacity: 0;
  will-change: opacity, transform;
}
.htp-chaos-showcase .htp-showcase-card img { transition: none; }

/* HTP card flip — starts face-down, scroll reveals */
.htp-flip-card {
  transform: rotateY(0deg); /* starts showing card back (front face) */
  transition: none;
}

/* Battle fighters — start transparent, scroll-driven tilt via JS */
.htp-fighter-left {
  opacity: 0;
  will-change: opacity;
}
.htp-fighter-right {
  opacity: 0;
  will-change: opacity;
}
.htp-fighter img { transition: none; }
.htp-clash {
  opacity: 0;
  will-change: opacity;
}
.htp-clash-burst { transition: none; animation: none; }
.htp-battle-result {
  opacity: 0;
  will-change: opacity;
}

/* Section titles & subtitles — scroll-driven fade up */
.htp-title {
  opacity: 0;
  will-change: opacity, transform;
}
.htp-subtitle {
  opacity: 0;
  will-change: opacity, transform;
}

/* Card anatomy — scroll-driven (override CSS keyframe) */
.htp-anatomy-card {
  opacity: 0;
  will-change: opacity, transform;
}
.htp-anatomy-card > img { transition: none; }
.htp-anatomy-label {
  animation: none;
  opacity: 0;
  will-change: opacity, transform;
}
.htp-anatomy-desc {
  opacity: 0;
  will-change: opacity, transform;
}

/* Graveyard scene — scroll-driven */
.htp-graveyard-scene {
  opacity: 0;
  will-change: opacity, transform;
}

/* Dice scene — scroll-driven */
.htp-dice-scene {
  opacity: 0;
  will-change: opacity, transform;
}

/* Chaos callout — scroll-driven */
.htp-chaos-callout {
  opacity: 0;
  will-change: opacity, transform;
}

/* CTA buttons — scroll-driven */
.htp-cta {
  opacity: 0;
  will-change: opacity, transform;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
  .htp-mechanics {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  .htp-card-anatomy {
    flex-direction: column;
    align-items: center;
  }
  .htp-anatomy-card { width: 200px; }
  .htp-anatomy-label { display: none; }
  .htp-anatomy-desc { text-align: left; }
  .htp-fighter img { width: 90px; }
  .htp-tier-card { display: none; }
  .htp-tier-rank { display: none; }
  .htp-win-row {
    flex-direction: column;
    align-items: center;
  }
  .htp-chapter-num {
    font-size: 2rem;
  }
  .htp-page {
    padding: 2.5rem 1.2rem 2rem;
  }
  .htp-step {
    padding: 2rem 1.5rem;
  }
  .htp-step-desc {
    font-size: 0.85rem;
  }
  .htp-flip-card {
    width: 130px;
    height: 182px;
  }
  .htp-battle {
    gap: 0;
  }
  .htp-clash {
    width: 40px;
  }
  .htp-blood-divider {
    margin: 0.8rem 0 2.5rem;
  }
  .htp-tier {
    padding: 0.8rem 1rem;
    gap: 0.8rem;
  }
  .htp-tier-badge {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
  }
  .htp-tier-body h3 {
    font-size: 0.85rem;
  }
  .htp-tier-body p {
    font-size: 0.72rem;
  }
  .htp-chaos-callout {
    padding: 1.5rem;
  }
  .htp-chaos-header {
    flex-direction: column;
    text-align: center;
  }
  .htp-mechanic {
    padding: 1.5rem 1rem;
  }
  .htp-win {
    max-width: 100%;
    padding: 1.5rem;
  }
  .htp-final-cta {
    padding: 2.5rem 1rem;
  }
}

@media (max-width: 480px) {
  .htp-facts {
    flex-direction: column;
    align-items: center;
  }
  .htp-fighter img { width: 70px; }
  .htp-dice-img { width: 160px; }
  .htp-showcase-card img { width: 60px; }
  .htp-step { padding: 1.2rem 0.8rem; }
  .htp-step-name { font-size: 1.1rem; }
  .htp-step-desc { font-size: 0.8rem; max-width: 100%; }
  .htp-block { margin-bottom: 1.5rem; }
  .htp-cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  .htp-page {
    padding: 2rem 0.8rem 1.5rem;
  }
  .htp-fact-pill {
    padding: 0.6rem 1rem;
  }
  .htp-fact-pill strong { font-size: 0.72rem; }
  .htp-fact-pill span { font-size: 0.65rem; }
  .htp-flip-card {
    width: 110px;
    height: 154px;
  }
  .htp-graveyard-img {
    width: 90px;
  }
  .htp-grave-card {
    width: 40px;
    right: -20px;
  }
  .htp-dice-scene .htp-dice-img {
    width: 140px;
  }
  .htp-anatomy-card { width: 170px; }
  .htp-anatomy-desc p { font-size: 0.8rem; }
  .htp-anatomy-desc li { font-size: 0.78rem; }
  .htp-mechanic-visual { height: 120px; }
  .htp-weapon-fan { width: 100px; height: 110px; }
  .htp-weapon-fan img { width: 55px; }
  .htp-rival-l, .htp-rival-r { width: 55px; }
  .htp-tag-l, .htp-tag-r { width: 55px; }
  .htp-chapter-num { font-size: 1.6rem; }
  .htp-title h2 { font-size: 1.3rem; }
  .htp-clash-burst { width: 60px; height: 60px; }
  .htp-win h3 { font-size: 0.85rem; }
  .htp-win p { font-size: 0.75rem; }
  .htp-cta-headline { font-size: 1.3rem; }
  .htp-cta-sub { font-size: 0.75rem; letter-spacing: 0.2em; }
}
