:root {
  --primary-color: #ff0000;
  --secondary-color: #ff3333;
  --highlight-color: #ff6b6b;
  --dark-color: #1a1a1a;
  --background-color: #1a1a1a;
  --text-color: #fff;
  --border-radius: 15px;
  --shadow-color: rgba(255, 0, 0, 0.4);
  --glow-intensity: 1;
}

body {
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  background: var(--background-color);
  color: var(--text-color);
  font-family: 'Press Start 2P', cursive;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  overflow-y: auto;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(45deg, #ff000022 25%, transparent 25%) -40px 0,
    linear-gradient(-45deg, #ff000022 25%, transparent 25%) -40px 0,
    linear-gradient(45deg, transparent 75%, #ff000022 75%),
    linear-gradient(-45deg, transparent 75%, #ff000022 75%);
  background-size: 80px 80px;
  animation: backgroundScroll 20s linear infinite;
  z-index: 0;
  opacity: 0.3;
}

@keyframes backgroundScroll {
  from { background-position: 0 0; }
  to { background-position: 160px 160px; }
}

.lightning-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.lightning {
  position: absolute;
  background: white;
  opacity: 0;
  box-shadow: 0 0 50px 25px rgba(255, 255, 255, 0.6);
  transition: opacity 0.1s;
}

.container {
  text-align: center;
  max-width: 1200px;
  width: 100%;
  position: relative;
  padding: 30px;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 30px;
  box-shadow: 
    0 0 50px rgba(255, 0, 0, 0.2),
    inset 0 0 30px rgba(255, 0, 0, 0.3),
    0 0 100px rgba(255, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px auto;
}

.logo-container {
  position: relative;
  margin-bottom: 40px;
  width: 100%;
  text-align: center;
}

h1 {
  font-size: 5em;
  margin-bottom: 10px;
  background: linear-gradient(45deg, #ff0000, #ff6b6b, #ff0000);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 
    4px 4px 0px rgba(255, 0, 0, 0.3),
    8px 8px 0px rgba(0, 0, 0, 0.2);
  animation: textGradient 3s linear infinite;
  letter-spacing: 4px;
  position: relative;
  transform: perspective(500px) rotateX(5deg);
}

@keyframes textGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.subtitle {
  font-size: 1.2em;
  color: var(--highlight-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
  animation: subtitlePulse 3s infinite alternate;
  margin-bottom: 30px;
}

@keyframes subtitlePulse {
  0% { opacity: 0.7; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

.battle-stage-select {
  width: 100%;
  margin-bottom: 30px;
  text-align: center;
}

.battle-stage-select h3 {
  font-size: 1.2em;
  margin-bottom: 15px;
  color: var(--highlight-color);
}

.stage-options {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.stage-option {
  padding: 10px 15px;
  background: rgba(51, 51, 51, 0.6);
  border: 2px solid var(--secondary-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.8em;
}

.stage-option:hover {
  background: rgba(255, 0, 0, 0.2);
  transform: translateY(-2px);
}

.stage-option[data-selected="true"] {
  background: rgba(255, 0, 0, 0.4);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.versus-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  margin-bottom: 60px;
  perspective: 1000px;
  width: 100%;
}

.fighter-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 300px;
}

.fighter-portrait {
  width: 200px;
  height: 200px;
  background: rgba(0, 0, 0, 0.5);
  border: 4px solid var(--secondary-color);
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
  transition: all 0.4s;
}

.fighter-portrait:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
}

.portrait-placeholder {
  font-size: 5em;
  color: rgba(255, 255, 255, 0.3);
}

.fighter-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s;
}

.fighter-input {
  width: 250px;
  padding: 25px;
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2em;
  background: rgba(51, 51, 51, 0.9);
  border: 4px solid #ff3333;
  color: #fff;
  text-align: center;
  border-radius: 15px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  box-shadow: 
    0 10px 20px rgba(0, 0, 0, 0.3),
    0 0 0 4px rgba(255, 51, 51, 0.3);
  margin: 10px 0;
  width: 250px;
}

.fighter-input:hover, 
.fighter-input:focus {
  transform: translateZ(30px) scale(1.05);
  box-shadow: 
    0 15px 30px rgba(255, 0, 0, 0.4),
    0 0 0 6px rgba(255, 51, 51, 0.5);
  outline: none;
  border-color: #ff0000;
}

.fighter-suggestions {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  width: 250px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  display: none;
}

.suggestion-item {
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.8em;
}

.suggestion-item:hover {
  background: rgba(255, 0, 0, 0.3);
}

.vs-animation {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.vs {
  font-size: 3em;
  color: #ff0000;
  text-shadow: 
    3px 3px 0px #fff,
    6px 6px 0px rgba(0, 0, 0, 0.3);
  animation: vsFloat 2s ease-in-out infinite;
  transform-style: preserve-3d;
  position: relative;
  z-index: 2;
}

@keyframes vsFloat {
  0%, 100% { transform: translateY(0) rotateX(0); }
  50% { transform: translateY(-20px) rotateX(10deg); }
}

.vs-flash {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.8) 0%, rgba(255, 0, 0, 0) 70%);
  opacity: 0;
  z-index: 1;
  animation: vsFlash 3s infinite;
}

@keyframes vsFlash {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.custom-stats-toggle {
  display: flex;
  align-items: center;
  margin: 20px 0;
  gap: 10px;
  font-size: 0.8em;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #333;
  transition: .4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.custom-stats-container {
  display: none;
  width: 100%;
  flex-direction: row;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--border-radius);
  border: 2px solid var(--secondary-color);
}

.fighter-custom-stats {
  width: 48%;
}

.fighter-custom-stats h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1em;
  color: var(--highlight-color);
  text-align: center;
}

.stat-slider-container {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.stat-slider-container label {
  width: 120px;
  font-size: 0.7em;
}

.custom-stat-slider {
  flex-grow: 1;
  height: 10px;
  -webkit-appearance: none;
  appearance: none;
  background: #333;
  border-radius: 5px;
  outline: none;
  margin: 0 10px;
}

.custom-stat-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.stat-value {
  width: 30px;
  text-align: center;
  font-size: 0.8em;
}

.special-ability-container {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.special-ability-container label {
  width: 120px;
  font-size: 0.7em;
}

.special-ability-input {
  flex-grow: 1;
  padding: 8px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7em;
  background: rgba(51, 51, 51, 0.9);
  border: 2px solid var(--secondary-color);
  color: #fff;
  border-radius: 5px;
}

.gender-selection {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.gender-option {
  padding: 5px 10px;
  background: rgba(51, 51, 51, 0.6);
  border: 2px solid var(--secondary-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.7em;
}

.gender-option:hover {
  background: rgba(255, 0, 0, 0.2);
  transform: translateY(-2px);
}

.gender-option[data-selected="true"] {
  background: rgba(255, 0, 0, 0.4);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.fight-btn {
  padding: 30px 60px;
  font-family: 'Press Start 2P', cursive;
  font-size: 2em;
  background: linear-gradient(45deg, #ff0000, #ff3333, #ff0000);
  background-size: 200% auto;
  border: none;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-shadow: 3px 3px 0px #000;
  box-shadow: 
    0 10px 30px rgba(255, 0, 0, 0.4),
    0 -2px 6px rgba(255, 255, 255, 0.1) inset;
  position: relative;
  overflow: hidden;
  margin: 20px 0 30px;
}

.btn-text {
  position: relative;
  z-index: 2;
}

.btn-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  z-index: 1;
}

.fight-btn:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 
    0 15px 40px rgba(255, 0, 0, 0.6),
    0 -2px 10px rgba(255, 255, 255, 0.2) inset;
  background-position: right center;
}

.fight-btn:hover .btn-glow {
  animation: buttonGlow 1s infinite;
}

@keyframes buttonGlow {
  0%, 100% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 0.4; transform: scale(1.2); }
}

.fight-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.battle-options {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.option-btn {
  padding: 10px 15px;
  background: rgba(51, 51, 51, 0.8);
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7em;
  cursor: pointer;
  transition: all 0.3s;
}

.option-btn:hover {
  background: rgba(255, 0, 0, 0.3);
  transform: translateY(-2px);
}

.pixel-icon {
  font-size: 1.2em;
  margin-right: 5px;
}

.settings-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.settings-content {
  background: rgba(0, 0, 0, 0.9);
  border: 3px solid var(--secondary-color);
  border-radius: var(--border-radius);
  padding: 30px;
  width: 400px;
  max-width: 90%;
}

.settings-content h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 30px;
  color: var(--highlight-color);
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.settings-close-btn {
  display: block;
  width: 100%;
  padding: 15px;
  margin-top: 20px;
  background: var(--primary-color);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  cursor: pointer;
  transition: all 0.3s;
}

.settings-close-btn:hover {
  background: var(--highlight-color);
}

.result-container {
  margin-top: 40px;
  padding: 30px;
  background: rgba(0, 0, 0, 0.8);
  border: 3px solid #ff0000;
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.2);
  display: none;
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
  width: 100%;
}

.result-container.active {
  display: block;
  transform: scale(1);
  opacity: 1;
  animation: resultAppear 0.8s forwards;
}

@keyframes resultAppear {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.winner-announcement {
  font-size: 2em;
  text-align: center;
  padding: 20px;
  margin-bottom: 30px;
  background: linear-gradient(45deg, #ffd700, #ffa500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
  transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.winner-announcement.draw {
  background: linear-gradient(45deg, #00ffff, #0066cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.battle-description {
  line-height: 1.8;
  font-size: 1em;
  color: #ddd;
}

.battle-stats {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  opacity: 0;
  transform: translateY(20px);
}

.battle-history {
  width: 100%;
  margin-top: 40px;
  border-top: 2px solid rgba(255, 0, 0, 0.3);
  padding-top: 20px;
}

.battle-history h3 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--highlight-color);
}

.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.history-item {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.7em;
  cursor: pointer;
  transition: all 0.3s;
}

.history-item:hover {
  background: rgba(255, 0, 0, 0.2);
  transform: scale(1.05);
}

.victory-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.winner-display {
  text-align: center;
  background: rgba(0, 0, 0, 0.9);
  border: 4px solid gold;
  border-radius: 20px;
  padding: 30px;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
}

.winner-title {
  font-size: 2em;
  color: gold;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.winner-name {
  font-size: 1.5em;
  margin-bottom: 20px;
  color: #fff;
}

.winner-portrait {
  width: 200px;
  height: 200px;
  border: 3px solid gold;
  border-radius: 15px;
  margin: 0 auto 20px;
  overflow: hidden;
}

.winner-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.victory-stats {
  margin-bottom: 30px;
}

.rematch-btn, .new-fight-btn {
  padding: 15px 30px;
  margin: 0 10px;
  font-family: 'Press Start 2P', cursive;
  font-size: 1em;
  background: linear-gradient(45deg, gold, #ffd700);
  border: none;
  border-radius: 10px;
  color: #000;
  cursor: pointer;
  transition: all 0.3s;
}

.rematch-btn:hover, .new-fight-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
  position: relative;
}

.pixel-spinner {
  width: 50px;
  height: 50px;
  background: #ff3333;
  position: relative;
  animation: pixelSpin 1s steps(8) infinite;
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
}

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

.pixel-spinner::before, .pixel-spinner::after {
  content: '';
  position: absolute;
  background: #ff3333;
  width: 30%;
  height: 30%;
}

.pixel-spinner::before {
  top: 10%;
  left: 10%;
  animation: pixelPulse 1s infinite alternate;
}

.pixel-spinner::after {
  bottom: 10%;
  right: 10%;
  animation: pixelPulse 1s infinite alternate-reverse;
}

@keyframes pixelPulse {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

.fighter-card {
  background: rgba(51, 51, 51, 0.8);
  border: 3px solid #ff3333;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  transform: translateY(20px);
  opacity: 0;
  animation: cardSlideIn 0.8s forwards;
  margin: 25px 0;
  border-radius: 15px;
}

@keyframes cardSlideIn {
  to { transform: translateY(0); opacity: 1; }
}

.fighter-card h3 {
  margin-top: 0;
  color: #ff3333;
}

.stat-bar {
  height: 15px;
  background: rgba(0, 0, 0, 0.5);
  margin: 10px 0;
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.stat-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ff0000, #ff6b6b);
  border-radius: 7px;
  transition: width 1.5s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
}

.stat-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 10px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 7px;
  opacity: 0;
}

.stat-fill.animate::after {
  animation: statGlow 1s;
}

@keyframes statGlow {
  0% { opacity: 0; width: 0; }
  50% { opacity: 1; width: 15px; }
  100% { opacity: 0; width: 0; }
}

.fighter-ability {
  display: inline-block;
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid rgba(255, 0, 0, 0.5);
  border-radius: 5px;
  padding: 5px 10px;
  margin: 5px;
  font-size: 0.7em;
  animation: abilityPulse 2s infinite alternate;
}

@keyframes abilityPulse {
  from { background: rgba(255, 0, 0, 0.2); }
  to { background: rgba(255, 0, 0, 0.4); }
}

.dialogue-bubble {
  position: relative;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid #ff3333;
  border-radius: 10px;
  padding: 15px;
  margin: 20px 0;
  font-size: 0.9em;
  color: white;
  transform: scale(0.9);
  opacity: 0;
  animation: bubbleAppear 0.5s forwards;
}

@keyframes bubbleAppear {
  to { transform: scale(1); opacity: 1; }
}

.dialogue-bubble::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.dialogue-left::after {
  border-width: 10px 15px 10px 0;
  border-color: transparent #ff3333 transparent transparent;
  left: -15px;
  top: calc(50% - 10px);
}

.dialogue-right::after {
  border-width: 10px 0 10px 15px;
  border-color: transparent transparent transparent #ff3333;
  right: -15px;
  top: calc(50% - 10px);
}

.stage-arena .container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath d='M0 0 L50 0 L50 50 L0 50 Z' fill='%23ff000011'/%3E%3Cpath d='M50 0 L100 0 L100 50 L50 50 Z' fill='%23ff000022'/%3E%3Cpath d='M0 50 L50 50 L50 100 L0 100 Z' fill='%23ff000022'/%3E%3Cpath d='M50 50 L100 50 L100 100 L50 100 Z' fill='%23ff000011'/%3E%3C/svg%3E");
  opacity: 0.3;
  z-index: -1;
  border-radius: var(--border-radius);
}

.stage-city .container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='100' viewBox='0 0 200 100'%3E%3Cpath d='M0 100 L0 60 L10 60 L10 100 Z M30 100 L30 40 L50 40 L50 100 Z M60 100 L60 70 L65 70 L65 100 Z M80 100 L80 50 L100 30 L120 50 L120 100 Z M140 100 L140 45 L145 45 L145 100 Z M160 100 L160 30 L180 30 L180 100 Z' fill='%23333333'/%3E%3C/svg%3E");
  background-position: bottom;
  background-repeat: repeat-x;
  opacity: 0.5;
  z-index: -1;
  border-radius: var(--border-radius);
}

.stage-space .container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 120%, #4b0082, #000000);
  z-index: -1;
  border-radius: var(--border-radius);
}

.stage-space .container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 3px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px),
    radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 3px);
  background-size: 550px 550px, 350px 350px, 250px 250px;
  background-position: 0 0, 40px 60px, 130px 270px;
  z-index: -1;
  opacity: 0.5;
  border-radius: var(--border-radius);
}

.chat-content {
  background: rgba(0, 0, 0, 0.9);
  border: 3px solid var(--secondary-color);
  border-radius: var(--border-radius);
  padding: 30px;
  width: 500px;
  max-width: 90%;
  height: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 20px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chat-message {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chat-sender {
  font-size: 0.7em;
  opacity: 0.7;
}

.chat-bubble {
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 0.8em;
  max-width: 80%;
}

.user-message {
  align-items: flex-end;
}

.user-message .chat-bubble {
  background: rgba(255, 0, 0, 0.3);
  border: 1px solid var(--secondary-color);
}

.ai-message {
  align-items: flex-start;
}

.ai-message .chat-bubble {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #555;
}

.ai-message.thinking .chat-bubble {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ai-message.thinking .chat-bubble::after {
  content: '';
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  animation: thinkingDots 1.5s infinite;
}

@keyframes thinkingDots {
  0%, 60%, 100% { opacity: 0; }
  30% { opacity: 1; }
}

.chat-input-container {
  display: flex;
  margin-bottom: 20px;
}

.chat-input-container input {
  flex: 1;
  padding: 15px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8em;
}

.analysis-title {
  color: var(--highlight-color);
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5);
}

.analysis-container {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 15px;
  padding: 20px;
}

.analysis-section {
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 0, 0, 0.3);
  padding-bottom: 20px;
}

.radar-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 30px 0;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 15px;
  padding: 20px;
}

.radar-chart h3 {
  margin-top: 0;
  color: var(--highlight-color);
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7em;
}

.legend-color {
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
}

.stat-comparison {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.stat-comparison th,
.stat-comparison td {
  padding: 10px;
  text-align: center;
  font-size: 0.8em;
  border-bottom: 1px solid rgba(255, 0, 0, 0.2);
}

.stat-comparison th {
  color: var(--highlight-color);
}

/* Media queries */
@media (max-width: 768px) {
  .versus-container {
    flex-direction: column;
    gap: 40px;
  }
  
  .fighter-selection {
    width: 100%;
  }
  
  .fighter-portrait {
    width: 150px;
    height: 150px;
  }
  
  .custom-stats-container {
    flex-direction: column;
  }
  
  .fighter-custom-stats {
    width: 100%;
  }
  
  .battle-options {
    flex-direction: column;
    gap: 10px;
  }
  
  h1 {
    font-size: 2.5em;
    margin-bottom: 40px;
  }
  
  .fighter-input {
    width: 100%;
    font-size: 1em;
  }
  
  .fight-btn {
    font-size: 1.5em;
    padding: 20px 40px;
  }
  
  .chat-content {
    width: 90%;
    height: 80%;
  }
  
  .battle-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}