/* Oyun Temalı — pixel fight */

.fight-arena-page {
  min-height: 100vh;
  background: #120814;
  color: #fff;
  font-family: "Press Start 2P", "Sora", system-ui, sans-serif;
}

.fight-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 2px solid #ff2e78;
}

.fight-toolbar a {
  color: #ffb6d5;
  text-decoration: none;
  font-size: 0.65rem;
}

.fight-stage {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.fight-banner {
  text-align: center;
  margin-bottom: 1rem;
}

.fight-banner h1 {
  margin: 0;
  font-size: clamp(0.85rem, 3.2vw, 1.35rem);
  color: #ff4d9a;
  text-shadow: 0 0 12px rgba(255, 46, 120, 0.55);
  line-height: 1.45;
}

.fight-banner p {
  margin: 0.55rem 0 0;
  font-size: 0.55rem;
  color: #ffc0d8;
  letter-spacing: 0.04em;
}

.fight-arena {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid #ff2e78;
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 46, 120, 0.25), transparent 45%),
    linear-gradient(180deg, #2a1030 0%, #120814 70%);
  min-height: 420px;
  box-shadow: 0 0 40px rgba(255, 46, 120, 0.25);
}

.fight-bg-sign {
  position: absolute;
  right: 8%;
  top: 12%;
  padding: 0.45rem 0.55rem;
  border: 2px solid #ff2e78;
  color: #ff2e78;
  font-size: 0.45rem;
  transform: rotate(-8deg);
  opacity: 0.85;
  white-space: pre-line;
  text-align: center;
  line-height: 1.45;
}

.fight-arena.is-win {
  border-color: #46d369;
  box-shadow: 0 0 40px rgba(70, 211, 105, 0.35);
}

.fight-arena.is-lose {
  border-color: #ff2e78;
  filter: saturate(0.85);
}

.fight-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
}

.fight-hp-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem 0;
  position: relative;
  z-index: 3;
}

.fight-hp {
  flex: 1;
  max-width: 42%;
}

.fight-hp-label {
  font-size: 0.45rem;
  margin-bottom: 0.25rem;
  color: #ffd0e4;
}

.fight-hp-bar {
  height: 12px;
  border: 2px solid #fff;
  background: #330018;
  overflow: hidden;
}

.fight-hp-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff2e78, #ff7aa8);
  transition: width 0.35s steps(4);
}

.fight-bubble {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  z-index: 4;
  max-width: min(80%, 280px);
  background: #fff;
  color: #1a1016;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  font-size: 0.48rem;
  line-height: 1.55;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.fight-bubble::after {
  content: "";
  position: absolute;
  left: 28%;
  bottom: -8px;
  border: 8px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
}

.fight-chars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 8% 8%;
  z-index: 2;
}

.fight-char {
  width: min(42vw, 180px);
  position: relative;
}

.fight-char.is-partner {
  transform: scaleX(-1);
}

.fight-char.is-partner .fight-face-canvas,
.fight-char.is-partner .fight-name-tag {
  transform: scaleX(-1);
}

.fight-body {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 5;
}

.fight-torso {
  position: absolute;
  left: 22%;
  right: 22%;
  top: 34%;
  bottom: 18%;
  background: #ff6fa8;
  border: 3px solid #1a1016;
  border-radius: 8px;
  image-rendering: pixelated;
}

.fight-char.is-you .fight-torso {
  background: #6ec6ff;
}

.fight-pants {
  position: absolute;
  left: 26%;
  right: 26%;
  top: 68%;
  bottom: 4%;
  background: #2b2b45;
  border: 3px solid #1a1016;
}

.fight-head {
  position: absolute;
  left: 50%;
  top: 4%;
  width: 58%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border: 3px solid #1a1016;
  border-radius: 8px;
  overflow: hidden;
  background: #f2d6c2;
  z-index: 3;
  image-rendering: pixelated;
}

.fight-face-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.fight-arm {
  position: absolute;
  width: 28%;
  height: 34%;
  top: 38%;
  right: -6%;
  transform-origin: 20% 20%;
  z-index: 4;
}

.fight-glove {
  position: absolute;
  inset: 0;
  background: #ff3b3b;
  border: 3px solid #1a1016;
  border-radius: 40% 50% 45% 40%;
  clip-path: polygon(15% 10%, 90% 5%, 95% 70%, 70% 95%, 10% 80%, 5% 35%);
}

.fight-char.is-you .fight-arm {
  left: -6%;
  right: auto;
  transform-origin: 80% 20%;
}

.fight-char.is-you .fight-glove {
  background: #ffd166;
}

.fight-name-tag {
  margin-top: 0.35rem;
  text-align: center;
  font-size: 0.42rem;
  color: #ffd0e4;
}

