/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Background */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(135deg, #00bfa5, #00897b);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Login/Register Card */
.auth-container {
    width: auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0px 4px 25px rgba(0,0,0,0.15);
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

/* Inputs */
.auth-container input[type="text"],
.auth-container input[type="password"],
.auth-container input[type="email"] {
    width: 100%;
    padding: 12px;
    margin: 8px 0 15px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    font-size: 15px;
    transition: 0.3s;
}

.auth-container input:focus {
    border-color: #00897b;
    box-shadow: 0 0 4px rgba(0,150,136,0.3);
}

/* Button */
.auth-container button {
    width: 100%;
    padding: 12px;
    background: #00897b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.auth-container button:hover {
    background: #00695c;
}

/* Links */
.auth-container p {
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
}

.auth-container a {
    color: #00695c;
    font-weight: bold;
    text-decoration: none;
}

.auth-container a:hover {
    text-decoration: underline;
}

/* Error Message */
.error {
    color: #d32f2f;
    background: #ffebee;
    padding: 8px;
    border-left: 4px solid #c62828;
    margin-bottom: 10px;
    border-radius: 5px;

}



/* ----------------------------- */
/* MOBILE RESPONSIVE MODE */
/* ----------------------------- */

@media (max-width: 768px) {

    /* Stack layout vertically */
    .wrap {
        flex-direction: column;
    }

    /* User list converts to full-width panel */
    .users {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .chat {
        height: calc(100vh - 250px);
    }

    .messages {
        padding: 15px;
    }

    .message {
        max-width: 90%;
        font-size: 13px;
    }

    .composer input {
        font-size: 13px;
    }

    .composer button {
        padding: 9px 15px;
        font-size: 13px;
    }
}

/* ----------------------------- */
/* MOBILE SMALL SCREENS (Phones) */
/* ----------------------------- */
@media (max-width: 480px) {

    /* Make user list collapsible-like */
    .users {
        height: 160px;
        padding: 10px;
    }

    .users h3 {
        font-size: 16px;
    }

    .users .user {
        padding: 10px;
        font-size: 14px;
    }

    .chat-header {
        font-size: 16px;
        padding: 12px;
    }

    .messages {
        padding: 12px;
    }

    .message {
        max-width: 95%;
        font-size: 13px;
    }

    .composer {
        padding: 10px;
        gap: 7px;
    }
}
</style>
