:root {
    --primary: #25D366;
    --secondary: #128C7E;
    --dark: #075E54;
    --light: #DCF8C6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
    overflow: hidden;
}

.chat-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.chat-bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    animation: float 15s linear infinite;
    opacity: 0.3;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) scale(1.2);
        opacity: 0;
    }
}

.auth-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 90%; /* Adjust to 90% of the screen width */
    max-width: 400px; /* Keep the max-width to avoid becoming too large on big screens */
    position: relative;
    z-index: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

/* Header */
.auth-header {
    background: var(--secondary);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.auth-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

/* Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
}

.auth-tab.active {
    color: var(--secondary);
    border-bottom: 2px solid var(--secondary);
}

/* Form */
.auth-form {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #eee;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    border-color: var(--secondary);
    outline: none;
}

.auth-button {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.auth-button:hover {
    background: var(--secondary);
}

.forgot-password {
    text-align: center;
    margin-top: 1rem;
}

.forgot-password a {
    color: var(--secondary);
    text-decoration: none;
}

.register-form {
    display: none;
}

.form-error {
    color: #ff4444;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Back Button */
.back-button-container {
    text-align: left;
    margin-bottom: 10px;
    margin-left: 10px;
    margin-top: 5px;
}

.back-button {
    background-color: #25d366;
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.back-button:hover {
    background-color: #1c9c51;
}

/* Responsiveness for smaller screens */
@media (max-width: 600px) {
    .auth-container {
        width: 95%; /* Make it more fluid on mobile */
        padding: 1rem;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .auth-tabs {
        flex-direction: column;
    }

    .auth-tab {
        padding: 0.8rem;
    }

    .auth-form {
        padding: 1rem;
    }

    .form-input, .auth-button {
        padding: 0.8rem;
    }

    .auth-button {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .auth-header h1 {
        font-size: 1.2rem;
    }

    .auth-button {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .back-button {
        padding: 6px 12px;
    }
}
