* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    background: #000;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #000;
}

html.login-open,
body.login-open {
    position: static !important;
    overflow: auto !important;
    height: 100% !important;
}

#unity-footer,
#unity-logo-title-footer {
    display: none !important;
}

#unity-container,
#unity-canvas {
    background: #000 !important;
}

#unity-container {
    overflow: hidden;
}

#unity-loading-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
    background: #000;
}



#unity-canvas {
    z-index: 0;
}

#unity-loading-bar {
    position: absolute !important;
    z-index: 10;
}

#unity-warning {
    position: absolute;
    z-index: 11;
}

#unity-container.loaded #unity-loading-video {
    display: none;
}

#unity-fullscreen-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10001;
    float: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    appearance: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

#unity-fullscreen-button:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

#unity-fullscreen-button::before {
    content: "\26F6";
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

#orientation-guard {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    place-items: center;
    padding: 28px;
    background: rgba(0, 0, 0, 0.82);
    pointer-events: auto;
}

#orientation-guard.show {
    display: grid;
}

.orientation-guard-panel {
    width: min(86vw, 520px);
    min-height: min(58vh, 440px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 36px 28px;
    border: 2px solid rgba(255, 255, 255, 0.76);
    border-radius: 24px;
    background: rgba(22, 25, 29, 0.94);
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.orientation-guard-panel p {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 8vw, 44px);
    font-weight: 800;
    line-height: 1.12;
}

.orientation-guard-icon {
    width: 88px;
    height: 88px;
    border: 7px solid #fff;
    border-radius: 22px;
    position: relative;
    transform: rotate(90deg);
}

.orientation-guard-icon::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -28px;
    width: 34px;
    height: 34px;
    border-right: 7px solid #ffa30b;
    border-bottom: 7px solid #ffa30b;
    transform: translateX(-50%) rotate(45deg);
}

#native-input-container {
    width: 100%;
    min-height: 100dvh;
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    place-items: center;
    padding: clamp(20px, 5vw, 72px);
    z-index: 10000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    background-size:
        clamp(180px, 28vw, 520px) clamp(180px, 28vw, 520px),
        clamp(180px, 28vw, 520px) clamp(180px, 28vw, 520px),
        cover;
}

body.login-open #unity-canvas {
    pointer-events: none;
}

body.login-open #unity-container {
    pointer-events: none;
}

body.login-open #native-input-container {
    pointer-events: auto;
}

.login-popup {
    width: min(90%, 980px);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.78);
    border-radius: clamp(28px, 5vw, 84px);
    background: rgba(245, 244, 241, 0.58);
    backdrop-filter: blur(8px);
}

.login-header {
    min-height: clamp(86px, 13vw, 150px);
    display: flex;
    align-items: center;
    padding: clamp(28px, 5.5vw, 72px);
    padding-top: 24px;
    padding-bottom: 24px;
    background: linear-gradient(90deg, #ff7c34 0%, #ffa30b 100%);
}

.login-header h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(20px, 5vw, 56px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: clamp(0px, 0.15vw, 2px);
}




.login-input,
.password-wrapper,
.actions {
    width: min(100%, 760px);
}


.btn-login {
    width: clamp(150px, 22vw, 240px);
    height: clamp(52px, 7vw, 70px);
}





.login-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: clamp(22px, 3.4vw, 42px);
    padding:
        clamp(40px, 7vw, 82px) clamp(28px, 9vw, 112px) clamp(34px, 5vw, 64px);
}

