@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #4CAF50; /* Green theme */
    --primary-hover-color: #45a049;
    --background-gradient-start: #e0f2f1;
    --background-gradient-end: #bbdefb;
    --card-background: rgba(255, 255, 255, 0.9);
    --text-color: #333333;
    --text-light-color: #666666;
    --border-color: #e0e0e0;
    --input-background: #ffffff;
    --error-color: #D32F2F;
    --success-color: #4CAF50;
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgb(219, 238, 219) 0%, rgb(239, 250, 239) 90%);
    position: relative;
    overflow: hidden;
}

/* The soft color blobs */
body::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.4) 0%, rgba(76, 175, 80, 0) 70%);
    top: -150px;
    left: -150px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
}

body::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(129, 199, 132, 0.3) 0%, rgba(129, 199, 132, 0) 70%);
    bottom: -100px;
    right: -100px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
}

.auth-container {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(76, 175, 80, 0.1);
    padding: 40px 40px; /* Reduced top padding slightly for tabs */
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: fadeInScale 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- NEW: TAB STYLES --- */
.login-tabs {
    display: flex;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 600;
    color: var(--text-light-color);
    transition: all 0.2s ease;
}

.tab-btn.active {
    background-color: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tab-btn:hover:not(.active) {
    color: var(--text-color);
}

/* Hide forms by default, show only active one */
.login-form-wrapper {
    display: none;
    animation: fadeIn 0.3s ease;
}

.login-form-wrapper.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
/* --- END TAB STYLES --- */

.auth-header {
    margin-bottom: 35px;
}

.auth-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    font-family: var(--font-family);
}

.auth-header p {
    font-size: 0.95rem;
    color: var(--text-light-color);
    line-height: 1.5;
    margin: 0;
    font-family: var(--font-family);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    font-family: var(--font-family);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15);
}

.form-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
    font-family: var(--font-family);
}

.checkbox-group {
    display: flex;
    align-items: center;
    color: var(--text-light-color);
    cursor: pointer;
    user-select: none;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    padding: 16px 0;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    background: linear-gradient(135deg, #4CAF50 0%, #43a047 100%);
    color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}

.auth-footer {
    margin-top: 30px;
    font-size: 0.9rem;
    color: var(--text-light-color);
    font-family: var(--font-family);
}

.auth-footer a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.form-message {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    font-family: var(--font-family);
    display: none; 
}

.form-error {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.form-success {
    background-color: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.form-message:not(:empty) {
    display: block;
}

.top-header-link {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-family);
    transition: color 0.2s;
}

.top-header-link:hover {
    color: var(--primary-color);
}