* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:  "Indie Flower", cursive;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.nothing-you-could-do-regular {
    font-family: "Nothing You Could Do", cursive;
    font-weight: 400;
    font-style: normal;
}

.auth-container {
    min-height: 100vh;
    width: 100%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 40%, #e2e8f0 100%);
    
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.back-link {
    position: absolute;
    top: 2rem;
    left: 2rem;
    
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    
    padding: 0.75rem 1.25rem;
    
    background: white;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 1px 4px rgba(0, 0, 0, 0.03);
    
    transition: all 0.2s ease;
    
    z-index: 100;
}

.back-link:hover {
    background: rgba(248, 250, 252, 1);
    border-color: rgba(148, 163, 184, 0.25);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 2px 6px rgba(0, 0, 0, 0.04);
}

.back-link i {
    font-size: 0.85rem;
}

.auth-content {
    max-width: 480px;
    width: 100%;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    
    position: relative;
    z-index: 10;
    
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 4rem;
    font-weight: 400;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 1.15rem;
    color: #64748b;
    font-weight: 500;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    
    padding: 1rem 1.25rem;
    
    border-radius: 12px;
    
    font-size: 0.9rem;
    font-weight: 500;
    
    margin-bottom: 1.5rem;
}

.alert i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.form-label i {
    color: #64748b;
    font-size: 0.85rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    
    font-size: 0.95rem;
    font-family: inherit;
    
    border: 1.5px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    
    background: white;
    color: #0f172a;
    
    outline: none;
    
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.08),
        0 4px 12px rgba(59, 130, 246, 0.08);
    transform: translateY(-1px);
}

.password-input-wrapper {
    position: relative;
}

.password-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    
    width: 36px;
    height: 36px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    background: transparent;
    border: none;
    border-radius: 8px;
    
    color: #64748b;
    cursor: pointer;
    
    transition: all 0.2s ease;
}

.password-toggle:hover {
    background: rgba(148, 163, 184, 0.1);
    color: #475569;
}

.password-toggle i {
    font-size: 1rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    margin-top: -0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    
    border: 1.5px solid rgba(148, 163, 184, 0.3);
    border-radius: 4px;
    
    cursor: pointer;
    
    accent-color: #3b82f6;
}

.forgot-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
    
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.btn-auth {
    width: 100%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    
    padding: 1rem 2rem;
    
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    
    border-radius: 12px;
    border: none;
    
    cursor: pointer;
    
    transition: all 0.2s ease;
    
    margin-top: 0.5rem;
}

.btn-primary-auth {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    
    box-shadow: 
        0 4px 16px rgba(59, 130, 246, 0.3),
        0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-primary-auth:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(59, 130, 246, 0.35),
        0 3px 10px rgba(59, 130, 246, 0.25);
}

.btn-primary-auth:active {
    transform: translateY(0);
}

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    
    text-align: center;
}

.auth-footer p {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.auth-link {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #2563eb;
    text-decoration: none;
}

.error-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    
    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    
    /* Backdrop */
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    
    transition: opacity 0.2s ease;
}
 
.error-modal-container.active {
    opacity: 1;
    pointer-events: auto;
}
 
.error-modal {
    background: white;
    border-radius: 16px;
    
    max-width: 400px;
    width: 100%;
    
    padding: 2rem;
    
    position: relative;
    
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1);
    
    /* Start slightly scaled down */
    transform: scale(0.95);
    transition: transform 0.2s ease;
}
 
.error-modal-container.active .error-modal {
    transform: scale(1);
}
 
.error-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}
 
.error-modal-content i {
    font-size: 3rem;
    color: #ef4444;
}
 
.error-modal-content p {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}
 
.error-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    
    width: 32px;
    height: 32px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    background: rgba(148, 163, 184, 0.1);
    border: none;
    border-radius: 8px;
    
    color: #64748b;
    cursor: pointer;
    
    transition: all 0.2s ease;
}
 
.error-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
 
.error-modal-close i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .auth-container {
        padding: 1.5rem;
    }
    
    .back-link {
        top: 1.5rem;
        left: 1.5rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-title {
        font-size: 3rem;
    }
    
    .auth-subtitle {
        font-size: 1rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }
    
    .back-link {
        top: 1rem;
        left: 1rem;
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
    
    .auth-card {
        padding: 1.5rem 1.25rem;
    }
    
    .auth-title {
        font-size: 2.5rem;
    }
    
    .auth-subtitle {
        font-size: 0.95rem;
    }

    .error-modal {
        padding: 1.5rem;
    }
    
    .error-modal-content i {
        font-size: 2.5rem;
    }
    
    .error-modal-content p {
        font-size: 0.95rem;
    }
}

.btn-auth:focus-visible,
.form-input:focus-visible,
.back-link:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}