/* Root Variables */
:root {
    --primary: #43cea2;
    --secondary: #185a9d;
    --text: #2d3748;
    --text-light: #718096;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.15);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Auth Container */
.auth-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Glass Card Effect */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    padding: 40px;
    width: 100%;
    max-width: 450px; /* Slightly wider for better form layout */
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo Styling */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.logo svg {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.logo span {
    color: var(--secondary);
    font-weight: 800;
}

/* Form Styling */
.auth-form {
    display: flex;
    flex-direction: column;
    width: 100%; /* Ensure form takes full width of card */
}

.auth-form h2 {
    font-size: 22px;
    color: var(--text);
    text-align: center;
    margin-bottom: 25px;
}

.input-group {
    position: relative;
    margin-bottom: 30px;
}

.input-group input {
    width: 100%;
    padding: 15px 0;
    font-size: 16px;
    color: var(--text); /* Changed to text color for better visibility */
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3); /* Softer border */
    outline: none;
    background: transparent;
}

.input-group label {
    position: absolute;
    top: 15px;
    left: 0;
    font-size: 16px;
    color: var(--text-light); /* Lighter label color */
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label {
    top: -15px;
    font-size: 12px;
    color: var(--primary); /* Highlight label on focus/valid */
}

.underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.4s ease;
}

.input-group input:focus ~ .underline {
    width: 100%;
}

/* Button Styling */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    margin-top: 20px; /* Spacing below last input group */
}

.auth-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--white);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: all 0.3s ease;
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(67, 206, 162, 0.3);
}

.auth-btn:hover svg {
    transform: translateX(5px);
}

/* Auth Switch Link */
.auth-switch {
    margin-top: 25px;
    font-size: 14px;
    color: var(--text-light);
}

.auth-switch a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-switch a:hover {
    color: var(--primary);
}

/* Background Circles Animation */
.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.circles div {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: animate 25s linear infinite;
    bottom: -150px;
}

.circles div:nth-child(1) {
    width: 300px;
    height: 300px;
    left: 10%;
    animation-delay: 0s;
}

.circles div:nth-child(2) {
    width: 200px;
    height: 200px;
    left: 30%;
    animation-delay: 2s;
    animation-duration: 12s;
}

.circles div:nth-child(3) {
    width: 150px;
    height: 150px;
    left: 65%;
    animation-delay: 4s;
}

/* You had a circle-1, circle-2, circle-3 in your HTML, but only div:nth-child rules. Let's align them. */
.circles .circle-1 { left: 10%; }
.circles .circle-2 { left: 30%; animation-delay: 2s; animation-duration: 12s; }
.circles .circle-3 { left: 65%; animation-delay: 4s; }


@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .glass-card {
        margin: 20px;
        padding: 30px;
        max-width: 90%; /* Adjust max-width for smaller screens */
    }
    .auth-form h2 {
        font-size: 20px;
    }
    .input-group input,
    .input-group label {
        font-size: 14px;
    }
    .auth-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}