* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

@font-face {
    font-family: 'Roboto';
    src: url('../webfonts/Roboto-VariableFont_wdth,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-stretch: 75% 100%;
    font-style: normal;
}

body {
    height: 100vh;
    width: 100%;
    font-family: 'Roboto', sans-serif;
    font-variation-settings: 'wght' 800, 'wdth' 100;
    letter-spacing: 0.5px;
    line-height: 1.2;
    overflow: hidden;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

#bgCanvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.login-container {
    position: relative;
    background: rgba(10, 10, 10, 0.9);
    padding: 45px 35px;
    width: 100%;
    max-width: 400px;
    z-index: 1;
    backdrop-filter: blur(10px);
    text-align: center;
    overflow: hidden;
    border: 2px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.7), 0 0 40px rgba(118, 75, 162, 0.5);
    border-radius: 45px;
    border-bottom-left-radius: 30px;
    border-top-right-radius: 30px;
    transition: border-color 0.4s ease;
    backface-visibility: hidden;
    perspective: 1000px;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: conic-gradient(#4285F4, #EA4335, #FBBC05, #34A853, #4285F4);
    top: -50%;
    left: -50%;
    z-index: -2;
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: transform;
}

.login-container::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: #0a0a0a;
    z-index: -1;
    opacity: 0;
    border-radius: 90px;
    border-bottom-left-radius: 26px;
    border-top-right-radius: 26px;

    transition: opacity 0.5s ease;
}

.login-container.loading {
    border-color: transparent;
    box-shadow: 0 0 30px rgba(66, 133, 244, 0.4);
}

.login-container.loading::before {
    opacity: 1;
    animation: rotateGoogle 2s linear infinite;
    will-change: transform;
}

.login-container.loading::after {
    opacity: 1;
}

@keyframes rotateGoogle {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.login-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 20px;
    width: 100%;
}

.login-header .logo {
    width: 150px;
    max-width: 45%;
    height: auto;
    object-fit: contain;
}

.login-header .login-text {
    color: #66b2ff;
    text-shadow: 0 0 20px rgba(102, 178, 255, 0.5);
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    line-height: 1.2;
}

.input-icon {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}

.input-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #66b2ff;
    font-size: 16px;
    pointer-events: none;
    z-index: 2;
}

.input-icon input {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border-radius: 30px;
    border: 1px solid rgba(102, 126, 234, 0.5);
    border-left: 5px solid rgba(102, 126, 234, 0.5);
    border-right: 5px solid rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    will-change: transform;
}

.input-icon input:focus {
    border-color: #4285F4;
    box-shadow: 0 0 30px rgba(66, 133, 244, 0.3);
}

.input-icon #togglePassword {
    pointer-events: auto !important;
    transition: color 0.3s ease;
}

.input-icon input[name="password"] {
    padding-right: 45px; 
}

button {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    border: none;
    border-radius: 85px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
}

button.btn-loading {
    background: #333 !important;
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 480px) {
    .login-header {
        gap: 10px;
    }

    .login-header .logo {
        width: 100px;
    }

    .login-header .login-text {
        font-size: 12px;
    }

    .login-container {
        padding: 40px 25px;
    }
}

@media (max-height: 500px) {
    body {
        align-items: flex-start;
        overflow-y: auto;
        padding: 20px 0;
    }
}

* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

input,
textarea,
select {
    -webkit-user-select: text;
    user-select: text;
}