/* css/battle.css */
#battles {
  background: var(--bg-dark);
  min-height: 100vh;
  padding: 80px 0;
}

#battles .section-title {
  text-align: center;
}

.battles-intro {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
}

.battles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.battle-card {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 2rem;
  border: 2px solid rgba(255, 107, 53, 0.2);
  cursor: pointer;
  transition: all 0.3s;
}

.battle-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.battle-card h3 {
  color: #fff;
  margin-bottom: 1rem;
}

.battle-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.battle-location, .battle-chapter {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.battle-preview {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* 战斗场景 */
.battle-scene-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 3000;
  justify-content: center;
  align-items: center;
}

.battle-scene-modal.active {
  display: flex;
}

.battle-scene-content {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 2rem;
  max-width: 1000px;
  width: 90%;
  max-height: 90vh;
  overflow: auto;
  position: relative;
}

.battle-scene-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 107, 53, 0.3);
}

.battle-arena {
  background: radial-gradient(circle, rgba(255,107,53,0.1) 0%, rgba(0,0,0,0.4) 70%);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
  min-height: 300px;
  position: relative;
  overflow: hidden;
}

.fighter {
  position: absolute;
  width: 120px;
  text-align: center;
  transition: all 0.5s;
}

.fighter.xiao-yan {
  left: 10%;
  top: 50%;
  transform: translateY(-50%);
}

.fighter.opponent {
  right: 10%;
  top: 50%;
  transform: translateY(-50%);
}

.fighter.attacking.xiao-yan {
  transform: translateY(-50%) translateX(50px) scale(1.1);
}

.fighter.attacking.opponent {
  transform: translateY(-50%) translateX(-50px) scale(1.1);
}

.fighter-icon {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 10px var(--primary-color));
}

.fighter-name {
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
}

.fighter-level {
  color: var(--primary-color);
  font-size: 0.9rem;
}

.battle-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5rem;
  opacity: 0;
  animation: battleEffect 1s ease-out;
  pointer-events: none;
}

@keyframes battleEffect {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.5); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2); }
}

.battle-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.battle-btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.battle-btn.primary {
  background: var(--gradient-fire);
  color: #fff;
}

.battle-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.battle-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.battle-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.battle-log {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  padding: 1rem;
  max-height: 250px;
  overflow-y: auto;
}

.log-entry {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  border-left: 3px solid var(--primary-color);
  animation: fadeInLog 0.3s ease;
}

@keyframes fadeInLog {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.log-entry.special {
  background: rgba(255, 107, 53, 0.2);
  border-left-color: #ffcc00;
  font-weight: bold;
}

.log-entry.quote {
  font-style: italic;
  color: #ffcc00;
  border-left-color: #ffcc00;
}

/* 响应式 */
@media (max-width: 768px) {
  .battle-arena {
    min-height: 200px;
    padding: 1rem;
  }

  .fighter {
    width: 80px;
  }

  .fighter-icon {
    font-size: 2.5rem;
  }

  .battle-actions {
    flex-direction: column;
  }

  .battle-scene-content {
    padding: 1rem;
  }
}
