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

#container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(-45deg, #00fff7, #d359ef, #ed4caa, #007bff);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

#container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

.bar {
    width: 400px;
    max-width: 90%;
    min-height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                0 5px 15px rgba(0, 0, 0, 0.1),
                inset 0 0 1px rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    transform: translateY(0);
    animation: floatUp 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bar:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25),
                0 15px 25px rgba(0, 0, 0, 0.15),
                inset 0 0 2px rgba(255, 255, 255, 0.9);
}

.bar::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

.logo {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: scale(0);
    animation: scaleIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s forwards;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #d359ef, #007bff);
    color: white;
    font-size: 40px;
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.textcontainer {
    text-align: center;
    margin: 25px 0;
    transform: translateY(30px);
    opacity: 0;
    animation: slideUpFade 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.5s forwards;
}

.textcontainer h1 {
    font-size: 28px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #d359ef, #007bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(211, 89, 239, 0.2);
    position: relative;
    display: inline-block;
}

.textcontainer h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #d359ef, #007bff);
    border-radius: 2px;
    animation: expandWidth 1s ease 1s forwards;
}

.textcontainer p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.container2 {
    width: 100%;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(30px);
    opacity: 0;
    animation: slideUpFade 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.7s forwards;
}

.QR {
    width: 100%;
    text-align: center;
}

.QR h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.QR h2::before {
    content: '🔗';
    margin-right: 10px;
    animation: bounce 2s infinite;
}

.QR input {
    width: 80%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255,255,255,0.8);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.QR input:focus {
    outline: none;
    border-color: #d359ef;
    box-shadow: 0 0 0 3px rgba(211, 89, 239, 0.2),
                0 5px 15px rgba(0,0,0,0.1);
    transform: scale(1.02);
}

.QR input:hover {
    border-color: #c0c0c0;
}

.QR button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #d359ef, #ed4caa);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(211, 89, 239, 0.3);
    position: relative;
    overflow: hidden;
}

.QR button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.QR button:hover {
    background: linear-gradient(135deg, #ed4caa, #d359ef);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(211, 89, 239, 0.4);
}

.QR button:hover::before {
    left: 100%;
}

.QR button:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 3px 10px rgba(211, 89, 239, 0.4);
}

#qrpopup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3),
                inset 0 0 1px rgba(255, 255, 255, 0.8);
    text-align: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90%;
}

#qrpopup.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: popupAppear 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#qrpopup h2 {
    margin-bottom: 25px;
    font-size: 26px;
    background: linear-gradient(135deg, #d359ef, #007bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#qrpopup img {
    width: 180px;
    height: 180px;
    margin-bottom: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: qrPulse 2s ease-in-out infinite alternate;
    position: relative;
    left: 30%;
}

#Downloadbtn {
    background: linear-gradient(135deg, #007bff, #00a8ff);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
    position: relative;
    top: 25px;
    right: 25%;
    margin: 5px;
}

#Downloadbtn:hover {
    background: linear-gradient(135deg, #00a8ff, #007bff);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

#Closebtn {
    background: linear-gradient(135deg, #dc3545, #ff4757);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
    position: relative;
    top: 25px;
    right: 20%;
    margin: 5px;
}

#Closebtn:hover {
    background: linear-gradient(135deg, #ff4757, #dc3545);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.error-message {
    color: #ff4757;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.loading {
    display: none;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(211, 89, 239, 0.3);
    border-radius: 50%;
    border-top-color: #d359ef;
    animation: spin 1s ease-in-out infinite;
    margin: 20px auto;
}

/* Animations */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

@keyframes floatUp {
    0% { 
        transform: translateY(100px) scale(0.8);
        opacity: 0;
    }
    100% { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes slideUpFade {
    0% { 
        transform: translateY(30px);
        opacity: 0;
    }
    100% { 
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes expandWidth {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

@keyframes shimmer {
    0% { transform: rotate(45deg) translateX(-100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

@keyframes popupAppear {
    0% { 
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 0;
    }
    70% { 
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }
    100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes qrPulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    100% { 
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(211, 89, 239, 0.3);
    }
}

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

@media (max-width: 480px) {
    .bar {
        padding: 20px;
    }
    
    .logo {
        width: 120px;
        height: 120px;
        font-size: 30px;
    }
    
    .textcontainer h1 {
        font-size: 24px;
    }
    
    .QR input {
        width: 95%;
    }
    
    #qrpopup {
        padding: 25px;
    }
}
