/* Beautiful Registration Form - Enhanced Version */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated background elements */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
    z-index: 0;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.7;
    }
    50% { 
        transform: translateY(-20px) rotate(2deg); 
        opacity: 1;
    }
}

/* Floating particles */
body::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.3), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: sparkle 15s linear infinite;
    z-index: 0;
}

@keyframes sparkle {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-200px); }
}

.registration-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.registration-form {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    border-radius: 32px;
    padding: 48px;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Subtle inner glow */
.registration-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.5), transparent);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.registration-form h1 {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.registration-form p {
    color: #64748b;
    text-align: center;
    margin-bottom: 40px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

#register-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.form-group input {
    width: 100%;
    padding: 18px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.8);
    color: #1e293b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    backdrop-filter: blur(10px);
}

.form-group input::placeholder {
    color: #94a3b8;
    transition: opacity 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
}

.form-group input:focus::placeholder {
    opacity: 0.7;
}

.form-group input:focus + label {
    color: #667eea;
}

/* Enhanced error styling */
.error-messages {
    margin-top: 12px;
    animation: slideInError 0.3s ease-out;
}

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

.error {
    display: flex;
    align-items: center;
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    padding: 12px 16px;
    border-radius: 12px;
    border-left: 4px solid #ef4444;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.error::before {
    content: '⚠';
    margin-right: 8px;
    font-size: 16px;
}

.form-errors {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 28px;
    color: #dc2626;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
    animation: slideInError 0.3s ease-out;
}

.submit-btn {
    width: 100%;
    padding: 20px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn::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.6s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.submit-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.login-link {
    text-align: center;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
    position: relative;
}

.login-link::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1px;
}

.login-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    position: relative;
}

.login-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.login-link a:hover::after {
    width: 100%;
}

.login-link a:hover {
    color: #764ba2;
    transform: translateY(-1px);
}

/* Enhanced responsive design */
@media (max-width: 640px) {
    body {
        padding: 16px;
    }
    
    .registration-form {
        padding: 36px 28px;
        border-radius: 24px;
    }
    
    .registration-form h1 {
        font-size: 32px;
    }
    
    .form-group input {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .submit-btn {
        padding: 18px 28px;
        font-size: 16px;
    }
    
    #register-form {
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .registration-form {
        padding: 32px 24px;
        border-radius: 20px;
    }
    
    .registration-form h1 {
        font-size: 28px;
    }
    
    .registration-form p {
        font-size: 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }
    
    .registration-form {
        background: rgba(30, 41, 59, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .registration-form h1 {
        background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .registration-form p {
        color: #94a3b8;
    }
    
    .form-group label {
        color: #e2e8f0;
    }
    
    .form-group input {
        background: rgba(51, 65, 85, 0.8);
        border-color: #475569;
        color: #f1f5f9;
    }
    
    .form-group input:focus {
        border-color: #818cf8;
        box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.1);
        background: rgba(51, 65, 85, 0.9);
    }
    
    .login-link {
        border-top-color: #475569;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    body::before,
    body::after {
        animation: none;
    }
}

/* Focus visible for better keyboard navigation */
.form-group input:focus-visible,
.submit-btn:focus-visible,
.login-link a:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}