/* ═══ RANGOS ECLESIÁSTICOS ═══ */

.rango-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
    border: 1px solid var(--rango-color, var(--dorado));
    border-radius: 12px;
    padding: 12px 16px;
    margin: 10px 0;
}

.rango-emoji {
    font-size: 2rem;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
}

.rango-info {
    flex: 1;
    min-width: 0;
}

.rango-titulo {
    font-weight: 700;
    color: var(--rango-color, var(--dorado));
    font-size: 1rem;
    display: block;
}

.rango-bar {
    height: 6px;
    background: rgba(255,255,255,.1);
    border-radius: 3px;
    margin: 6px 0 4px;
    overflow: hidden;
}

.rango-bar__fill {
    height: 100%;
    background: var(--rango-color, var(--dorado));
    border-radius: 3px;
    transition: width .6s ease;
}

.rango-next {
    font-size: .75rem;
    color: var(--crema-oscuro);
    opacity: .8;
}

/* Escalera de rangos en welcome */
.rangos-explainer {
    margin-top: 20px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(139,69,19,.15), rgba(255,215,0,.05));
    border-radius: 14px;
    border: 1px solid rgba(255,215,0,.15);
}

.rangos-explainer__t {
    color: var(--dorado-claro);
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.rangos-explainer__sub {
    color: var(--crema-oscuro);
    font-size: .82rem;
    margin-bottom: 14px;
    opacity: .8;
}

.rangos-ladder {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rango-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,.04);
    border-left: 3px solid var(--rango-color);
    transition: transform .2s;
}

.rango-step:hover {
    transform: translateX(4px);
}

.rango-step span:first-child {
    font-size: 1.3rem;
    min-width: 28px;
    text-align: center;
}

.rango-step strong {
    color: var(--rango-color);
    display: block;
    font-size: .88rem;
}

.rango-step span:not(:first-child) {
    font-size: .75rem;
    color: var(--crema-oscuro);
    opacity: .7;
}

.rango-step--top {
    background: linear-gradient(135deg, rgba(255,215,0,.1), rgba(255,215,0,.03));
    border-left-width: 4px;
}

/* ═══ PREMIOS ═══ */
.premios-box {
    margin-top: 20px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(255,215,0,.08), rgba(192,192,192,.05));
    border-radius: 14px;
    border: 1px solid rgba(255,215,0,.2);
}

.premios-box__t {
    color: var(--dorado-claro);
    font-size: 1.05rem;
    margin-bottom: 14px;
    text-align: center;
}

.premios-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

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

.premio-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 16px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.04);
}

.premio-card--gold {
    border: 1px solid rgba(255,215,0,.35);
    box-shadow: 0 0 20px rgba(255,215,0,.08);
}

.premio-card--silver {
    border: 1px solid rgba(192,192,192,.3);
}

.premio-card__pos {
    font-size: .85rem;
    font-weight: 700;
    opacity: .9;
}

.premio-card__ico {
    font-size: 2rem;
}

.premio-card strong {
    color: var(--dorado-claro);
    font-size: .9rem;
}

.premio-card span:last-child {
    font-size: .78rem;
    color: var(--crema-oscuro);
    opacity: .75;
    line-height: 1.3;
}

.premios-box__tip {
    text-align: center;
    margin-top: 14px;
    font-size: .82rem;
    color: var(--dorado);
    opacity: .85;
}

/* Premios en ranking */
.rk-premios-banner {
    background: linear-gradient(135deg, rgba(255,215,0,.06), rgba(192,192,192,.04)) !important;
    border: 1px solid rgba(255,215,0,.2) !important;
    padding: 14px 18px !important;
}

.rk-premios-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.rk-premio {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.rk-premio__medal {
    font-size: 1.6rem;
}

.rk-premio strong {
    color: var(--dorado-claro);
    display: block;
    font-size: .85rem;
}

.rk-premio span {
    font-size: .75rem;
    color: var(--crema-oscuro);
    opacity: .7;
}

.rk-prize {
    cursor: help;
    font-size: .85rem;
}

.rk-rango-cell {
    font-size: .78rem;
    color: var(--crema-oscuro);
    white-space: nowrap;
}

.rk-rango {
    font-size: .9rem;
}

/* ═══ RETO DEL DÍA ═══ */
.btn--reto {
    background: linear-gradient(135deg, #FF6B35, #E5451F) !important;
    border: 1px solid rgba(255,107,53,.4) !important;
    position: relative;
    overflow: hidden;
    flex-direction: column !important;
    padding: 14px 20px !important;
}

.btn--reto::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,.1) 50%, transparent 60%);
    animation: retoShine 3s infinite;
}

@keyframes retoShine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.reto-sub {
    font-size: .72rem !important;
    opacity: .8;
    font-weight: 400;
}

.reto-done {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(39,174,96,.1);
    border: 1px solid rgba(39,174,96,.3);
    border-radius: 10px;
    margin: 8px 0;
}

