/* Import root variables from main styles */
@import url('styles.css');

/* Registration Page Specific Styles */

/* Registration Section */
.register-section {
    background: var(--gradient-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 4rem;
}

.register-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.register-content {
    background: var(--color-bg-primary);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 20px 40px var(--color-shadow-light);
    position: relative;
}

.register-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2rem;
    color: #000;
}

/* Registration Form */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-input {
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px var(--color-overlay-primary);
}

.form-input:invalid {
    border-color: #dc3545;
}

.form-input:valid {
    border-color: #28a745;
}

/* Checkbox Styling */
.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    background: #fff;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.checkbox-input:checked + .checkbox-custom::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-weight: bold;
    font-size: 12px;
}

.checkbox-text {
    flex: 1;
}

.form-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-link:hover {
    color: #7dd300;
    text-decoration: underline;
}

/* Register Button */
.register-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.register-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

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

/* Success Message */
.success-message {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #a0ff00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: #000;
    font-weight: bold;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 2rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 1rem;
}

.success-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.success-btn {
    display: inline-block;
    background: #a0ff00;
    color: #000;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.success-btn:hover {
    background: #7dd300;
    transform: translateY(-2px);
}

/* Form Validation Styles */
.form-input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-input.success {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-input.error + .error-message {
    display: block;
}

/* Loading State */
.register-btn.loading {
    background: #666;
    cursor: not-allowed;
    position: relative;
}

.register-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design for Registration Page */
@media (max-width: 768px) {
    .register-section {
        padding: 4rem 0 2rem;
    }
    
    .register-container {
        padding: 0 1rem;
    }
    
    .register-content {
        padding: 2rem;
    }
    
    .register-title {
        font-size: 2rem;
    }
    
    .form-input {
        padding: 0.875rem;
    }
    
    .register-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .register-content {
        padding: 1.5rem;
    }
    
    .register-title {
        font-size: 1.8rem;
    }
    
    .success-title {
        font-size: 1.5rem;
    }
    
    .success-description {
        font-size: 1rem;
    }
}

/* Form Animation */
.register-form {
    animation: slideInUp 0.6s ease-out;
}

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

/* Enhanced Focus States */
.form-input:focus,
.checkbox-input:focus + .checkbox-custom {
    outline: 2px solid #a0ff00;
    outline-offset: 2px;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.strength-weak { color: #dc3545; }
.strength-medium { color: #ffc107; }
.strength-strong { color: #28a745; }

/* Form Progress Indicator */
.form-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.progress-step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e9ecef;
    margin: 0 0.5rem;
    transition: background 0.3s ease;
}

.progress-step.active {
    background: #a0ff00;
}

.progress-step.completed {
    background: #28a745;
}

/* Enhanced Checkbox Hover */
.checkbox-label:hover .checkbox-custom {
    border-color: #a0ff00;
}

/* Form Field Icons */
.form-group {
    position: relative;
}

.form-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.2rem;
}

/* Success Animation */
.success-message {
    animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
