/* static/css/factions/list.css
   The factions list page's own styles, moved out of the page unchanged. */

/* Everything here stays inside the page's own container. These rules were
   written for `*` and `body`, which reset and repainted the whole site on
   this one page: the top bar sat 60px down and 20px in. `:where()` keeps
   the reset's specificity at zero, as `*` had it. */
:where(.factions-container) * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.factions-container {
  max-width: 1200px;
  margin: 0 auto;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  padding: 60px 20px;
}

.factions-title {
  color: #f8fafc;
  text-align: center;
  margin-top: 15px;
  margin-bottom: 30px;
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  position: relative;
  padding-bottom: 10px;
}

.factions-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 3px;
  background-color: #059669;
}

.factions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 30px;
}

.faction-card {
  background: #1e293b;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.faction-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
}

.faction-image {
  width: 100%;
  height: 300px;
  object-fit: contain;
  background: #0f172a;
  border-bottom: 3px solid #3b82f6;
}

.faction-content {
  padding: 0;
}

/* Header Section - Name and Motto */
.faction-header-section {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.faction-header-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, transparent 100%);
  pointer-events: none;
}

.faction-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.faction-name {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  flex: 1;
}

.playable-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 25px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.playable-badge::before {
  content: '✓';
  font-size: 1rem;
}

.faction-motto {
  font-size: 1.1rem;
  font-style: italic;
  color: #e0f2fe;
  margin: 0;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-left: 4px solid #60a5fa;
  font-weight: 400;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  border-radius: 0 8px 8px 0;
}

.faction-motto::before {
  content: '"';
  font-size: 2rem;
  position: absolute;
  left: 8px;
  top: 0;
  color: rgba(255, 255, 255, 0.3);
  font-family: 'Roboto', sans-serif;
}

/* Body Section - Description */
.faction-body-section {
  background: #0f172a;
  padding: 10px;
}

.faction-description {
  color: #cbd5e1;
}

.faction-description p {
  margin-bottom: 12px;
  line-height: 1.4;
}

.faction-meta {
  padding-top: 15px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.faction-meta::before {
  content: '📅';
  font-size: 1rem;
}

.text-muted {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
}

.no-factions {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 20px;
  border: 2px dashed rgba(148, 163, 184, 0.3);
}

.no-factions p {
  color: #94a3b8;
  font-size: 1.2rem;
  font-weight: 500;
}

/* Footer Sections */
.statement-signature {
  text-align: center;
  padding: 20px 20px;
  margin-top: 10px;
  border-top: 2px solid rgba(59, 130, 246, 0.3);
  color: #cbd5e1;
}

.login-footer {
  text-align: center;
  padding: 20px 10px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

/* Complete button styling override for dark theme */
.login-footer .button-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.login-footer .row {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.login-footer .center-row {
  justify-content: center;
}

/* All button types - base reset and dark theme */
.login-footer .info-button,
.login-footer .basic-button,
.login-footer .disclaimer-button {
  display: inline-block !important;
  padding: 12px 24px !important;
  text-decoration: none !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  transition: all 0.3s ease !important;
  border: 2px solid transparent !important;
  text-align: center !important;
  min-width: 120px !important;
  cursor: pointer !important;
}

/* Info buttons - Blue theme */
.login-footer .info-button {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.login-footer .info-button:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5) !important;
  transform: translateY(-2px) !important;
  border-color: #93c5fd !important;
}

/* Basic buttons - Purple theme */
.login-footer .basic-button {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
  color: #ffffff !important;
  border-color: #a78bfa !important;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
}

.login-footer .basic-button:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5) !important;
  transform: translateY(-2px) !important;
  border-color: #c4b5fd !important;
}

/* Disclaimer buttons - Slate theme */
.login-footer .disclaimer-button {
  background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
  color: #f1f5f9 !important;
  border-color: #64748b !important;
  box-shadow: 0 4px 12px rgba(71, 85, 105, 0.3) !important;
}

.login-footer .disclaimer-button:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5) !important;
  transform: translateY(-2px) !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .factions-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .factions-title {
    font-size: 2.5rem;
  }

  .faction-name {
    font-size: 1.5rem;
  }

  .faction-motto {
    font-size: 1rem;
  }

  .faction-header-section,
  .faction-body-section {
    padding: 10px;
  }

  .faction-title-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-footer .info-button,
  .login-footer .basic-button,
  .login-footer .disclaimer-button {
    min-width: 90px !important;
    padding: 10px 16px !important;
    font-size: 0.875rem !important;
  }
}

@media (max-width: 480px) {
  .factions-container {
    padding: 15px 5px;
  }
  .factions-title {
    font-size: 2rem;
    margin-bottom: 30px;
  }
  .faction-image {
    width: 100%;
    height: auto;
  }
  /* 2-column layout for buttons on mobile */
  .login-footer .button-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    max-width: 400px;
    margin: 0 auto;
  }

  .login-footer .row {
    display: contents !important;
  }

  .login-footer .info-button,
  .login-footer .basic-button,
  .login-footer .disclaimer-button {
    width: 100% !important;
    min-width: auto !important;
    padding: 12px 8px !important;
    font-size: 0.875rem !important;
  }
}