.reto-done__ico {
    font-size: 1.4rem;
}

.reto-done strong {
    color: #2ECC71;
    display: block;
    font-size: .9rem;
}

/* ═══ SHARE BONUS ═══ */
.share-bonus-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(255,215,0,.1), rgba(255,215,0,.03));
    border: 1px solid rgba(255,215,0,.25);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 14px auto;
    max-width: 500px;
}

.share-bonus-card__ico {
    font-size: 1.5rem;
}

.share-bonus-card strong {
    color: var(--dorado-claro);
    display: block;
    font-size: .9rem;
}

.share-bonus-card span {
    font-size: .78rem;
    color: var(--crema-oscuro);
    opacity: .75;
}

.share-bonus-done {
    color: #2ECC71;
    font-weight: 600;
    font-size: .9rem;
}

.share__bonus {
    display: inline-block;
    background: rgba(255,215,0,.15);
    color: var(--dorado);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 700;
    margin-left: 6px;
}

/* ═══ RANGO EN RESULTADOS ═══ */
.rango-result {
    max-width: 380px;
    margin: 0 auto 12px;
}

/* ═══ RANGO EN PERFIL ═══ */
.pf-rango {
    margin-top: 10px;
}
/* ════════════════════════════════
   SISTEMA DE RANGOS (TIMELINE)
   ════════════════════════════════ */
.rangos-explainer {
    margin: 20px 0;
    padding: 20px 0;
    /* Fondo sutil para separar la sección */
    background: linear-gradient(to bottom, rgba(10,6,18,0), rgba(10,6,18,0.4));
    border-top: 1px solid rgba(212,168,67,0.15);
    border-bottom: 1px solid rgba(212,168,67,0.15);
}

.rangos-header {
    text-align: center;
    margin-bottom: 25px;
    padding: 0 20px;
}

.rangos-explainer__t {
    font-family: var(--font-heading, serif);
    color: var(--dorado);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.rangos-explainer__sub {
    font-size: 0.85rem;
    color: var(--crema-oscuro);
    opacity: 0.7;
}

/* --- CONTENEDOR CON SCROLL --- */
.rangos-scroll-container {
    overflow-x: auto;
    padding: 10px 20px 25px 20px; /* Espacio abajo para sombras */
    
    /* Barras de scroll finas y doradas */
    scrollbar-width: thin;
    scrollbar-color: var(--dorado) rgba(10,6,18,0.5);
    -webkit-overflow-scrolling: touch; /* Suavidad en iOS */
}

/* Webkit scrollbar styling */
.rangos-scroll-container::-webkit-scrollbar { height: 6px; }
.rangos-scroll-container::-webkit-scrollbar-track { background: rgba(10,6,18,0.5); border-radius: 3px; }
.rangos-scroll-container::-webkit-scrollbar-thumb { background: var(--dorado); border-radius: 3px; }

.rangos-timeline {
    display: flex;
    gap: 0; /* Sin hueco, el ancho lo define cada item */
    min-width: max-content; /* Asegura que no se aplasten */
    position: relative;
    padding-top: 10px;
}

/* Línea conectora detrás de los iconos */
.rangos-timeline::before {
    content: '';
    position: absolute;
    top: 37px; /* A la mitad de la altura del icono (54px / 2 + 10px padding) */
    left: 45px; /* Mitad del primer item */
    right: 45px; /* Mitad del último item */
    height: 3px;
    background: rgba(255,255,255,0.1);
    z-index: 0;
    border-radius: 4px;
}

/* --- CADA PASO (ITEM) --- */
.r-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px; /* Ancho fijo para cada rango */
    text-align: center;
    padding: 0 5px;
}

/* El círculo del icono */
.r-icon {
    width: 54px;
    height: 54px;
    background: #1a0a2e; /* Fondo oscuro para tapar la línea de atrás */
    border: 3px solid var(--rc); /* Color dinámico definido en el HTML */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    margin-bottom: 12px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.r-step:hover .r-icon {
    transform: scale(1.15);
    box-shadow: 0 0 20px var(--rc); /* Brillo del color del rango */
    cursor: default;
}

/* Texto del rango */
.r-info strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--crema);
    line-height: 1.2;
    margin-bottom: 3px;
}

.r-info small {
    font-size: 0.65rem;
    color: var(--rc); /* El texto pequeño coge el color del rango */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estilo especial para el TOP 1 (Hermano Mayor) */
.r-step--top .r-icon {
    border-color: var(--dorado-brillante);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    animation: glowRank 2s infinite alternate;
}

@keyframes glowRank {
    from { box-shadow: 0 0 10px rgba(255, 215, 0, 0.2); }
    to { box-shadow: 0 0 25px rgba(255, 215, 0, 0.7); }
}
/* ════════════════════════════════
   NUEVO ESTILO: RETO DEL DÍA (CARD)
   ════════════════════════════════ */

.reto-card {
    position: relative;
    background: linear-gradient(135deg, #380e1d 0%, #1a0a2e 100%); /* Burdeos a Morado */
    border: 1px solid rgba(212, 168, 67, 0.4);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    text-align: left;
    transition: transform 0.3s ease;
}

.reto-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.15) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(30%, -30%);
}

