:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --background-light: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

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"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    background-size: 50px 50px;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

.auth-container {
    width: 100%;
    max-width: 420px;
    margin: 2rem auto;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.6s ease-out;
    transform-origin: center bottom;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-header {
    padding: 3rem 2.5rem 2rem;
    text-align: center;
    position: relative;
}

.auth-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 2px;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: var(--shadow-lg);
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.auth-body {
    padding: 0 2.5rem 2.5rem;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.form-group {
    margin-bottom: 1.75rem;
    position: relative;
    animation: fadeInUp 0.6s ease-out both;
}

.form-group:nth-child(2) { animation-delay: 0.9s; }
.form-group:nth-child(3) { animation-delay: 1.0s; }
.form-group:nth-child(4) { animation-delay: 1.1s; }
.form-group:nth-child(5) { animation-delay: 1.2s; }

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: block;
    letter-spacing: 0.025em;
}

.input-group {
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
    overflow: hidden;
}

.input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.input-group-text {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.input-group:focus-within .input-group-text {
    color: var(--primary-color);
}

.form-control {
    border: none;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    background: transparent;
    color: var(--text-primary);
    line-height: 1.5;
    font-weight: 500;
}

.form-control::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-control:focus {
    box-shadow: none;
    outline: none;
}

.toggle-password {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 0 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.toggle-password:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.025em;
    box-shadow: var(--shadow-md);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #3730a3 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.auth-footer {
    padding: 2rem 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.8) 100%);
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease-out 1.3s both;
}

.auth-footer p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}

.auth-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.auth-footer a:hover::after {
    width: 100%;
}

.auth-footer a:hover {
    color: var(--primary-hover);
}

.alert-danger {
    font-size: 0.875rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.75rem;
    border: none;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

/* Loading state */
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover {
    transform: none;
    box-shadow: var(--shadow-md);
}

/* Responsive design */
@media (max-width: 576px) {
    body {
        padding: 15px;
    }
    
    .auth-container {
        margin: 1rem auto;
        max-width: 100%;
    }
    
    .auth-header {
        padding: 2.5rem 2rem 1.5rem;
    }
    
    .auth-header h2 {
        font-size: 1.75rem;
    }
    
    .auth-body, .auth-footer {
        padding: 0 2rem 2rem;
    }
    
    .auth-footer {
        padding: 1.5rem 2rem;
    }
    
    .input-group-text,
    .form-control {
        padding: 0.875rem 1rem;
    }
    
    .btn-primary {
        padding: 0.875rem 1.5rem;
    }
}

@media (max-width: 400px) {
    .auth-header,
    .auth-body,
    .auth-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
} 