
/* Register Page Styles */
.auth-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 2rem 0;
    position: relative;
}

.auth-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23198754" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%2320c997" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23198754" opacity="0.08"/><circle cx="90" cy="40" r="0.5" fill="%2320c997" opacity="0.08"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.1),
            0 8px 25px rgba(25, 135, 84, 0.1);
    padding: 3rem;
    border: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #198754, #20c997);
}

.auth-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(25, 135, 84, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow:
            0 8px 25px rgba(25, 135, 84, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.auth-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(-45deg);
    transition: all 0.6s ease;
}

.auth-icon:hover::before {
    animation: shimmer 0.6s ease-in-out;
}

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

/* Form Progress Bar */
.form-progress-container {
    position: relative;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.form-progress {
    height: 100%;
    background: linear-gradient(90deg, #198754, #20c997);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 2px;
    position: relative;
}

.form-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Form Sections */
.form-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(25, 135, 84, 0.1);
    position: relative;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #198754, #20c997);
    border-radius: 0 2px 2px 0;
}

.form-section h6 {
    color: #198754;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.form-section h6 i {
    margin-right: 0.75rem;
    width: 20px;
    font-size: 1.2rem;
}

/* Enhanced Form Controls */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.form-control:focus, .form-select:focus {
    border-color: #198754;
    box-shadow:
            0 0 0 0.2rem rgba(25, 135, 84, 0.1),
            inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.form-control:hover:not(:focus), .form-select:hover:not(:focus) {
    border-color: #20c997;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border-radius: 15px;
}

/* Enhanced Labels */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.form-label i {
    margin-right: 0.5rem;
    width: 16px;
    font-size: 1rem;
}

/* Input Groups */
.input-group .form-control {
    border-right: none;
    border-radius: 12px 0 0 12px;
}

.input-group .btn {
    border-left: none;
    border-radius: 0 12px 12px 0;
    border: 2px solid #e9ecef;
    border-left: none;
    background: #f8f9fa;
    color: #6c757d;
    transition: all 0.3s ease;
}

.input-group .btn:hover {
    background: #198754;
    border-color: #198754;
    color: white;
    transform: scale(1.05);
}

.input-group .form-control:focus + .btn {
    border-color: #198754;
    background: #198754;
    color: white;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.75rem;
}

.strength-bar {
    height: 6px;
    background: linear-gradient(90deg, #e9ecef, #f8f9fa);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 3px;
    position: relative;
}

.strength-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: strength-shimmer 2s infinite;
}

@keyframes strength-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.strength-weak {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
    width: 33%;
}

.strength-medium {
    background: linear-gradient(90deg, #ffc107, #f39c12);
    width: 66%;
}

.strength-strong {
    background: linear-gradient(90deg, #198754, #20c997);
    width: 100%;
}

.strength-weak-text { color: #dc3545; }
.strength-medium-text { color: #ffc107; }
.strength-strong-text { color: #198754; }

/* Enhanced Checkboxes */
.form-check-input {
    width: 1.25em;
    height: 1.25em;
    margin-top: 0.125em;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-check-input:checked {
    background: linear-gradient(135deg, #198754, #20c997);
    border-color: #198754;
    transform: scale(1.1);
}

.form-check-input:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.form-check-label {
    margin-left: 0.75rem;
    cursor: pointer;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Enhanced Buttons */
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-success {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    border: none;
    box-shadow:
            0 4px 15px rgba(25, 135, 84, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-success::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 ease;
}

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

.btn-success:hover {
    background: linear-gradient(135deg, #157347 0%, #1aa179 100%);
    transform: translateY(-2px);
    box-shadow:
            0 8px 25px rgba(25, 135, 84, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-success:active {
    transform: translateY(-1px);
}

/* Loading State */
.loading-btn {
    pointer-events: none;
    opacity: 0.8;
}

/* Validation States */
.is-valid {
    border-color: #198754 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.4.6 4.5-4.8-.7-.7-3.8 4.1-1.4-1.4-.6.6z'/%3e%3c/svg%3e") !important;
    animation: validPulse 0.6s ease-in-out;
}

.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4L6 4.8l-.2.2v2l.2.2.2-.2v-2l-.2-.2z'/%3e%3cpath d='M6 8.2c.2 0 .4-.2.4-.4s-.2-.4-.4-.4-.4.2-.4.4.2.4.4.4z'/%3e%3c/svg%3e") !important;
    animation: invalidShake 0.6s ease-in-out;
}

@keyframes validPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes invalidShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Invalid Feedback Enhancement */
.invalid-feedback {
    display: block !important;
    font-size: 0.875rem;
    color: #dc3545;
    font-weight: 500;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 6px;
    border-left: 3px solid #dc3545;
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(135deg, #d1e7dd, #a3cfbb);
    border-left-color: #198754;
    color: #0a3622;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f1aeb5);
    border-left-color: #dc3545;
    color: #58151c;
}

/* Links */
.text-success {
    color: #198754 !important;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.text-success::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #198754, #20c997);
    transition: width 0.3s ease;
}

.text-success:hover {
    color: #20c997 !important;
}

.text-success:hover::after {
    width: 100%;
}

/* BMI Result */
#bmiResult {
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-left: 4px solid #2196f3;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .auth-section {
        padding: 1rem 0;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
        border-radius: 15px;
    }

    .form-section {
        padding: 1.5rem 1rem;
    }

    .auth-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .form-control-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .form-label {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }

    .form-section {
        padding: 1rem 0.75rem;
        margin-bottom: 1.5rem;
    }

    .auth-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .form-progress-container {
        margin-bottom: 1.5rem;
    }
}

/* Accessibility Enhancements */
.form-control:focus-visible,
.form-select:focus-visible,
.btn:focus-visible,
.form-check-input:focus-visible {
    outline: 2px solid #198754;
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Custom Scrollbar for Textareas */
textarea::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
    background: #198754;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #157347;
}
