/* Features Views Consolidated Styles */

/* Common page structure */
.page-header {
  margin-bottom: 30px;
}

.page-title {
  font-size: 32px;
  color: #333;
  margin-bottom: 10px;
}

.page-subtitle {
  color: #666;
  font-size: 16px;
  margin-bottom: 20px;
}

.subtitle {
  color: #666;
  margin-bottom: 20px;
  font-size: 14px;
}

/* Feature size control */
.feature-size-control {
  margin-bottom: 20px;
  padding: 10px 15px;
  background-color: #f8f9fa;
  border-radius: 6px;
  display: inline-block;
}

.feature-size-control label {
  margin-right: 10px;
  font-weight: 500;
  color: #333;
}

.feature-size-control select {
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  font-size: 14px;
}

.feature-size-control select:hover {
  border-color: #999;
}

.feature-size-control select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Feature cards and containers */
.features-container,
.games-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 20px;
}

.feature-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 20px;
}

/* Grid layouts */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

.feature-games {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .feature-games {
    grid-template-columns: 1fr;
  }
}

/* Feature analysis specific styles */
.feature-analysis {
  padding: 20px 0;
  border-bottom: 1px solid #dee2e6;
}

.feature-analysis:last-child {
  border-bottom: none;
}

.feature-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.feature-name {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

.feature-range {
  font-size: 16px;
  color: #666;
}

/* Feature and card titles */
.feature-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Game cards and items */
.game-card {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
}

.game-card-title {
  font-weight: bold;
  color: #495057;
  margin-bottom: 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.games-list {
  margin-top: 10px;
}

.game-item {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-item:last-child {
  border-bottom: none;
}

.game-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-rank {
  font-weight: bold;
  color: #666;
  margin-right: 10px;
  min-width: 30px;
}

.game-name {
  flex: 1;
  margin-right: 10px;
  color: #333;
}

.game-name a {
  color: #333;
  text-decoration: none;
}

.game-name a:hover {
  color: #007bff;
  text-decoration: underline;
}

.game-value {
  font-family: monospace;
  font-weight: bold;
  font-size: 18px;
  min-width: 80px;
  text-align: right;
}

.positive-value {
  color: #28a745;
}

.negative-value {
  color: #dc3545;
}

/* Tables */
.games-table,
.stats-table {
  width: 100%;
  margin-top: 10px;
}

.games-table th,
.stats-table th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid #dee2e6;
  color: #495057;
  font-weight: 500;
}

.stats-table th {
  padding: 8px;
}

.games-table td,
.stats-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
}

.stats-table td {
  padding: 8px;
}

.games-table tr:last-child td,
.stats-table tr:last-child td {
  border-bottom: none;
}

/* Controls and navigation */
.controls {
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  align-items: center;
}

.order-selector {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

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

.nav-button {
  padding: 8px 16px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.nav-button:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.nav-button:disabled,
.nav-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Statistics */
.stats-card {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  margin-top: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.stat-item {
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-top: 5px;
}

/* Links */
.view-feature-link,
.feature-link,
.back-link {
  color: #007bff;
  text-decoration: none;
}

.view-feature-link {
  font-size: 14px;
}

.view-feature-link:hover,
.feature-link:hover,
.back-link:hover {
  text-decoration: underline;
}

.back-link {
  margin-bottom: 20px;
  display: inline-block;
}

.bgg-link {
  color: #ff5900;
  text-decoration: none;
  font-size: 12px;
}

.bgg-link:hover {
  text-decoration: underline;
}

/* Error page specific styles */
.error-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 40px;
  text-align: center;
  margin-top: 40px;
}

.error-icon {
  font-size: 48px;
  color: #dc3545;
  margin-bottom: 20px;
}

.error-title {
  font-size: 24px;
  color: #333;
  margin-bottom: 10px;
}

.error-message {
  color: #666;
  margin-bottom: 30px;
}

.error-actions a {
  margin: 0 10px;
  color: #007bff;
  text-decoration: none;
}

.error-actions a:hover {
  text-decoration: underline;
}

/* Utility styles */
.flex-spacer {
  flex: 1;
}