/* ==========================================
   SISTEMA DE GRANDES PREMIOS
   ========================================== */

/* GP List Container */
.gp-list-container {
  max-width: 1400px;
  margin: 0 auto;
}

.gp-header {
  text-align: center;
  margin-bottom: 3rem;
}

.gp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.gp-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.gp-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 30, 0, 0.5);
}

.gp-card.has-prediction {
  border-color: rgba(0, 255, 0, 0.3);
}

.gp-card-header {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gp-number {
  background: linear-gradient(135deg, #ff1e00, #e10600);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
}

.gp-card-body {
  padding: 1.5rem;
}

.gp-name {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.gp-card-footer {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 0.4rem;
  justify-content: space-between;
}

.gp-card-footer .btn {
  padding: 0.6rem 0.3rem;
  font-size: 0.8rem;
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-width: 0;
}

.btn-predict {
  background: linear-gradient(90deg, #e10600 0%, #ff1e00 100%);
  color: white !important;
}

.btn-predict:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(225, 6, 0, 0.4);
}

.btn-view {
  background: rgba(255, 255, 255, 0.1);
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-view:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-api-results {
  background: rgb(2, 139, 75);
  color: rgb(34, 34, 34) !important;
}

.btn-api-results:hover {
  background: rgb(2, 139, 75);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(3, 223, 120, 0.4);
}

/* Predict GP Form */
.predict-container {
  max-width: 800px;
  margin: 0 auto;
}

.predict-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.predict-header h1 {
  font-size: 2.2rem;
  color: #ff1e00;
  margin-bottom: 0.5rem;
}

.predict-subtitle {
  color: #aaa;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.back-link {
  display: inline-block;
  color: #e21111;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #ff1e00;
}

.predict-form {
  background: rgba(255, 255, 255, 0.05);
  padding: 3rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.prediction-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.prediction-section:last-of-type {
  border-bottom: none;
  margin-bottom: 2rem;
}

.prediction-section h2 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.field-description {
  color: #888;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.btn-large {
  width: 100%;
  padding: 1.2rem;
  font-size: 1.2rem;
  margin-top: 1rem;
}

/* GP Dashboard Predictions */
.gp-dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* botón de información adicional */
.btn-info {
  background: #007bff;
  color: white !important;
}
.btn-info:hover {
  background: #0069d9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.gp-predictions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: start;
}

.gp-prediction-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.gp-prediction-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 30, 0, 0.5);
  box-shadow: 0 10px 30px rgba(255, 30, 0, 0.2);
}

.current-user-card {
  border-color: #ff1e00;
  box-shadow: 0 0 20px rgba(255, 30, 0, 0.3);
}

.gp-prediction-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.2rem;
}

.gp-prediction-item:last-child {
  margin-bottom: 0;
}

.prediction-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
}

.gp-prediction-icon {
  font-size: 1.2rem;
  width: 25px;
  text-align: center;
}

.gp-prediction-label {
  color: #ccc;
  font-size: 0.95rem;
  margin-right: 0.3rem;
}

.gp-prediction-value {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
}

.gp-prediction-value {
  display: block;
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
}

.gp-prediction-value.pole,
.gp-prediction-value.first {
  color: #ffd700;
}

.gp-prediction-value.second {
  color: #c0c0c0;
}

.gp-prediction-value.third {
  color: #cd7f32;
}

/* User Info inside GP Cards */
.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff1e00, #e10600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
}

.username {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prediction-date {
  color: #888;
  font-size: 0.85rem;
}

.badge-you {
  background: #ff1e00;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: bold;
}

.card-header {
  background: transparent;
  padding: 1rem 1.5rem 0.5rem 1.5rem;
}

.card-body {
  padding: 0.5rem 1.5rem 1.5rem 1.5rem;
}

/* ==========================================
   INFO PAGE — Circuit detail
   ========================================== */

.gp-info-container {
  max-width: 860px;
  margin: 2rem auto;
  color: #fff;
  padding: 0 1rem;
}

.gp-info-title {
  font-size: 2rem;
  margin: 1rem 0 1.5rem;
  color: #fff;
}

.circuit-map-wrap {
  text-align: center;
  margin-bottom: 2rem;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.08);
}

.circuit-map-wrap img {
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  border-radius: 8px;
}

.circuit-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.circuit-stat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  transition: border-color 0.2s;
}

.circuit-stat-card:hover {
  border-color: rgba(255, 30, 0, 0.4);
}

.stat-icon {
  font-size: 1.6rem;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ff1e00;
}

.stat-label {
  font-size: 0.8rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.circuit-winners {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1.5rem;
}

.circuit-winners h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #fff;
}

.winners-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.winners-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.8rem;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}

.winner-pos {
  font-size: 0.75rem;
  color: #888;
  min-width: 110px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.winner-name {
  color: #fff;
  font-weight: 600;
}

.winners-list li:first-child .winner-name {
  color: #ffd700;
}

.winners-list li:nth-child(2) .winner-name {
  color: #c0c0c0;
}

.winners-list li:nth-child(3) .winner-name {
  color: #cd7f32;
}

.no-data {
  color: #888;
  font-style: italic;
}

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

  .circuit-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
