/* Register Page Styles */

/* User Type Selector */
.user-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.user-type-option {
    cursor: pointer;
    position: relative;
}

.user-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.user-type-card {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #287887 0%, #205172 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.user-type-option input[type="radio"]:checked + .user-type-card {
    border-color: #287887;
    background: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.user-type-option input[type="radio"]:checked + .user-type-card::before {
    transform: scaleX(1);
}

.user-type-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.user-type-card h3 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.user-type-card p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

/* Form Rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    border-radius: 2px;
    background: #e1e5e9;
    overflow: hidden;
    position: relative;
}

.password-strength::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength.weak::before {
    width: 25%;
    background: #dc3545;
}

.password-strength.fair::before {
    width: 50%;
    background: #ffc107;
}

.password-strength.good::before {
    width: 75%;
    background: #17a2b8;
}

.password-strength.strong::before {
    width: 100%;
    background: #28a745;
}

/* Conditional Fields */
.teacher-fields,
.student-fields {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Checkbox Styling */
.checkbox-group {
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    position: relative;
    padding-left: 35px;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 0;
    height: 20px;
    width: 20px;
    background-color: white;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-label:hover input ~ .checkmark {
    border-color: #287887;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #287887;
    border-color: #287887;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Form Validation Styles */
.form-group.error input {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group.success input {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.form-group .error-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-group .success-message {
    color: #28a745;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Loading State */
.btn-loading {
    position: relative;
    color: transparent;
}

.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 white;
    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 */
@media (max-width: 768px) {
    .user-type-selector {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .teacher-fields,
    .student-fields {
        padding: 1rem;
    }
    
    .user-type-card {
        padding: 1rem;
    }
    
    .user-type-icon {
        font-size: 2.5rem;
    }
    
    .user-type-card h3 {
        font-size: 1.1rem;
    }
    
    .user-type-card p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .user-type-card {
        padding: 0.75rem;
    }
    
    .user-type-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .user-type-card h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .user-type-card p {
        font-size: 0.8rem;
    }
}

/* Hover Effects */
.user-type-option:hover .user-type-card {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.user-type-option:hover input[type="radio"]:not(:checked) + .user-type-card {
    border-color: #287887;
    background: white;
}

/* Focus States */
.user-type-option input[type="radio"]:focus + .user-type-card {
    outline: 2px solid #287887;
    outline-offset: 2px;
}

/* Success Animation */
.auth-card.success {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Error Shake Animation */
.auth-card.error {
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
} 