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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #0f172a;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none"><circle cx="10" cy="10" r="1" fill="%23e2e8f0" opacity="0.3"/><circle cx="90" cy="90" r="1" fill="%232563eb" opacity="0.2"/><circle cx="50" cy="25" r="0.5" fill="%23f59e0b" opacity="0.2"/><circle cx="25" cy="75" r="0.5" fill="%2322c55e" opacity="0.2"/></svg>') repeat;
    background-size: 100px 100px;
    z-index: -1;
    opacity: 0.4;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 10;
}

/* Auth Form */
.auth-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.3);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.auth-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 48%, rgba(37, 99, 235, 0.03) 50%, transparent 52%);
    opacity: 0.5;
}

/* Brand */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.brand-icon {
    width: 24px;
    height: 24px;
    color: #2563eb;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

/* Headers */
.auth-form h1 {
    text-align: center;
    color: #0f172a;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

.auth-form p {
    text-align: center;
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #0f172a;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: rgba(255, 255, 255, 0.95);
}


.form-group textarea {
    height: 80px;
    resize: vertical;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

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

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.auth-btn:hover .btn-icon {
    transform: translateX(2px);
}

/* Auth Link */
.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #64748b;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.auth-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Message Styles */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Multi-Step Form */
.step-container {
    position: relative;
    z-index: 1;
}

.step {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.step.active {
    display: block;
}

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

.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e2e8f0;
    position: relative;
    transition: all 0.3s ease;
}

.step-dot.active {
    background: #2563eb;
}

.step-dot.completed {
    background: #22c55e;
}

.step-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 1rem;
    height: 2px;
    background: #e2e8f0;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.step-dot:last-child::after {
    display: none;
}

.step-dot.completed::after {
    background: #22c55e;
}

.step-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.auth-btn.flex-1 {
    flex: 1;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    
    .auth-form {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .auth-form h1 {
        font-size: 1.5rem;
    }
    
    .step-actions {
        flex-direction: column;
    }
    
    .step-indicator {
        gap: 0.5rem;
    }
    
    .step-dot::after {
        width: 0.5rem;
    }
}

/* Tablet Responsive */
@media (min-width: 768px) {
    .auth-container {
        max-width: 520px;
    }
    
    .auth-form {
        padding: 3rem;
    }
    
    .auth-form h1 {
        font-size: 2rem;
    }
}

/* Desktop Responsive */
@media (min-width: 1024px) {
    .auth-container {
        max-width: 560px;
    }
    
    .auth-form {
        padding: 3.5rem;
    }
}