body {
    background-image: radial-gradient(circle, rgba(160, 174, 192, 0.2) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center center;
}

.loading {
    position: relative;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 5;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #666;
    animation: spinner 0.8s linear infinite;
    z-index: 10;
}

@keyframes spinner {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.login-container {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(20px) rotate(-5deg); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-15px, 10px) rotate(5deg); }
}

.qr-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.qr-box {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.qr-box img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.qr-box img:hover {
    transform: scale(1.05);
}

.qr-refresh-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    color: white;
}

.qr-box:hover .qr-refresh-overlay {
    opacity: 1;
}

.qr-refresh-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.qr-refresh-text {
    font-size: 0.9rem;
}

.qr-scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, #4285F4, transparent);
    box-shadow: 0 0 8px #4285F4;
    animation: scan 4s linear infinite;
}

@keyframes scan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

.qr-status {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #555;
}

.status-icon {
    font-size: 1.2rem;
    margin-right: 10px;
    color: #4285F4;
}

.status-text {
    font-size: 0.9rem;
}

.loading-dots {
    animation: dots 1.5s infinite;
    display: inline-block;
    min-width: 20px;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.footer-link {
    color: #4285F4;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #2B68CA;
    text-decoration: underline;
}

.footer-divider {
    color: #ccc;
    margin: 0 8px;
}

@media (max-width: 576px) {
    .qr-container {
        width: 180px;
        height: 180px;
    }

    .login-card {
        margin: 0 15px;
    }
}

#loginload {
    display: inline-block;
}

#qrcodeimg {
    width: 180px;
    height: 180px;
    object-fit: contain;
}

#login[data-lock="true"] {
    background: rgba(52, 168, 83, 0.1);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-card {
    animation: fadeIn 0.5s ease-out forwards;
}

.type-logo {
    width: 18px;
    margin-top: -2px;
    padding-right: 4px;
}