#overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
}

#pageContainer {
    display: none;
    position: fixed;
    top: 20px;
    right: 0;
    width: 600px;
    max-width: 100%;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    padding: 48px 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    background: #141414;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

#content {
    position: relative;
    margin: 0 auto;
    width: 100%;
}

#loginPanelClose {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 1px solid #777;
    border-radius: 50%;
    background: #242424;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

#BtnLogin.loading {
    cursor: wait;
    opacity: 0.85;
}

.login-panel-status {
    padding: 32px 20px 48px;
    text-align: center;
    color: #fff;
}

.login-panel-status p {
    color: #ccc;
}

.login-panel-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
    border: 3px solid #555;
    border-top-color: #ffff00;
    border-radius: 50%;
    animation: login-panel-spin 0.8s linear infinite;
}

@keyframes login-panel-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    #pageContainer {
        top: 0;
        width: 100%;
        max-height: 100dvh;
        border-radius: 0 0 18px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-panel-spinner { animation: none; }
}
