/* Reset */
* {
    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(-45deg, #a5d6a7, #2ecc71, #27ae60, #145a32);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Form Container - Glassmorphism */
.container {
    width: 90%;
    max-width: 420px;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.form-box {
    padding: 40px;
    position: relative;
    min-height: 450px;
}

/* Forms */
.form {
    display: none;
    flex-direction: column;
    transition: 0.5s;
}

.form.active {
    display: flex;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.error-msg {
    color: #ff6b6b;
    font-size: 14px;
    text-align: center;
    margin-bottom: 10px;
    min-height: 20px; /* Prevent jump when error appears */
    font-weight: 500;
}

.form input {
    padding: 14px 20px;
    margin: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    outline: none;
    width: 100%;
    color: #fff;
    font-size: 15px;
    transition: 0.3s ease;
}

.form input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.form input:focus {
    background: rgba(255, 255, 255, 0.3);
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.form button[type="submit"] {
    padding: 14px;
    margin-top: 15px;
    border: none;
    border-radius: 30px;
    background: #fff;
    color: #27ae60;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.form button[type="submit"]:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.divider span {
    padding: 0 10px;
    font-weight: 500;
}

/* Google Button */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 30px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
}

.google-btn img {
    width: 20px;
    margin-right: 10px;
}

.google-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Toggle text */
.toggle-text {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

.toggle-text span {
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    margin-left: 5px;
    transition: 0.3s;
}

.toggle-text span:hover {
    text-decoration: underline;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}


/* this is for the home.html */
/* Reset */
/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* App Layout */
.app {
    display: flex;
    height: 100vh;
    background: #f0f0f0;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: #fff;
    border-right: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #25D366;
    color: #fff;
}

.sidebar-header h2 {
    font-size: 20px;
}

.icons button {
    background: none;
    border: none;
    font-size: 18px;
    color: #fff;
    margin-left: 10px;
    cursor: pointer;
}

.search-bar {
    padding: 10px 20px;
    border-bottom: 1px solid #ccc;
}

.search-bar input {
    width: 100%;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #ccc;
    outline: none;
}

.contacts {
    list-style: none;
    overflow-y: auto;
    flex: 1;
}

.contact {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    transition: 0.3s;
}

.contact:hover {
    background: #f5f5f5;
}

.contact img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.contact-info {
    margin-left: 15px;
}

.contact-info h4 {
    font-size: 16px;
    color: #333;
}

.contact-info p {
    font-size: 14px;
    color: #666;
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #e5ddd5;
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f0f0f0;
    border-bottom: 1px solid #ccc;
}

.chat-header img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 15px;
}

.chat-header h3 {
    font-size: 18px;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.message {
    max-width: 60%;
    padding: 10px 15px;
    margin-bottom: 12px;
    border-radius: 10px;
    position: relative;
    word-wrap: break-word;
}

.message.sent {
    background: #25D366;
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.message.received {
    background: #fff;
    color: #333;
    border-bottom-left-radius: 0;
}

.message .time {
    font-size: 10px;
    color: #555;
    position: absolute;
    bottom: 5px;
    right: 10px;
}

/* Chat Input */
.chat-input {
    display: flex;
    padding: 10px 20px;
    border-top: 1px solid #ccc;
    background: #f0f0f0;
}

.chat-input input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 25px;
    border: 1px solid #ccc;
    outline: none;
}

.chat-input button {
    background: #25D366;
    color: #fff;
    border: none;
    padding: 0 20px;
    margin-left: 10px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

/* Responsive Media Queries */
@media screen and (max-width: 900px) {
    .sidebar {
        position: absolute;
        left: -320px;
        top: 0;
        height: 100%;
    }

    .sidebar.show {
        transform: translateX(320px);
    }

    .chat-area {
        flex: 1;
        width: 100%;
    }

    .chat-header {
        justify-content: space-between;
    }
}

@media screen and (max-width: 600px) {
    .chat-header h3 {
        font-size: 16px;
    }

    .contact-info h4 {
        font-size: 14px;
    }

    .contact-info p {
        font-size: 12px;
    }

    .chat-input input {
        padding: 10px 12px;
    }

    .chat-input button {
        padding: 0 16px;
        font-size: 16px;
    }
}

/* this is the home.html */
