/* 🌟 General Page Setup */
html, body {
    height: 100vh;
    width: 100%;
    margin: 0 auto;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(#012A5E 0%, #00122D 10%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Prevents unnecessary scrolling */
}

/* 🌟 Background Overlay */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
}

/* 🌟 Chat Container (Fits Screen Without Scrolling) */
.chat-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 80%;
    text-align: center;
    position: relative;
    z-index: 2;
    height: 100vh; /* Ensures everything fits perfectly */
}

/* 🌟 Login Box (Always Visible) */
.login-box {
    margin-bottom: 1vh;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* 🌟 Login Button */
#loginButton {
    background: #00122D;
    color: white;
    padding: 12px 28px;
    font-size: 1vw;
    font-weight: bold;
    border-radius: 8px;
    border: 2px solid #011d42;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0px 4px 12px rgba(1, 42, 94, 0.3);
}

#loginButton:hover {
    background: #012f6b;
    border-color: #012A5E;
    box-shadow: 0px 6px 16px #012A5E;
    transform: scale(1.05);
}

#loginButton:active {
    transform: scale(0.98);
}

/* 🌟 Branding Section (Fully Visible & Compact) */
.branding {
    position: relative;
    background: linear-gradient(#012A5E 0%, #00122D 50%);
    width: 100%;
    padding: 1.5vw 0; /* Smaller padding */
    text-align: center;
    color: white;
    z-index: 10;
}

.branding .logo {
    width: 5vw;
    height: 5vw;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.2);
    margin-bottom: 0.5vw;
}

.branding h1 {
    font-size: 1vw; /* Adjusted for better fit */
    font-weight: 500;
    margin: 0;
}

.branding p {
    font-size: 0.75vw;
    font-weight: 300;
    opacity: 0.75;
}

/* 🌟 Chatbox (Fits in Screen Without Scrolling) */
.chat-box {
    width: 80%;
    height: 70vh; /* Ensures full visibility */
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 1.2s ease-out;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 🌟 WebChat (Scrolls Inside the Box, Not the Page) */
#webchat {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding-bottom: 10px;
}

/* 🌟 User Info Box */
.user-info {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #012A5E;
    color: white;
    padding: 10px 20px;
    font-size: 1vw;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0px 4px 10px rgba(1, 42, 94, 0.3);
    transition: all 0.3s ease-in-out;
    opacity: 1;
}

/* Hide User Info Initially */
.hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* 🌟 Animations */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(50px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 🌟 Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        width: 100vw;
        height: 100vh;
    }

    .chat-box {
        width: 95vw; /* Full width on mobile */
        height: 72vh; /* Adjusted for better visibility */
    }

    .login-box {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #loginButton {
        font-size: 4vw;
        padding: 10px 20px;
    }

    .branding {
        width: 100%;
        padding: 10px 0;
    }

    .branding h1 { font-size: 5vw; }
    .branding p { font-size: 3vw; }
    .branding .logo {
        width: 10vw;
        height: 10vw;
    }

    .user-info {
        bottom: 10px;
        left: 10px;
        font-size: 2vw;
    }
}
