/* ============================================
   AGE OF SIGMAR — DASHBOARD STYLES
   Phase 1: FEAT-AOS02
   ============================================ */

/* --- Header --- */
.aos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px;
  margin: 20px 0;
  background: linear-gradient(135deg, rgba(26, 82, 118, 0.15), rgba(26, 82, 118, 0.05));
  border: 1px solid rgba(133, 193, 233, 0.25);
  border-radius: 12px;
}

.aos-header-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.aos-stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(26, 82, 118, 0.2);
  border-radius: 20px;
  border: 1px solid rgba(133, 193, 233, 0.2);
}

.aos-stat-value {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #85c1e9;
}

.aos-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted, #888);
}

.btn-aos-new {
  padding: 10px 20px;
  background: linear-gradient(135deg, #1a5276, #154360);
  border: 1px solid #85c1e9;
  border-radius: 8px;
  color: #85c1e9;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-aos-new:hover {
  background: linear-gradient(135deg, #1f6da0, #1a5276);
  box-shadow: 0 0 12px rgba(133, 193, 233, 0.3);
  transform: translateY(-1px);
}

/* --- Sections --- */
.aos-section {
  margin: 24px 0;
}

.aos-section-title {
  font-family: 'Cinzel', serif;
  color: #85c1e9;
  font-size: 1.1rem;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(133, 193, 233, 0.15);
}

.aos-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted, #888);
  font-size: 0.95rem;
  background: var(--bg-secondary, #242424);
  border-radius: 8px;
}

/* --- Standings Table --- */
.aos-standings {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color, #444);
}

.aos-standings-header {
  display: grid;
  grid-template-columns: 40px 1fr 36px 36px 36px 56px 1fr;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-card-header, #333);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.aos-standings-row {
  display: grid;
  grid-template-columns: 40px 1fr 36px 36px 36px 56px 1fr;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-card, #2d2d2d);
  border-top: 1px solid var(--border-color, #444);
  transition: background 0.15s;
  align-items: center;
}

.aos-standings-row:hover {
  background: var(--bg-card-hover, #3a3a3a);
}

.aos-standings-row.top-three {
  background: rgba(26, 82, 118, 0.08);
}

.aos-col-rank {
  font-weight: 700;
  color: var(--text-muted, #888);
  font-size: 0.85rem;
}

.aos-col-name {
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aos-col-stat {
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
}

.aos-col-stat.win { color: #4ade80; }
.aos-col-stat.loss { color: #f87171; }
.aos-col-stat.draw { color: var(--text-muted, #888); }

.aos-col-rate {
  text-align: center;
  font-weight: 600;
  color: #85c1e9;
  font-size: 0.85rem;
}

.aos-col-army {
  font-size: 0.82rem;
  color: var(--text-secondary, #b0b0b0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Standings Badges --- */
.aos-streak-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #f97316;
  background: rgba(249, 115, 22, 0.15);
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.3;
  animation: aos-badge-pulse 2s ease-in-out infinite;
}

.aos-sg-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-gold, #c9a959);
  background: rgba(201, 169, 89, 0.12);
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: 3px;
  vertical-align: middle;
  line-height: 1.3;
}

@keyframes aos-badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* --- Game Cards --- */
.aos-games-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aos-game-card {
  padding: 14px 18px;
  background: var(--bg-card, #2d2d2d);
  border: 1px solid var(--border-color, #444);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.aos-game-card:hover {
  border-color: rgba(133, 193, 233, 0.4);
}

.aos-game-date {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.aos-format-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  background: rgba(26, 82, 118, 0.2);
  border: 1px solid rgba(133, 193, 233, 0.2);
  border-radius: 4px;
  color: #85c1e9;
}

.aos-game-matchup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aos-game-player {
  flex: 1;
  min-width: 0;
}

.aos-game-player.winner .aos-game-pname {
  color: #4ade80;
  font-weight: 700;
}

.aos-game-player.loser .aos-game-pname {
  color: var(--text-secondary, #b0b0b0);
}

.aos-game-player.draw .aos-game-pname {
  color: var(--text-primary, #e0e0e0);
}

.aos-game-pname {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aos-game-army {
  display: block;
  font-size: 0.8rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aos-game-vs {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted, #888);
  flex-shrink: 0;
  padding: 0 4px;
}

.aos-game-scenario {
  font-size: 0.78rem;
  color: var(--text-muted, #888);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* --- Alliance Stats --- */
.aos-alliance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.aos-alliance-card {
  padding: 16px;
  background: var(--bg-card, #2d2d2d);
  border: 1px solid;
  border-radius: 10px;
  text-align: center;
}

.aos-alliance-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.aos-alliance-name {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.aos-alliance-record {
  font-size: 0.78rem;
  color: var(--text-secondary, #b0b0b0);
  margin-bottom: 8px;
}

.aos-alliance-bar {
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.aos-alliance-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.aos-alliance-rate {
  font-size: 0.75rem;
  color: var(--text-muted, #888);
}

/* --- Form (Modal) --- */
.aos-form {
  padding: 4px 0;
}

.aos-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.aos-form-group {
  margin-bottom: 12px;
}

.aos-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary, #b0b0b0);
  margin-bottom: 6px;
}

.aos-form-group select,
.aos-form-group input[type="date"] {
  width: 100%;
  padding: 10px;
  background: var(--bg-input, #1f1f1f);
  border: 1px solid var(--border-color, #444);
  border-radius: var(--radius-md, 8px);
  color: var(--text-primary, #e0e0e0);
  font-size: 0.95rem;
}

.aos-form-group select:focus,
.aos-form-group input:focus {
  outline: none;
  border-color: #85c1e9;
}

.aos-form-vs {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #85c1e9;
  padding: 4px 0 14px;
}

.aos-form-divider {
  border-top: 1px solid var(--border-color, #444);
  margin: 8px 0 14px;
}

.btn-aos-save {
  padding: 12px 32px;
  background: linear-gradient(135deg, #1a5276, #154360);
  border: 1px solid #85c1e9;
  border-radius: 8px;
  color: #85c1e9;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-aos-save:hover {
  background: linear-gradient(135deg, #1f6da0, #1a5276);
  box-shadow: 0 0 16px rgba(133, 193, 233, 0.4);
}

/* --- Responsive --- */
@media (max-width: 700px) {
  .aos-standings-header,
  .aos-standings-row {
    grid-template-columns: 32px 1fr 30px 30px 30px 48px;
    font-size: 0.82rem;
  }
  .aos-col-army {
    display: none;
  }
  .aos-alliance-grid {
    grid-template-columns: 1fr 1fr;
  }
  .aos-form-row {
    grid-template-columns: 1fr;
  }
  .aos-game-matchup {
    flex-direction: column;
    gap: 4px;
  }
  .aos-game-vs {
    font-size: 0.75rem;
    padding: 2px 0;
  }
}

/* ===================================================================
   AOS LIST INTENSITY SELECTOR (FEAT-INTENSITY)
   =================================================================== */

.al-intensity-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.al-intensity-btn {
  flex: 1;
  min-width: 120px;
  padding: 8px 12px;
  border: 2px solid rgba(26, 82, 118, 0.3);
  border-radius: 8px;
  background: rgba(26, 82, 118, 0.06);
  color: var(--aos-text-dim, #888);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-family: inherit;
}

.al-intensity-btn:hover {
  border-color: rgba(26, 82, 118, 0.5);
  background: rgba(26, 82, 118, 0.12);
  color: var(--aos-text, #d4d0c8);
}

.al-intensity-btn.active,
.al-intensity-btn:focus {
  outline: none;
}

.al-intensity-btn[data-val="punk"].active {
  border-color: #f44336;
  background: rgba(244, 67, 54, 0.15);
  color: #ef9a9a;
  box-shadow: 0 0 8px rgba(244, 67, 54, 0.2);
}

.al-intensity-btn[data-val="gentleman"].active {
  border-color: #c9a959;
  background: rgba(201, 169, 89, 0.15);
  color: #c9a959;
  box-shadow: 0 0 8px rgba(201, 169, 89, 0.2);
}

.al-intensity-btn[data-val="pillow"].active {
  border-color: #64b5f6;
  background: rgba(100, 181, 246, 0.15);
  color: #90caf9;
  box-shadow: 0 0 8px rgba(100, 181, 246, 0.2);
}

.al-intensity-btn span {
  font-size: 1rem;
  vertical-align: middle;
  margin-right: 4px;
}

@media (max-width: 600px) {
  .al-intensity-selector {
    flex-direction: column;
  }
  .al-intensity-btn {
    min-width: unset;
  }
}
