/* Register Page - Combined Design Styles */

/* Tech Pattern Background - Exact Login Page Implementation */
.tech-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.01;
    background-image: linear-gradient(45deg, #764ba2 25%, transparent 25%),
        linear-gradient(-45deg, #764ba2 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #764ba2 75%),
        linear-gradient(-45deg, transparent 75%, #764ba2 75%);
    background-size: 60px 60px;
    background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
    animation: movePattern 30s linear infinite;
}

@keyframes movePattern {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(60px) translateY(60px);
    }
}

/* Body Background for Register Page */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding-top: 80px;
}

/* Floating Elements - Exact Login Page Implementation */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-shape {
    position: absolute;
    opacity: 0.05;
    animation: float 20s infinite ease-in-out;
}

.floating-shape:nth-child(1) {
    width: 100px;
    height: 100px;
    background: #764ba2;
    border-radius: 50%;
    top: 10%;
    left: 10%;
    animation-duration: 25s;
}

.floating-shape:nth-child(2) {
    width: 80px;
    height: 80px;
    background: #06b6d4;
    border-radius: 0.75rem;
    top: 60%;
    right: 10%;
    animation-duration: 30s;
    animation-delay: -5s;
}

.floating-shape:nth-child(3) {
    width: 60px;
    height: 60px;
    background: #f59e0b;
    border-radius: 50%;
    top: 80%;
    left: 20%;
    animation-duration: 20s;
    animation-delay: -10s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Body and Layout */
body {
    font-family: 'Poppins', sans-serif;
    background: transparent;
    min-height: 100vh;
    padding-top: 80px;
}

.register-container {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    color: #333 !important;
}

/* Card Design */
.register-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Styling */
.register-header {
    text-align: center;
    margin-bottom: 30px;
}

.feature-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.register-header h2 {
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.register-header p {
    color: #666;
    margin: 0;
}

/* User Type Selection (Keep the new design) */
.user-type-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.user-type-option {
    flex: 1;
    padding: 20px 15px;
    border: 1px solid #e1e5e9;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.user-type-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.user-type-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.user-type-option:hover::before {
    left: 0;
}

.user-type-option:hover * {
    color: white !important;
}

.user-type-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.user-type-option.selected * {
    color: white !important;
}

.user-type-option i {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
    color: #667eea;
    transition: color 0.3s ease;
}

.user-type-option .fw-semibold {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
    transition: color 0.3s ease;
}

.user-type-option small {
    color: #666;
    transition: color 0.3s ease;
}

/* Form Styling */
.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-label i {
    color: #667eea;
    width: 20px;
}

.form-control,
.form-select {
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    background-color: #fff;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    font-size: 12px;
    color: #dc3545;
    margin-top: 5px;
}

/* Password Requirements - Simple and Clean */
.password-requirements {
    background: #f8f9ff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    font-size: 12px;
}

.password-requirements .requirement {
    margin: 4px 0;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    font-weight: normal;
}

.password-requirements .requirement i {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    font-size: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.password-requirements .requirement.valid {
    color: #28a745;
}

.password-requirements .requirement.valid i {
    color: #28a745;
    background-color: #f3f4f6;
    border: 1px solid transparent;
}

.password-requirements .requirement.invalid {
    color: #6b7280;
}

.password-requirements .requirement.invalid i {
    width: 16px;
    height: 16px;
    color: #dc3545;
    background-color: transparent;
    border: none;
    border-radius: 0;
}

/* Password Field Validation States */
.form-control.is-valid {
    border-color: #28a745 !important;
}

.form-control.is-invalid {
    border-color: #dc3545 !important;
}

.input-group .form-control.is-valid {
    border-right-color: #28a745 !important;
}

.input-group .form-control.is-invalid {
    border-right-color: #dc3545 !important;
}

.input-group .form-control.is-valid + .btn {
    border-color: #28a745 !important;
}

.input-group .form-control.is-invalid + .btn {
    border-color: #dc3545 !important;
}

/* Input Group for Password Toggle */
.input-group .btn {
    border: 1px solid #e1e5e9;
    border-left: none;
    border-radius: 0 12px 12px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.3s ease;
}

.input-group .btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

.input-group .form-control {
    border-right: none;
    border-radius: 12px 0 0 12px;
}

.input-group .form-control:focus {
    border-right: none;
    z-index: 3;
}

.input-group .form-control:focus + .btn {
    border-color: #667eea;
}

/* Checkbox Styling */
.form-check {
    margin: 20px 0;
}

.form-check-input {
    margin-top: 0.125rem;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-check-label {
    color: #666;
    font-size: 14px;
}

.form-check-label a {
    color: #667eea;
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-gradient,
.btn-register {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-weight: 600;
    color: white !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-gradient:hover,
.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    color: white !important;
}

.btn-gradient:focus,
.btn-register:focus,
.btn-gradient:active,
.btn-register:active {
    color: white !important;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-gradient::before,
.btn-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-gradient:hover::before,
.btn-register:hover::before {
    left: 0;
}

.btn-outline-primary {
    border: 1px solid #667eea;
    color: #667eea;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Links */
.btn-back {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-back:hover {
    color: #5a6fd8;
    text-decoration: none;
}

.login-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.login-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Success Animation */
.success-animation {
    text-align: center;
    padding: 40px 20px;
}

.success-animation i {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 20px;
    animation: bounceIn 1s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Alert Styling */
.alert {
    border-radius: 12px;
    margin-bottom: 20px;
    border: none;
    font-weight: 500;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border-left: 4px solid #28a745;
}

/* Responsive Design */
@media (max-width: 768px) {
    .register-card {
        margin: 0px;
        padding: 30px 20px;
    }

    .user-type-selector {
        flex-direction: column;
        gap: 10px;
    }

    .user-type-option {
        padding: 15px;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    body {
        padding-top: 70px;
    }
}

@media (max-width: 576px) {
    .register-card {
        border-radius: 15px;
        padding: 20px 15px;
    }

    .user-type-option i {
        font-size: 24px;
    }

    .register-header h2 {
        font-size: 1.5rem;
    }
}
