/* --- ESTILOS PARA TABLA DE APUESTAS --- */

.bets-container {
  max-width: 1200px;
  margin: 20px auto;
  background: linear-gradient(135deg, #132b1e 0%, #1a3a29 100%);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(240, 185, 11, 0.2);
}

.bets-title {
  text-align: center;
  color: #ffd700;
  margin-bottom: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 20px;
  border-radius: 10px;
}

.bets-table {
  width: 100%;
  border-collapse: collapse;
  background-color: rgba(0, 0, 0, 0.2);
}

.bets-table thead {
  background: linear-gradient(135deg, #1b3a29 0%, #245a3c 100%);
  position: sticky;
  top: 0;
  z-index: 10;
}

.bets-table th {
  padding: 12px 10px;
  text-align: center;
  color: #ffd700;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #1fa25a;
}

.bets-table tbody tr {
  transition: background-color 0.2s ease;
  border-bottom: 1px solid rgba(31, 162, 90, 0.3);
}

.bets-table tbody tr:hover {
  background-color: rgba(30, 72, 51, 0.6);
}

.bets-table td {
  padding: 12px 10px;
  text-align: center;
  color: #fff;
  font-size: 0.85rem;
}

/* Celdas específicas */
.match-cell {
  text-align: left;
  font-weight: 500;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-cell {
  font-weight: 600;
  color: #f0b90b;
}

.prediction-cell {
  font-weight: 500;
}

.odds-cell {
  color: #ffd700;
  font-weight: 700;
  font-size: 1.1rem;
}

.result-cell {
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.won {
  background-color: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid #4caf50;
}

.status-badge.lost {
  background-color: rgba(244, 67, 54, 0.2);
  color: #f44336;
  border: 1px solid #f44336;
}

.status-badge.pending {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid #ffc107;
}

/* Botones de acción en tabla */
.actions-cell {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}



.btn-analyze {
  background-color: #1fa25a;
}

.btn-analyze:hover {
  background-color: #24c06f;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(31, 162, 90, 0.3);
}

.btn-update {
  background-color: #555;
}

.btn-update:hover {
  background-color: #777;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(85, 85, 85, 0.3);
}

/* Footer con botón de crear */
.table-footer {
  text-align: center;
  margin-top: 25px;
}

.btn-new-bet {
  display: inline-block;
  color: #ffd700;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 12px 24px;
  border: 2px solid #ffd700;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-new-bet:hover {
  background-color: #ffd700;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.amount-cell {
  color: #00d9ff;
  font-weight: 600;
}

.profit-positive {
  color: #00d084;
  font-weight: 700;
}

.profit-negative {
  color: #ff4444;
  font-weight: 700;
}

.date-cell {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

/* Columna de acciones */
.action-cell {
  text-align: center;
  padding: 0.5rem !important;
}

/* Botones de iconos */
.btn-icon {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #888;
  margin: 0;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-delete {
  color: #ff4444;
}

.btn-delete:hover {
  background: rgba(255, 68, 68, 0.1);
  color: #ff6666;
}

/* Warning text en modal */
.warning-text {
  color: #ff4444;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Animación de eliminación de fila */
@keyframes fadeOutRow {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

.bet-row {
  animation: fadeInUp 0.3s ease forwards;
}

.bet-row:nth-child(1) { animation-delay: 0.05s; }
.bet-row:nth-child(2) { animation-delay: 0.1s; }
.bet-row:nth-child(3) { animation-delay: 0.15s; }
.bet-row:nth-child(4) { animation-delay: 0.2s; }
.bet-row:nth-child(5) { animation-delay: 0.25s; }

.bet-row.deleting {
  animation: fadeOutRow 0.3s ease forwards;
}

/* Animación al cargar */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 1200px) {
  .bets-table {
    font-size: 0.8rem;
  }
  
  .bets-table th,
  .bets-table td {
    padding: 10px 6px;
    font-size: 0.8rem;
  }
  
  .bets-table th {
    font-size: 0.75rem;
  }
  
  .match-cell {
    max-width: 160px;
  }

  .odds-cell {
    font-size: 0.95rem;
  }
}

@media (max-width: 992px) {
  .bets-table {
    font-size: 0.85rem;
  }
  
  .bets-table th,
  .bets-table td {
    padding: 10px 8px;
  }
  
  .match-cell {
    max-width: 150px;
  }
  
  .actions-cell {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .bets-container {
    padding: 20px;
  }
  
  .table-wrapper {
    margin: 0 -20px;
    border-radius: 0;
  }
  
  .bets-table {
    font-size: 0.8rem;
  }
  
  .bets-table th {
    font-size: 0.75rem;
    padding: 8px 5px;
  }
  
  .bets-table td {
    padding: 8px 5px;
  }
  
  /* Ocultar columnas menos importantes en móvil */
  .team-cell,
  .result-cell {
    display: none;
  }
  
  .match-cell {
    max-width: 120px;
  }
}

@media (max-width: 480px) {
  .bets-title {
    font-size: 1.5rem;
  }
  
  .prediction-cell {
    font-size: 0.75rem;
  }
  
  .status-badge {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
  
  .btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

/* ============================================
   MODO EDICIÓN Y SELECCIÓN MÚLTIPLE
   ============================================ */

/* Columna de checkboxes */
.checkbox-column {
  width: 40px;
  padding: 8px !important;
  text-align: center;
}

.checkbox-column input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #1fa25a;
}

/* Botón de modo edición */
.btn-edit-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #245a3c 0%, #1b3a29 100%);
  color: #ffd700;
  border: 1px solid rgba(240, 185, 11, 0.3);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-edit-mode:hover {
  background: linear-gradient(135deg, #2d7048 0%, #245a3c 100%);
  border-color: rgba(240, 185, 11, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(31, 162, 90, 0.3);
}

.btn-edit-mode.active {
  background: linear-gradient(135deg, #ff6b6b 0%, #c92a2a 100%);
  border-color: rgba(255, 107, 107, 0.5);
  color: #fff;
}

.btn-edit-mode.active:hover {
  background: linear-gradient(135deg, #ff8787 0%, #e03131 100%);
  border-color: rgba(255, 107, 107, 0.7);
}

/* Botón eliminar seleccionados */
.btn-delete-selected {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #c92a2a 0%, #a61e1e 100%);
  color: #fff;
  border: 1px solid rgba(255, 68, 68, 0.5);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  animation: slideIn 0.3s ease;
}

.btn-delete-selected:hover {
  background: linear-gradient(135deg, #e03131 0%, #c92a2a 100%);
  border-color: rgba(255, 68, 68, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fila seleccionada */
.bet-row.selected {
  background-color: rgba(31, 162, 90, 0.15) !important;
  border-left: 3px solid #1fa25a;
}

/* Responsive para modo edición */
@media (max-width: 768px) {
  .btn-edit-mode,
  .btn-delete-selected {
    padding: 8px 15px;
    font-size: 0.85rem;
    gap: 6px;
  }
  
  .btn-icon {
    font-size: 0.9rem;
  }
  
  .checkbox-column input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  .btn-edit-mode,
  .btn-delete-selected {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .checkbox-column {
    width: 35px;
  }
}