.login-input {
    width: 100%;
    min-width: 0;
    height: clamp(58px, 8vw, 82px);
    border: 2px solid rgba(255, 255, 255, 0.86);
    border-radius: clamp(18px, 2.8vw, 28px);
    padding: 0 clamp(12px, 4vw, 44px);
    background: rgba(255, 255, 255, 0.72);
    color: #050505;
    font-size: clamp(12px, 3.5vw, 28px);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

.login-input::placeholder {
    color: #050505;
    opacity: 1;
}

.password-wrapper {
    position: relative;
}

.password-input {
    padding-right: clamp(76px, 9vw, 110px);
}


.eye-button {
    position: absolute;
    top: 50%;
    right: clamp(20px, 3.5vw, 34px);
    width: clamp(26px, 5vw, 46px);
    height: clamp(26px, 5vw, 46px);
    padding: 0;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eye-icon {
    display: inline-block;
    width: 24px;
    /* Ajusta el tamaño según necesites */
    height: 24px;

    /* Ruta a tu archivo en la carpeta Assets */
    background-color: #333;
    /* Color del icono */
    -webkit-mask-image: url('Assets/eye.svg');
    mask-image: url('Assets/eye.svg');

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* Efecto hover opcional */
.eye-button:hover .eye-icon {
    background-color: #007bff;
}


/* .eye-button {
    position: absolute;
    top: 50%;
    right: clamp(20px, 3.5vw, 34px);
    width: clamp(26px, 5vw, 46px);
    height: clamp(26px, 5vw, 46px);
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.eye-icon {
    position: relative;
    display: block;
    width: clamp(22px, 4.5vw, 42px);
    height: clamp(12px, 3vw, 26px);
    border: clamp(3px, 0.45vw, 4px) solid #050505;
    border-radius: 50%;
}

.eye-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(10px, 1.5vw, 13px);
    height: clamp(10px, 1.5vw, 13px);
    border: clamp(3px, 0.45vw, 4px) solid #050505;
    border-radius: 50%;
    transform: translate(-50%, -50%);
} */


.actions {
    padding-top: clamp(0px, 2vw, 18px);
    display: flex;
    padding-top: 16px;
    justify-content: flex-end;
}

.btn-login {
    width: min(100%, 220px);
    height: clamp(60px, 7vw, 80px);
    border: 0;
    border-radius: clamp(20px, 3vw, 30px);
    background: linear-gradient(90deg, #ff9c08 0%, #ff743b 100%);
    color: #fff;
    font-size: clamp(18px, 4vw, 28px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 1px;
    cursor: pointer;
    opacity: 1;
}

.btn-login:disabled {
    opacity: 0.6;
}

#error-message.show {
    display: block;
    background-color: #ff4444;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
}

#error-message.show.success {
    background-color: #4CAF50;
    /* Verde para éxito */
}


@media (max-width: 560px) {
    #native-input-container {
        width: 100vw;
        height: 100dvh;
        min-height: 100dvh;
        align-items: center;
        padding: 12px;
    }

    .login-popup {
        width: min(94vw, 420px);
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
        border-radius: 22px;
    }

    .login-header {
        justify-content: center;
        text-align: center;
        min-height: 58px;
        padding: 14px 16px;
    }

    .login-header h1 {
        font-size: clamp(18px, 7vw, 28px);
        line-height: 1.05;
    }

    .login-body {
        gap: 14px;
        padding: 18px 18px 16px;
    }

    .login-input {
        height: 46px;
        border-radius: 14px;
        font-size: 16px;
        padding: 0 16px;
    }

    .password-input {
        padding-right: 58px;
    }

    .eye-button {
        right: 16px;
        width: 30px;
        height: 30px;
    }

    .btn-login {
        width: 150px;
        height: 50px;
        border-radius: 16px;
        font-size: 20px;
    }
}

@media (max-width: 920px) and (orientation: landscape) {
    #native-input-container {
        height: 100dvh;
        min-height: 100dvh;
        padding: 8px;
    }

    .login-popup {
        width: min(72vw, 620px);
        max-height: calc(100dvh - 16px);
        overflow-y: auto;
        border-radius: 20px;
    }

    .login-header {
        min-height: 46px;
        padding: 10px 18px;
    }

    .login-header h1 {
        font-size: clamp(18px, 4vw, 26px);
    }

    .login-body {
        gap: 10px;
        padding: 14px 18px 12px;
    }

    .login-input {
        height: 42px;
        border-radius: 12px;
        font-size: 15px;
    }

    .btn-login {
        width: 138px;
        height: 42px;
        border-radius: 14px;
        font-size: 18px;
    }
}
