.rb-container{

    width:100%;
    max-width:700px;

    margin:auto;

    padding:40px 20px;

    text-align:center;

    border-radius:24px;

}

/* TÍTULO */
.rb-container h2{

    color:white;

    font-size:42px;

    font-family:'Bebas Neue', sans-serif;

    margin-bottom: 5px;

    letter-spacing:1px;

}

/* INPUT */
#rb-phone{

    width:100%;
    max-width:420px;

    height:55px;

    border:none;

    border-radius:14px;

    padding:0 18px;

    font-size:18px;

    background:#2c2c2c;

    color:white;

    outline:none;

    margin-bottom:18px;

    box-shadow:
        0 0 10px rgba(255,59,29,.15);

}

/* BOTÓN */
#rb-spin{

    border:none;

    background:linear-gradient(
        135deg,
        #FF3B1D,
        #ff6b2c
    );

    color:white;

    font-family:'Bebas Neue', sans-serif;

    font-size:32px;

    padding:14px 40px;

    border-radius:14px;

    cursor:pointer;

    transition:.25s;

    margin-bottom:35px;

    box-shadow:
        0 0 15px rgba(255,59,29,.35);

}

#rb-spin:hover{

    transform:scale(1.05);

    box-shadow:
        0 0 30px rgba(255,59,29,.6);

}
.rb-wheel-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 30px auto;
    transform-origin: top center;
}

.rb-wheel-outer-ring {
    position: absolute;
    inset: -16px;
    border-radius: 50%;
    background: conic-gradient(#ffdc6e, #b8860b, #ffd700, #b8860b, #ffdc6e, #b8860b, #ffd700, #b8860b, #ffdc6e);
    z-index: 1;
    box-shadow: 0 0 30px rgba(255,180,0,.4);
}

.rb-wheel-outer-ring::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: #111;
}

#rb-wheel {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    border-radius: 50%;
    width: 400px;
    height: 400px;
    filter: drop-shadow(0 0 18px rgba(255,59,29,.45));
}

.rb-pointer-diamond {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #fff176, #ffd600);
    border: 3px solid #b8860b;
    border-radius: 4px;
    box-shadow: 0 0 14px rgba(255,200,0,.8);
    z-index: 10;
}

.rb-wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #87ceeb, #1565c0 50%, #0d47a1);
    border: 6px solid #ffd700;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 6;
    box-shadow: 0 0 25px rgba(255,200,0,.6), inset 0 4px 12px rgba(255,255,255,.3);
    pointer-events: none;
}

.rb-wheel-center span {
    font-size: 26px;
    line-height: 1;
}

.rb-wheel-center small {
    font-size: 15px;
    font-weight: 900;
    color: #ffd700;
    letter-spacing: 1px;
    font-family: 'Bebas Neue', sans-serif;
    text-shadow: 0 1px 4px rgba(0,0,0,.8);
}

/* RESULTADO */
#rb-result{

    margin-top:28px;

    color:white;

    font-size:32px;

    font-family:'Bebas Neue', sans-serif;

    letter-spacing:1px;

}

.rb-subtitle{
    color: rgba(255,255,255,0.75);
    font-size: 18px;
    font-family: 'Bebas Neue', sans-serif;
    margin-top: -10px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* POPUP */

.rb-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.80);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 99999;
    backdrop-filter: blur(8px);
    box-sizing: border-box;
    overflow-y: auto;
    padding: 16px;
}

.rb-popup-card {
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 32px); /* nunca supera el alto del viewport */
    overflow-y: auto;               /* scroll interno si el contenido no entra */
    background: #111111;
    border-radius: 20px;
    padding: 20px 18px;
    text-align: center;
    border: 1px solid rgba(255, 59, 29, 0.3);
    box-shadow: 0 0 40px rgba(255, 59, 29, 0.25);
    animation: popupShow 0.3s ease;
    box-sizing: border-box;
    margin: auto; /* centra verticalmente cuando hay espacio */
}