/* --- CABECERA DE LA TARJETA --- */
.reto-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.reto-date {
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 0.8rem;
    color: var(--dorado);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
    border-bottom: 1px solid rgba(212, 168, 67, 0.3);
    padding-bottom: 4px;
    display: inline-block;
}

.reto-badge {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 53, 0.4);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.1);
    animation: pulseReto 2s infinite;
}

@keyframes pulseReto {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(255, 107, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
}

/* --- CONTENIDO PRINCIPAL --- */
.reto-body {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reto-icon-box {
    width: 50px;
    height: 50px;
    background: rgba(10, 6, 18, 0.4);
    border: 1px solid rgba(212, 168, 67, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.reto-info h3 {
    font-family: var(--font-display, 'Cinzel Decorative', serif);
    font-size: 1.4rem;
    color: var(--blanco);
    margin: 0 0 4px 0;
    line-height: 1.1;
}

.reto-info p {
    font-size: 0.85rem;
    color: var(--crema-oscuro);
    margin: 0;
    opacity: 0.8;
}

/* --- BOTÓN DE ACCIÓN --- */
.reto-action {
    margin-top: 18px;
    width: 100%;
    background: linear-gradient(90deg, var(--dorado), #b58928);
    color: #1a0a2e;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(212, 168, 67, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.reto-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 168, 67, 0.5);
    filter: brightness(1.1);
}

/* --- ESTADO COMPLETADO --- */
.reto-done-card {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.05), rgba(10, 6, 18, 0.8));
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.reto-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
}

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

.reto-stat strong {
    display: block;
    font-size: 1.2rem;
    color: #2ecc71; /* Verde éxito */
    font-family: var(--font-heading);
}

.reto-stat span {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--crema-oscuro);
    opacity: 0.7;
}

.reto-timer-msg {
    text-align: center;
    font-size: 0.75rem;
    margin-top: 10px;
    color: var(--dorado);
    font-style: italic;
    opacity: 0.8;
}

.rules-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--rule-color, rgba(212, 168, 67, 0.3));
    border-radius: 8px;
    transition: transform 0.2s, background 0.2s;
}

.rule-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.rule-item__icon {
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.rule-item__icon--ok {
    --rule-color: #27AE60;
}

.rule-item__icon--ko {
    --rule-color: #C0392B;
}

.rule-item__icon--time {
    --rule-color: #E5A100;
}

.rule-item__content {
    flex: 1;
}

.rule-item__content strong {
    display: block;
    color: var(--dorado-claro);
    font-size: 0.95rem;
    margin-bottom: 4px;
    font-family: var(--font-heading);
}

.rule-item__content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--crema-oscuro);
    line-height: 1.4;
    opacity: 0.85;
}

@media (max-width: 600px) {
    .rule-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .rule-item__icon {
        margin-bottom: 4px;
    }
}

.contact-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(212, 168, 67, 0.2);
}

.contact-header__icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 2px 8px rgba(212, 168, 67, 0.3));
}

.contact-header__sub {
    color: var(--crema-oscuro);
    font-size: 0.88rem;
    opacity: 0.8;
    margin-top: 4px;
}

.contact-reasons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.contact-reason {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid var(--dorado);
    border-radius: 6px;
}

.contact-reason__icon {
    font-size: 1.4rem;
    min-width: 32px;
    text-align: center;
}

.contact-reason strong {
    display: block;
    color: var(--dorado-claro);
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.contact-reason p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--crema-oscuro);
    opacity: 0.75;
    line-height: 1.3;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 168, 67, 0.2);
    border-radius: 8px;
    color: var(--crema);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.3s, background 0.3s;
}

.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--dorado);
    background: rgba(255, 255, 255, 0.08);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form select {
    cursor: pointer;
}

.contact-form select option {
    background: #1a0a2e;
    color: var(--crema);
}

.contact-info {
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.05), rgba(212, 168, 67, 0.02));
    border: 1px solid rgba(212, 168, 67, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 8px 0;
}

.contact-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--crema-oscuro);
    line-height: 1.4;
}

.contact-info strong {
    color: var(--dorado-claro);
}

.contact-success {
    text-align: center;
    padding: 30px 20px;
}

.contact-success__icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 12px;
    animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.contact-success h3 {
    color: var(--dorado-claro);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 0 0 8px 0;
}

.contact-success p {
    color: var(--crema-oscuro);
    font-size: 0.9rem;
    margin: 0 0 20px 0;
}

@media (max-width: 600px) {
    .contact-header {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-reason {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}