@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(315deg, hsla(303, 42%, 44%, 1) 38%, hsla(289, 90%, 20%, 1) 80%);
}

/* Glass Container */

.container {
    width: 420px;
    padding: 35px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    text-align: center;
    color: #f5e9ff;
    transition: 0.3s ease;
}

.container:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

/* Heading */

.container p {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
    opacity: 0.9;
}

/* Input */

.container input {
    width: 100%;
    height: 52px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    padding: 0 14px;
    font-size: 15px;
    color: #fff;
    outline: none;
    margin: 12px 0 22px;
    transition: 0.25s ease;
}

.container input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.container input:focus {
    border-color: #c084fc;
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.25);
    background: rgba(255, 255, 255, 0.12);
}

/* Button */

.container button {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #c084fc, #7c3aed);
    color: white;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.45);
}

.container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(124, 58, 237, 0.6);
}

.container button:active {
    transform: scale(0.97);
}

/* QR Image Box */

#imgBox {
    width: 210px;
    margin: 0 auto;
    border-radius: 12px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.6s ease;
}

#imgBox img {
    width: 100%;
    padding: 14px;
    background: white;
    border-radius: 12px;
}

/* Show QR */

#imgBox.show-img {
    max-height: 320px;
    margin: 15px auto 20px;
    animation: fadeIn 0.6s ease;
}

/* Error shake */

.error {
    animation: shake 0.1s linear 8;
}

/* Animations */

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    50% {
        transform: translateX(0);
    }

    75% {
        transform: translateX(3px);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile */

@media (max-width: 460px) {

    .container {
        width: 92%;
        padding: 25px;
    }
}