body {
  margin: 0;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
a {text-decoration: none;}

/*#rg_content_page {width: 100%; height: 100%;}*/
#rg_content_page {
    width: 100%;
    height: 100vh; /* Ocupa toda la altura visible */
    overflow-y: auto; /* Scroll vertical cuando el contenido excede */
    overflow-x: hidden; /* Evita scroll horizontal */
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    scroll-behavior: smooth; /* Transición suave al hacer scroll */
    
    /* Estilo del scroll (funciona en Chrome/Edge/Safari) */
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 transparent;
}

#contenido {
    padding: 20px;
    min-height: 60vh;
}

.loader {
    border-top-color: #4f46e5; /* Indigo-600 */
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* POPULAR RETOS */
.popular-retos-container {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 10px;
    margin: 10px;
}

.popular-retos-card {
    width: 130px;
    height: 200px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    display: inline-block;
    margin: 0 3px;
    cursor: pointer;
}

.popular-retos-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.popular-retos-info {
    padding: 10px;
    color: #fff;
    background: linear-gradient(to top, rgb(0 0 0 / 70%), rgba(0, 0, 0, 0));
    position: relative;
    margin-top: -80px;
    border-radius: 0 0 10px 10px;
}

.popular-retos-info h3 {
  margin: 0;
  font-size: 12px;
  font-weight: bold;
}

.popular-retos-location {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: #eaeaea;
}

.popular-retos-location i {
  margin-right: 4px;
}

.popular-retos-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 10px;
  font-size: 10px;
}

.price {
  font-weight: bold;
}

.night {
  font-weight: normal;
  font-size: 10px;
}

.rating {
  display: flex;
  align-items: center;
  color: #ffbe00;
  font-size: 10px;
}

.rating i {
  margin-right: 4px;
}


/* CABECERAS PARTES */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5px;
  margin: 20px 10px 15px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: #333;
}

.ver-mas {
    font-size: 14px;
    color: #ff7a00;
    text-decoration: none;
    transition: color 0.2s;
}

.ver-mas:hover {
  color: #ff9900;
  text-decoration: underline;
}


/* HEADER BUSCADOR */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background-color: #ffffff;
  /*box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/
  position: sticky;
  top: 0;
  z-index: 10;
}

.titulo-app {
    width: 250px;
    font-size: 25px;
    font-weight: bold;
    color: #333;
    padding-left: 15px;
    line-height: 30px;
}

.buscador-app {
    flex: 1;
    display: none;
    margin: 7px 5px 0px 0px;
}

.buscador-app input {
  width: 100%;
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.btn-busqueda {
    background-color: #ffffff;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 20px;
    line-height: 20px;
    width: 40px;
    height: 40px;
}

.btn-busqueda:hover { background-color: #ff974d; color: #ffffff; }


/* RETOS */
#retos-container {padding: 0px 20px 60px;}
.retos-card-detail {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 15px;
    position: relative;
    margin-bottom: 15px;
}
.retos-card-detail form {padding: 0px; margin: 0px;}
.retos-card-detail h5 {font-size: 2.4rem; font-weight: bold;}
.retos-card-detail h3 {margin: 0px;}
.retos-card-detail p {text-align: justify;}
.likeCount {font-size: 1.5rem;}

.retos-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    position: relative;
    margin-bottom: 15px;
}

.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #ff4d4d;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    z-index: 2;
}

.reto-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
}

.reto-content-card {
    padding: 10px;
}

.reto-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.reto-location {
    font-size: 14px;
    color: #666;
    margin-bottom: 0px;
    padding: 0px 20px;
}

.reto-price {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 0px;
}

.reto-price span {
    font-size: 14px;
    font-weight: normal;
    color: #888;
}

.reto-rating {
    display: flex;
    align-items: center;
    color: #333;
}

.reto-rating-value {
    font-weight: bold;
    margin-right: 5px;
}

.reto-stars {
    color: #ffc107;
}

@media (max-width: 400px) {
    .reto-name {
        font-size: 18px;
    }
    
    .reto-price {
        font-size: 16px;
    }
}

/* Loading Spinner */
.loading-overlay {
  position: fixed; /* <- antes era absolute */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  border: 4px solid #ddd;
  border-top: 4px solid #000;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* NOTIFICACIONES COLORES */
/* Notificación de éxito */
.success {
  background-color: #4CAF50; /* Verde */
  border-left: 5px solid #388E3C;
}

/* Notificación de información */
.info {
  background-color: #2196F3; /* Azul */
  border-left: 5px solid #1976D2;
}

/* Notificación de advertencia */
.warning {
  background-color: #FFC107; /* Amarillo */
  border-left: 5px solid #FFA000;
  color: #333; /* Texto oscuro para mejor contraste */
}

/* Notificación de error */
.error {
  background-color: #F44336; /* Rojo */
  border-left: 5px solid #D32F2F;
}

/* Variantes más claras (opcional) */
.light-success {
  background-color: #E8F5E9;
  color: #2E7D32;
}

.light-info {
  background-color: #E3F2FD;
  color: #1565C0;
}

.light-warning {
  background-color: #FFF8E1;
  color: #FF8F00;
}

.light-error {
  background-color: #FFEBEE;
  color: #C62828;
}

.password-match { color: green; }
.password-mismatch { color: red; }

.password-strength-meter {
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 3px;
    margin: 10px 0;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Contenedor principal del campo de contraseña */
.password-container {
    position: relative;
    margin-bottom: 1rem;
}

/* Estilo base del input */
.password-container input[type="password"],
.password-container input[type="text"] {
    padding-right: 40px; /* Espacio para el ícono */
    width: 100%;
}

/* Botón de toggle (mostrar/ocultar) */
.password-toggle {
    position: absolute;
    right: 3px;
    top: 32%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d; /* Color gris por defecto */
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Efecto hover */
.password-toggle:hover {
    color: #495057; /* Color más oscuro al pasar el mouse */
    background-color: #f8f9fa; /* Fondo sutil */
}

/* Efecto active/focus */
.password-toggle:active,
.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Ícono (usando Font Awesome) */
.password-toggle i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

/* Animación al hacer clic */
.password-toggle.active i {
    transform: scale(1.1);
}

/* Estilo cuando la contraseña es visible */
.password-toggle.visible {
    color: #007bff; /* Color azul cuando está activo */
}

/* Versión accesible para teclado */
.password-toggle:focus-visible {
    background-color: #e9ecef;
}

label, legend {
    display: block;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: left;
    padding-left: 10px;
    font-size: 1.3rem;
}

.btnBack {
    position: relative;
    top: -30px;
    left: -36px;
    padding: 8px 10px;
    background: #1eaedb;
    border-radius: 30px;
    color: white;
    width: 45px !important;
    height: 45px !important;
}