/* --- Estilos para: css/retos.css --- */

/* Contenedor Principal */
.retos-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    color: #1a1a1a;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* --- PANEL DE CREAR RETO (Solo visible si logueado) --- */
.crear-reto-box {
    background: #1a1a1a; /* Fondo oscuro */
    color: #fff;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 50px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid #f39c12;
}

.crear-reto-box h2 {
    margin-top: 0;
    color: #f39c12;
}

.form-reto {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
}

.input-reto {
    padding: 12px 20px;
    border-radius: 30px;
    border: none;
    font-size: 1rem;
    outline: none;
    text-align: center;
}

.select-reto {
    padding: 12px 20px;
    border-radius: 30px;
    border: none;
    font-size: 1rem;
    background-color: #333;
    color: #fff;
    cursor: pointer;
}

.btn-lanzar {
    padding: 12px 30px;
    border-radius: 30px;
    border: none;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(45deg, #f39c12, #d35400);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

.btn-lanzar:hover {
    transform: scale(1.05);
}

/* --- TARJETAS DE RETOS --- */
.grid-retos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.reto-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    position: relative;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.reto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Encabezado de la tarjeta */
.reto-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.tipo-badge {
    font-size: 0.8rem;
    font-weight: 700;
    background: #eee;
    padding: 4px 10px;
    border-radius: 10px;
    color: #555;
}

.monto-badge {
    font-size: 1.1rem;
    font-weight: 800;
    color: #d95b00;
    display: flex;
    align-items: center;
    gap: 5px;
}
.monto-badge img { width: 20px; }

/* Cuerpo de la tarjeta (VS) */
.reto-vs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    text-align: center;
}

.jugador {
    flex: 1;
}
.jugador-nombre {
    font-weight: 700;
    font-size: 1rem;
    display: block;
    color: #333;
}
.jugador-rol {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
}

.vs-divider {
    font-weight: 900;
    color: #f39c12;
    font-size: 1.2rem;
    margin: 0 10px;
}

/* Pie de la tarjeta (Acciones) */
.reto-footer {
    text-align: center;
}

.btn-aceptar {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background-color: #27ae60;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-aceptar:hover { background-color: #219150; }

.btn-login-required {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    color: #777;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

/* Estado: En Juego */
.estado-en-juego {
    border: 2px solid #f39c12;
}
.badge-live {
    background-color: #f39c12;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    animation: pulse 2s infinite;
}

/* Acciones de Reporte (Ganó/Perdió) */
.reporte-acciones {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.btn-gane {
    flex: 1;
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-perdi {
    flex: 1;
    background-color: #c0392b;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.esperando-rival {
    color: #999;
    font-style: italic;
    font-size: 0.9rem;
}

.resultado-final {
    background: #f4f4f4;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    color: #333;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}
/* --- NUEVOS ESTILOS: Inputs de Marcador --- */
.inputs-marcador {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
}

.grupo-input-score {
    display: flex;
    flex-direction: column;
    width: 60px;
}

.grupo-input-score label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 3px;
}

.input-score {
    width: 100%;
    padding: 8px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #1a1a1a;
}

.separador-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ccc;
    margin-top: 10px;
}

/* Estilo para el marcador final en la tarjeta */
.marcador-final-badge {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 10px 0;
    letter-spacing: 2px;
}