* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, hsl(208, 100%, 97%), hsl(221, 83%, 53%));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner-ring {
    width: 50px;
    height: 50px;
    border: 4px solid hsl(221, 83%, 53%);
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-text {
    color: hsl(221, 83%, 53%);
    font-size: 1.5rem;
    font-weight: 700;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, hsl(208, 100%, 97%), hsl(221, 83%, 53%));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
    padding: 40px;
    border: 1px solid hsl(214, 32%, 91%);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    color: hsl(221, 83%, 53%);
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.auth-header h2 {
    color: hsl(224, 71%, 4%);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.auth-header p {
    color: hsl(215, 16%, 47%);
    font-size: 16px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: hsl(224, 71%, 4%);
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid hsl(214, 32%, 91%);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: hsl(221, 83%, 53%);
    box-shadow: 0 0 0 3px hsla(221, 83%, 53%, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: hsl(215, 16%, 47%);
    font-size: 14px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: hsl(221, 83%, 53%);
}

.forgot-link, .terms-link {
    color: hsl(221, 83%, 53%);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-link:hover, .terms-link:hover {
    text-decoration: underline;
}

.auth-btn {
    background: linear-gradient(135deg, hsl(221, 83%, 53%), hsl(221, 83%, 45%));
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid hsl(214, 32%, 91%);
}

.auth-footer p {
    color: hsl(215, 16%, 47%);
    font-size: 14px;
    margin-bottom: 16px;
}

.auth-footer a {
    color: hsl(221, 83%, 53%);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.back-home {
    color: hsl(215, 16%, 47%) !important;
    font-size: 14px;
    font-weight: 400;
}

.success-message {
    background: hsl(120, 60%, 95%);
    color: hsl(120, 60%, 30%);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid hsl(120, 60%, 85%);
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

.error-message {
    background: hsl(0, 60%, 95%);
    color: hsl(0, 60%, 40%);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid hsl(0, 60%, 85%);
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 640px) {
    .auth-card {
        padding: 24px;
        margin: 0 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}