:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --dark-bg: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    padding: 20px 0;
}

/* --- Star Background Animation --- */
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: animStar 150s linear infinite;
    will-change: transform;
    opacity: 0.8;
}

.star::after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
}

.star:nth-child(2n) {
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    animation-duration: 100s;
}

.star:nth-child(3n) {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    animation-duration: 200s;
}

@keyframes animStar {
    from {
        transform: translateY(0px);
    }

    to {
        transform: translateY(-2000px);
    }
}

/* --- Auth Card Container --- */
.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    z-index: 10;
}

.auth-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Header --- */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: inline-block;
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.5));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.auth-header h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Form --- */
.form-group {
    margin-bottom: 20px;
    position: relative;
    width: 100%;
    align-content: start;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 4px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* --- Divider --- */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    padding: 0 15px;
}

/* --- Google Button --- */
.btn-google {
    width: 100%;
    padding: 14px;
    background: white;
    color: #3c4043;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-google svg {
    flex-shrink: 0;
}

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* --- Footer --- */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

/* --- Register Page Specifics --- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.register-card {
    max-width: 500px;
    /* Slightly wider for register form */
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
        background: rgba(15, 23, 42, 0.95);
        /* Higher opacity, less reliance on blur */
        backdrop-filter: blur(5px);
        /* Reduced blur for performance */
        -webkit-backdrop-filter: blur(5px);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
        /* Reduced shadow spread */
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    #stars-container {
        contain: strict;
        /* Performance optimization */
    }
}