/* Alliance Wars Spectator Styles */

.wars-dashboard {
  display: grid;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

.wars-dashboard h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  color: var(--text-primary, #e0e0e0);
}

.wars-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary, #999);
  font-style: italic;
  background: var(--bg-card, #1a1a2e);
  border-radius: 8px;
}

.wars-loading {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-secondary, #999);
}

/* War Card */
.war-card {
  background: var(--bg-card, #1a1a2e);
  border: 1px solid var(--border, #333);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.war-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.war-card.war-active {
  border-color: #e74c3c;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.2);
}

.war-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.war-badge {
  font-size: 0.75rem;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e74c3c;
  color: white;
}

.war-stake {
  font-size: 0.85rem;
  color: #f1c40f;
}

/* Teams */
.war-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.war-team {
  text-align: center;
  flex: 1;
  padding: 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.war-team.war-leading {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.war-team-name {
  font-size: 0.85rem;
  color: var(--text-secondary, #ccc);
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.war-team-score {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-primary, #fff);
}

.war-vs {
  font-size: 0.85rem;
  font-weight: bold;
  color: #e74c3c;
  flex-shrink: 0;
}

/* Score Bar */
.war-score-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-secondary, #222);
  margin-bottom: 0.5rem;
}

.war-score-fill.attacker {
  background: #e74c3c;
  transition: width 0.5s ease;
}

.war-score-fill.defender {
  background: #3498db;
  transition: width 0.5s ease;
}

.war-footer {
  font-size: 0.75rem;
  color: var(--text-tertiary, #666);
  text-align: center;
}

/* History */
.wars-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.war-history-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card, #1a1a2e);
  border-radius: 8px;
  font-size: 0.85rem;
}

.war-outcome {
  flex-shrink: 0;
  font-size: 0.8rem;
}

.war-participants {
  flex: 1;
  color: var(--text-secondary, #ccc);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.war-final-score {
  font-weight: bold;
  color: var(--text-primary, #e0e0e0);
  flex-shrink: 0;
}

/* Rules */
.wars-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
}

.war-rule {
  padding: 0.5rem 0.75rem;
  background: var(--bg-card, #1a1a2e);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary, #ccc);
}

.war-rule strong {
  color: var(--text-primary, #fff);
}

/* Mobile */
@media (max-width: 768px) {
  .wars-dashboard {
    padding: 0.5rem;
  }

  .war-teams {
    flex-direction: column;
    gap: 0.5rem;
  }

  .war-vs {
    font-size: 0.75rem;
  }

  .wars-rules {
    grid-template-columns: 1fr;
  }
}

/* Dark mode (default for spectator) */
:root {
  --bg-card: #1a1a2e;
  --bg-secondary: #16213e;
  --border: #333;
  --text-primary: #e0e0e0;
  --text-secondary: #999;
  --text-tertiary: #666;
}

/* Light mode override */
.light-mode .war-card {
  background: #ffffff;
  border-color: #e0e0e0;
}

.light-mode .war-team-score {
  color: #333;
}

.light-mode .war-history-row {
  background: #f8f9fa;
}

.light-mode .war-rule {
  background: #f8f9fa;
}
