* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-image: url('fondo.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ========== LOGO - MÁS GRANDE Y SUBIDO ========== */
.logo-img {
    display: block;
    width: 190px;
    height: auto;
    margin: 0 auto 20px auto;
    position: relative;
    top: -10px;
}

/* ========== TÍTULOS ========== */
.welcome {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 12px;
}

.sub {
    text-align: center;
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 32px;
    line-height: 1.4;
}

.label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

/* ========== INPUT CON +52 ========== */
.phone-wrapper {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 60px;
    background: white;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    max-width: 500px;
    width: 100%;
}

.phone-wrapper:focus-within {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.country-code-prefix {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    padding: 16px 0 16px 20px;
    border-right: 1px solid #e2e8f0;
    white-space: nowrap;
}

.phone-input-direct {
    flex: 1;
    border: none;
    padding: 16px 12px;
    font-size: 1rem;
    font-family: 'Inter', monospace;
    font-weight: 500;
    background: transparent;
    outline: none;
    color: #0f172a;
}

.phone-input-direct::placeholder {
    color: #cbd5e1;
    font-family: monospace;
}

.chevron-icon {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-right: 20px;
}

/* ========== BOTÓN ========== */
.btn {
    max-width: 500px;
    width: 100%;
    background: #cbd5e1;
    color: #94a3b8;
    border: none;
    padding: 14px;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 600;
    cursor: not-allowed;
    margin-bottom: 24px;
    transition: all 0.2s;
}

.btn.active {
    background: #335a3a;
    color: white;
    cursor: pointer;
}

.btn.active:hover {
    background: #2a4a30;
}

.btn.active:active {
    transform: scale(0.98);
}

/* ========== reCAPTCHA - TEXTO BLANCO ========== */
.recaptcha {
    font-size: 0.7rem;
    color: #ffffff;
    text-align: center;
    max-width: 500px;
    width: 100%;
    margin-bottom: 24px;
}

.recaptcha a {
    color: #10b981;
    text-decoration: none;
}

.recaptcha a:hover {
    text-decoration: underline;
}

/* ========== LÍNEA ========== */
hr {
    max-width: 500px;
    width: 100%;
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 8px 0 24px 0;
}

/* ========== PUNTOS - FONDO AMARILLO #ffee00 LETRAS NEGRAS ========== */
.points {
    max-width: 500px;
    width: 100%;
    background: #ffee00;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 28px;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.points:hover {
    background: #e6d900;
}

.points-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.coin {
    font-size: 1.3rem;
    color: #000000;
}

.points-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #000000;
}

.points-text {
    font-size: 0.8rem;
    line-height: 1.45;
    color: #000000;
    margin-left: 34px;
}

/* ========== LINKS - FONDO AMARILLO #ffee00 LETRAS NEGRAS ========== */
.links {
    max-width: 500px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
}

.link {
    color: #000000;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 40px;
    background: #ffee00;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.link i {
    font-size: 1rem;
    color: #000000;
}

.link:hover {
    background: #e6d900;
    text-decoration: none;
}

/* ========== PANTALLA OTP - MÁS ARRIBA ========== */
.otp-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    background-image: url('fondo.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 40px 20px;
    z-index: 100;
}

.otp-screen.hidden {
    display: none;
}

.logo-img-otp {
    display: block;
    width: 190px;
    height: auto;
    margin: 0 auto 15px auto;
    position: relative;
    top: -15px;
}

.welcome-otp {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 8px;
    position: relative;
    top: -15px;
}

.sub-otp {
    text-align: center;
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.4;
    position: relative;
    top: -15px;
}

.sub-otp strong {
    color: #ffffff;
    font-weight: 600;
}

.label-otp {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    position: relative;
    top: -15px;
}

.otp-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    position: relative;
    top: -15px;
}

.otp-box {
    width: 60px;
    height: 70px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Inter', monospace;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    background: white;
    outline: none;
    color: #0f172a;
    transition: all 0.2s ease;
}

.otp-box:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.otp-box.error {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.btn-otp {
    max-width: 500px;
    width: 100%;
    background: #cbd5e1;
    color: #94a3b8;
    border: none;
    padding: 14px;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 600;
    cursor: not-allowed;
    margin-bottom: 20px;
    transition: all 0.2s;
    position: relative;
    top: -15px;
}

.btn-otp.active {
    background: #335a3a;
    color: white;
    cursor: pointer;
}

.btn-otp.active:hover {
    background: #2a4a30;
}

/* ========== REENVIAR CÓDIGO - TEXTO BLANCO ========== */
.resend-section {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    top: -15px;
}

.resend-text {
    font-size: 0.85rem;
    color: #ffffff;
}

.timer {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 10px;
    border-radius: 20px;
    margin: 0 4px;
}

.links-otp {
    max-width: 500px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
    position: relative;
    top: -15px;
}

/* ========== SPINNER ========== */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.spinner-overlay.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-text {
    color: white;
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========== TOAST ========== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 1001;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 550px) {
    body {
        padding: 20px 16px;
    }
    
    .welcome, .welcome-otp {
        font-size: 1.5rem;
    }
    
    .sub, .sub-otp {
        font-size: 0.85rem;
    }
    
    .logo-img, .logo-img-otp {
        width: 150px;
        top: -10px;
    }
    
    .otp-container {
        gap: 8px;
    }
    
    .otp-box {
        width: 48px;
        height: 56px;
        font-size: 1.5rem;
        border-radius: 12px;
    }
    
    .country-code-prefix {
        padding: 14px 0 14px 16px;
        font-size: 0.85rem;
    }
    
    .phone-input-direct {
        padding: 14px 10px;
        font-size: 0.9rem;
    }
    
    .toast {
        white-space: normal;
        text-align: center;
        max-width: 85%;
        font-size: 0.75rem;
    }
    
    .welcome-otp {
        top: -10px;
    }
    
    .sub-otp {
        top: -10px;
    }
    
    .label-otp {
        top: -10px;
    }
    
    .otp-container {
        top: -10px;
    }
    
    .btn-otp {
        top: -10px;
    }
    
    .resend-section {
        top: -10px;
    }
    
    .links-otp {
        top: -10px;
    }
}

@media (max-width: 400px) {
    .otp-container {
        gap: 6px;
    }
    
    .otp-box {
        width: 42px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .logo-img, .logo-img-otp {
        width: 130px;
        top: -10px;
    }
}