:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* Main wrapper - Centers content perfectly */
.register-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem;
    overflow-y: auto;
}

/* Animated background effect */
.register-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Container with max width */
.register-container {
    width: 100%;
    max-width: 500px;
    margin: auto;
    position: relative;
    z-index: 1;
}

/* Main card */
.register-card {
    background: white;
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.register-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
}

/* Header section */
.register-header {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.register-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

.register-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: white;
    position: relative;
    z-index: 1;
}

.register-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Body section */
.register-body {
    padding: 2rem;
}

/* Form styles */
.register-form .form-group {
    margin-bottom: 1.5rem;
}

/* Floating input wrapper */
.register-form .form-floating {
    position: relative;
}

.register-form .form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.75rem 1rem;
    color: #6b7280;
    transition: all 0.25s ease;
    pointer-events: none;
    transform-origin: 0 0;
}

.register-form .form-floating > label i {
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

.register-form .form-floating > input,
.register-form .form-floating > select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.25s ease;
    background: white;
}

.register-form .form-floating > select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.register-form .form-floating > input:focus,
.register-form .form-floating > select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.register-form .form-floating > input:focus + label,
.register-form .form-floating > select:focus + label {
    color: #4f46e5;
}

.register-form .form-floating > input:not(:placeholder-shown),
.register-form .form-floating > select:not([value=""]) {
    padding-top: 1.25rem;
    padding-bottom: 0.25rem;
}

.register-form .form-floating > input:not(:placeholder-shown) + label,
.register-form .form-floating > select:not([value=""]) + label {
    transform: scale(0.85) translateY(-0.5rem);
}

/* For select element initial state */
.register-form .form-floating > select:invalid {
    color: #6b7280;
}

.register-form .form-floating > select:valid {
    color: #1f2937;
}

.register-form .form-floating > input.is-invalid,
.register-form .form-floating > select.is-invalid {
    border-color: #ef4444;
}

.register-form .form-floating > input.is-invalid:focus,
.register-form .form-floating > select.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Password toggle button */
.register-form .password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.15s ease;
    z-index: 10;
}

.register-form .password-toggle:hover {
    color: #4b5563;
}

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

/* Error message */
.register-form .error-message {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #ef4444;
}

.register-form .error-message i {
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

/* Register button */
.register-button {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.register-button::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;
}

.register-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
}

.register-button:hover::before {
    left: 100%;
}

.register-button:active {
    transform: translateY(0);
}

.register-button i {
    font-size: 1rem;
    transition: transform 0.15s ease;
}

.register-button:hover i {
    transform: translateX(4px);
}

/* Footer section */
.register-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.register-footer .login-text {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.register-footer .login-text .login-link {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.register-footer .login-text .login-link:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* Success message styling */
.success-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    background-color: #10b981;
    color: white;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    animation: slideDown 0.3s ease;
}

.success-message i {
    font-size: 1rem;
}

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

/* Animations */
@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .register-container {
        max-width: 100%;
    }
    
    .register-body {
        padding: 1.5rem;
    }
    
    .register-header {
        padding: 1.5rem;
    }
    
    .register-title {
        font-size: 1.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .register-card {
        background: #1f2937;
    }
    
    .register-body {
        background: #1f2937;
    }
    
    .register-form .form-floating > input,
    .register-form .form-floating > select {
        background: #374151;
        border-color: #4b5563;
        color: white;
    }
    
    .register-form .form-floating > select {
        color: white;
    }
    
    .register-form .form-floating > select option {
        background: #374151;
        color: white;
    }
    
    .register-form .form-floating > input:focus,
    .register-form .form-floating > select:focus {
        border-color: #4f46e5;
    }
    
    .register-form .form-floating > label {
        color: #9ca3af;
    }
    
    .register-footer {
        border-top-color: #4b5563;
    }
    
    .register-footer .login-text {
        color: #9ca3af;
    }
}