* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body.auth-body {
    background-color: #1c1230;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Keeps items at the top */
    min-height: 30vh;
    padding-top: 0;          /* CHANGED: Set to 0 to touch the top edge */
    padding-bottom: 20px;
}

.form-container {
    background-color: #2a1b4a;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    border: 1px solid #3c2f5f;
    overflow: hidden;
    margin-top: 0; /* CHANGED: Ensure no extra space above the form */
    /* Optional: If you want a tiny bit of breathing room, change 0 to 5px or 10px here */
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

p {
    font-size: 0.9rem;
    color: #d1c4e9;
    margin-bottom: 1.5rem;
}

p a {
    color: #bb86fc;
    text-decoration: none;
    font-weight: 500;
}

p a:hover {
    text-decoration: underline;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: none;
    border-radius: 8px;
    background-color: #3c2f5f;
    color: #ffffff;
    font-size: 1rem;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.4);
}

input::placeholder {
    color: #b0a8d1;
}

button {
    width: 100%;
    padding: 0.75rem;
    background-color: #bb86fc;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #9f4ce8;
    transform: translateY(-1px);
}

.password-container {
    position: relative;
    margin-bottom: 1rem;
}

.password-container input {
    margin-bottom: 0;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #bb86fc;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
    width: auto;
    padding: 0;
}

.toggle-password:hover {
    color: #ffffff;
    background-color: transparent;
}

.input-hint {
    font-size: 0.75rem;
    color: #b0a8d1;
    margin-top: -10px;
    margin-bottom: 15px;
    text-align: left;
    padding-left: 5px;
}

.back-link {
    font-size: 0.8rem;
    margin-top: 15px;
    display: block;
    color: #b0a8d1;
    text-decoration: none;
}

.back-link:hover {
    color: #ffffff;
}

.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.notification.error {
    background-color: #ff6b6b;
    color: #ffffff;
}

.notification.success {
    background-color: #00e676;
    color: #000;
    font-weight: 600;
}

#loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 18, 48, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    border: 4px solid #3c2f5f;
    border-top: 4px solid #bb86fc;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