.rb-popup-card img {
    width: 100%;
    max-height: 180px;   /* la imagen no acapara toda la card */
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 14px;
}

.rb-popup-card h2 {
    color: #FF3B1D;
    font-size: clamp(22px, 5vw, 38px);
    margin-bottom: 6px;
}

.rb-popup-card h3 {
    color: white;
    font-size: clamp(17px, 4vw, 28px);
    margin-bottom: 10px;
}

.rb-popup-card p {
    color: #cccccc;
    font-size: clamp(13px, 3vw, 15px);
    margin-bottom: 12px;
    line-height: 1.4;
}

/* ANIMACIÓN */

@keyframes popupShow{

    from{
        transform:scale(.8);
        opacity:0;
    }

    to{
        transform:scale(1);
        opacity:1;
    }

}

#rb-popup-phone {
    color: #F5C242;
    font-size: clamp(15px, 4vw, 20px);
    margin-bottom: 10px;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
}


/* DÍA EN EL POPUP */
.rb-popup-dia {
    color: #FF3B1D;
    font-size: clamp(13px, 3.5vw, 16px);
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 59, 29, 0.3);
    border-radius: 10px;
    padding: 6px 14px;
    display: block;
}

.rb-wsp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 100%;

    background: rgba(37,211,102,.12);

    border: 1px solid rgba(37,211,102,.35);

    color: #25D366;

    text-decoration: none;

    padding: 12px 16px;

    border-radius: 14px;

    font-size: 14px;
    font-weight: 600;

    font-family: 'Inter', sans-serif;

    transition: .25s ease;

    backdrop-filter: blur(10px);

    margin-bottom: 12px;
    text-decoration: none !important;
}
.rb-wsp-btn img{

    width: 18px;
    height: 18px;

    margin: 0;

}

.rb-wsp-btn:hover {
    background: rgba(37,211,102,.2);

    transform: translateY(-2px);
text-decoration: none !important;
    color: #25D366;
}


#rb-close-popup{

    width: 100%;

    padding: 12px;

    border-radius: 14px;

    border: none;

    background: #ff3b1d;

    color: white;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

}


@media (max-width: 480px) {
    .rb-wsp-btn {
        font-size: 13px;

        padding: 11px 14px;
    }
}

/* RESPONSIVE POPUP */
@media (max-width: 480px) {

    .rb-popup-card {
        width: 92%;
        padding: 20px 16px;
        border-radius: 18px;
    }

    .rb-popup-card h2 {
        font-size: 30px;
        margin-bottom: 8px;
    }

    .rb-popup-card h3 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .rb-popup-card img {
        border-radius: 12px;
        margin-bottom: 14px;
    }

    .rb-popup-card p {
        font-size: 14px;
        margin-bottom: 16px;
    }

    #rb-popup-phone {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .rb-popup-dia {
        font-size: 15px;
        padding: 6px 12px;
    }

    #rb-close-popup {
        font-size: 20px;
        padding: 12px 24px;
    }
}

@media (max-width: 360px) {

    .rb-popup-card h2 {
        font-size: 26px;
    }

    .rb-popup-card h3 {
        font-size: 20px;
    }
}

/* En móvil achicamos el canvas html pero Winwheel sigue dibujando en 300x300 */
/* RESPONSIVE */
@media (max-width: 540px) {
    .rb-container {
        padding: 20px 10px;
        overflow: hidden;
    }

    .rb-wheel-wrapper {
        zoom: 0.75;
        transform: none;
        margin: 20px auto;
        left: auto;
        position: relative;
        margin-left: auto;
    }
}

@media (max-width: 400px) {
    .rb-wheel-wrapper {
        zoom: 0.65;
    }
}

@media (max-width: 360px) {
    .rb-wheel-wrapper {
        zoom: 0.57;
    }

}