.fight-vs {
  align-self: center;
  font-size: 0.55rem;
  color: #ff4d9a;
  padding: 0 0.25rem;
}

.fight-status {
  position: absolute;
  left: 50%;
  top: 28%;
  transform: translateX(-50%);
  z-index: 5;
  min-width: 12rem;
  max-width: 90%;
  padding: 0.45rem 0.7rem;
  border: 2px solid #ff2e78;
  background: rgba(10, 4, 12, 0.82);
  color: #ffe0ee;
  font-size: 0.48rem;
  text-align: center;
  line-height: 1.5;
}

.fight-bubble.is-hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.fight-hp-fill.is-foe {
  background: linear-gradient(90deg, #7c4dff, #b388ff);
  margin-left: auto;
}

.fight-shield {
  display: none;
  position: absolute;
  left: 8%;
  right: 8%;
  top: 30%;
  bottom: 12%;
  border: 3px solid #46d369;
  border-radius: 12px;
  background: rgba(70, 211, 105, 0.18);
  z-index: 5;
  box-shadow: 0 0 16px rgba(70, 211, 105, 0.35);
}

.fight-char.is-guard .fight-shield {
  display: block;
}

.fight-char.is-hit .fight-head {
  animation: fight-flash 0.35s steps(2) 1;
  filter: brightness(1.5);
}

.fight-char.is-dodge {
  animation: fight-dodge 0.4s ease 1;
}

.fight-arena.is-warn {
  box-shadow: 0 0 0 3px #ffd166, 0 0 40px rgba(255, 46, 120, 0.35);
}

.fight-arena.is-hurt {
  animation: fight-arena-flash 0.28s ease 1;
}

.fight-arena.is-block {
  box-shadow: 0 0 0 3px #46d369, 0 0 30px rgba(70, 211, 105, 0.35);
}

.fight-arena.is-crit {
  box-shadow: 0 0 0 3px #ffd166, 0 0 50px rgba(255, 209, 102, 0.45);
}

.fight-arena.is-hit-flash .fight-char.is-partner .fight-head {
  filter: brightness(1.35);
}

.fight-toolbar-brand {
  font-size: 0.45rem;
  color: #ffb6d5;
}

.fight-meter {
  height: 8px;
  margin: 0.75rem auto 0;
  max-width: 280px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.fight-meter-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ff2e78, #ffd166);
}

.fight-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  width: min(100%, 360px);
}

.fight-btn-attack {
  background: #ff2e78;
  border-color: #ff2e78;
  min-height: 3.2rem;
}

.fight-btn-block {
  background: #2b2b45;
  border-color: #7c8cff;
  min-height: 3.2rem;
}

.fight-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fight-char.is-you.is-punch .fight-arm,
.fight-char.is-partner.is-punch .fight-arm {
  animation: fight-punch-you 0.35s steps(2) 1;
}

@keyframes fight-punch-you {
  0% { transform: rotate(0deg) translate(0, 0); }
  45% { transform: rotate(42deg) translate(22px, 10px); }
  100% { transform: rotate(0deg) translate(0, 0); }
}

@keyframes fight-flash {
  0%, 100% { transform: translateX(-50%); }
  50% { transform: translateX(calc(-50% + 6px)); }
}

@keyframes fight-dodge {
  0%, 100% { transform: translateX(0); }
  40% { transform: translateX(-16px); }
}

@keyframes fight-arena-flash {
  0%, 100% { filter: none; }
  50% { filter: brightness(1.25) saturate(1.2); }
}

.fight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1rem;
}

.fight-btn {
  font-family: inherit;
  font-size: 0.55rem;
  padding: 0.85rem 1.1rem;
  border: 3px solid #ff2e78;
  background: #ff2e78;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fight-btn.ghost {
  background: transparent;
}

.fight-end {
  display: none;
  text-align: center;
  margin-top: 1rem;
  padding: 1rem;
  border: 3px solid #46d369;
  background: rgba(70, 211, 105, 0.12);
  font-size: 0.55rem;
  line-height: 1.6;
  color: #b8ffc9;
}

.fight-end.is-on {
  display: block;
}

.fight-end[data-result="lose"] {
  border-color: #ff2e78;
  background: rgba(255, 46, 120, 0.12);
  color: #ffc0d8;
}

/* Create form crop previews */
.fight-crop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.fight-crop-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
}

.fight-crop-preview {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1218;
  border: 2px solid rgba(255, 46, 120, 0.35);
}

.fight-crop-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
}

@media (max-width: 640px) {
  .fight-crop-grid {
    grid-template-columns: 1fr;
  }
  .fight-arena {
    min-height: 380px;
  }
  .fight-controls {
    width: 100%;
  }
  .fight-btn-attack,
  .fight-btn-block {
    min-height: 3.6rem;
    font-size: 0.62rem;
  }
}
