body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.navbar-brand {
    font-weight: bold;
}
.card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}
.card-header {
    background-color: #4e73df;
    color: white;
    border-radius: 10px 10px 0 0 !important;
}
.btn-primary {
    background-color: #4e73df;
    border-color: #4e73df;
}
.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2e59d9;
}
.btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}
.btn-success:hover {
    background-color: #17a673;
    border-color: #17a673;
}
.bmi-result {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}
.underweight {
    background-color: #ffc107;
    color: #856404;
}
.normal {
    background-color: #28a745;
    color: white;
}
.overweight {
    background-color: #fd7e14;
    color: white;
}
.obese {
    background-color: #dc3545;
    color: white;
}
.search-container {
    position: relative;
}
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}
.search-result-item {
    padding: 8px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
.search-result-item:hover {
    background-color: #f8f9fa;
}
.auth-container {
    max-width: 1000px;
    margin: 30px auto;
}
.hidden {
    display: none;
}
.height-input-group {
    display: flex;
    gap: 10px;
}
.height-input-group > div {
    flex: 1;
}
.formula-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
}
.formula-equation {
    font-size: 1.5rem;
    text-align: center;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
}
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.record-actions {
    display: flex;
    gap: 5px;
}
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}
.loading-spinner {
    display: none;
    text-align: center;
    padding: 10px;
}
.pdf-status {
    text-align: center;
    padding: 5px;
    font-size: 0.9em;
}
.btn-group .btn {
    padding: 12px 30px;
    font-weight: 600;
}
.password-strength {
    height: 5px;
    margin-top: 5px;
    border-radius: 3px;
    transition: all 0.3s ease;
}
.strength-weak { background-color: #dc3545; }
.strength-medium { background-color: #ffc107; }
.strength-strong { background-color: #28a745; }
.form-text {
    font-size: 0.85em;
}
.input-group .btn {
    border-left: none;
}
.loading {
    opacity: 0.7;
    pointer-events: none;
}
.alert-success {
    border-left: 4px solid #28a745;
}

/* Enhanced BMI Image Styles */
.login-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
}

.login-image-wrapper {
    position: relative;
    display: inline-block;
}

.bmi-image {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 15px;
    box-shadow:
        0 15px 25px rgba(0, 0, 0, 0.2),
        0 10px 10px rgba(0, 0, 0, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    transition: all 0.4s ease;
    border: 3px solid #4e73df;
    position: relative;
    z-index: 1;
}

.bmi-image:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow:
        0 20px 35px rgba(0, 0, 0, 0.25),
        0 15px 15px rgba(0, 0, 0, 0.2),
        inset 0 0 25px rgba(255, 255, 255, 0.7);
}

.bmi-image::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(78, 115, 223, 0.4);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bmi-image:hover::after {
    opacity: 1;
}

.bmi-image-caption {
    margin-top: 15px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    line-height: 1.5;
}

.bmi-image-caption strong {
    color: #4e73df;
    font-weight: 600;
}

/* Animation for the image */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.bmi-image-animated {
    animation: float 6s ease-in-out infinite;
}

/* Form layout */
.login-form-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.form-fields {
    flex: 1;
    min-width: 300px;
}

.image-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form styling */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-control {
    border-radius: 8px;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.input-group .btn {
    border-radius: 0 8px 8px 0;
}

.form-check-input:checked {
    background-color: #4e73df;
    border-color: #4e73df;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-form-container {
        flex-direction: column;
    }

    .image-section {
        order: -1;
    }

    .bmi-image {
        max-width: 200px;
    }
}

/* Decorative elements */
.card-body {
    position: relative;
    overflow: hidden;
}

.form-fields, .image-section {
    position: relative;
    z-index: 1;
}

/* Health Assessment Modal Styles */
.health-modal .modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.health-modal .modal-header {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: white;
    border-bottom: none;
    padding: 20px 25px;
}

.health-modal .modal-body {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.health-tips {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.health-tips h6 {
    color: #4e73df;
    margin-bottom: 15px;
    font-weight: 600;
}

.health-tips ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.health-tips li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.health-risks {
    background: #fff3cd;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #ffc107;
}

.health-risks h6 {
    color: #856404;
    margin-bottom: 15px;
    font-weight: 600;
}

.doctor-note {
    background: #d1ecf1;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #17a2b8;
}

.doctor-note h6 {
    color: #0c5460;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Delete button styling */
.btn-danger {
    background-color: #e74a3b;
    border-color: #e74a3b;
}

.btn-danger:hover {
    background-color: #d52a1a;
    border-color: #d52a1a;
}

/* Bulk PDF button styling */
#bulkPdfBtn {
    background-color: #1cc88a;
    border-color: #1cc88a;
    color: white;
}

#bulkPdfBtn:hover {
    background-color: #17a673;
    border-color: #17a673;
}

/* Search and Pagination Styles */
.pagination .page-link {
    color: #4e73df;
    border-color: #ddd;
}

.pagination .page-item.active .page-link {
    background-color: #4e73df;
    border-color: #4e73df;
    color: white;
}

.pagination .page-link:hover {
    color: #2e59d9;
    background-color: #e9ecef;
    border-color: #ddd;
}

#paginationInfo {
    font-size: 0.9em;
    font-weight: 500;
}

/* BMI Result with Name */
.bmi-value {
    font-size: 2rem;
    font-weight: bold;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

/* Height Converter Styles */
.height-converter-container {
    transition: all 0.3s ease;
}

#heightFeet, #heightInches, #heightCmManual {
    text-align: center;
    font-weight: bold;
}

#convertHeightBtn {
    margin-top: 10px;
}

/* Exercise Types Multiple Select */
#exerciseTypes {
    min-height: 120px;
}

#exerciseTypes option {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}

#exerciseTypes option:hover {
    background-color: #e9ecef;
}

#exerciseTypes option:checked {
    background-color: #4e73df;
    color: white;
}

/* BMI Categories for Obese Classes */
.badge.bg-danger {
    background-color: #dc3545 !important;
}

/* Form layout adjustments */
#exerciseTypesContainer {
    margin-top: 10px;
}

/* Gaze Chart Container */
#bmiGazeChart {
    max-height: 400px;
}

/* Responsive adjustments for new layout */
@media (max-width: 768px) {
    .bmi-value {
        font-size: 1.5rem;
        padding: 10px;
    }

    #heightFeet, #heightInches, #heightCmManual {
        margin-bottom: 10px;
    }

    .height-converter-container {
        flex-direction: column;
    }
}

/* Enhanced BMI result display */
.bmi-result h4 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 600;
}

.bmi-category {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 10px;
    color: #6c757d;
}
/* Exercise badges styling */
.exercise-badge {
    display: inline-block;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 12px;
    font-size: 0.75rem;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    white-space: nowrap;
}

.exercise-running { background-color: #fff3cd; border-color: #ffeaa7; }
.exercise-weight { background-color: #d1ecf1; border-color: #bee5eb; }
.exercise-yoga { background-color: #d4edda; border-color: #c3e6cb; }
.exercise-swim { background-color: #cce7ff; border-color: #b3d9ff; }
.exercise-cycle { background-color: #e2e3e5; border-color: #d6d8db; }
.exercise-aerobics { background-color: #f8d7da; border-color: #f5c6cb; }
.exercise-pilates { background-color: #d1ecf1; border-color: #bee5eb; }
.exercise-dancing { background-color: #e2e3e5; border-color: #d6d8db; }
.exercise-walking { background-color: #fff3cd; border-color: #ffeaa7; }
.exercise-sports { background-color: #d4edda; border-color: #c3e6cb; }
.exercise-hiit { background-color: #f8d7da; border-color: #f5c6cb; }
.exercise-crossfit { background-color: #e2e3e5; border-color: #d6d8db; }
.exercise-martial { background-color: #fff3cd; border-color: #ffeaa7; }
.exercise-boxing { background-color: #f8d7da; border-color: #f5c6cb; }
.exercise-zumba { background-color: #d1ecf1; border-color: #bee5eb; }
.exercise-default { background-color: #e9ecef; border-color: #dee2e6; }


/* Form section styling */
.form-section {
    transition: all 0.3s ease;
    border-left: 4px solid #007bff !important;
}

.form-section:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.form-section .section-title {
    color: #495057;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
}

/* Height converter styling */
.height-converter-container {
    border-left: 4px solid #28a745 !important;
}

/* Gender options styling */
.gender-options .form-check-input {
    width: 1.2em;
    height: 1.2em;
}

.gender-options .form-check-label {
    font-size: 1.05em;
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.gender-options .form-check-input:checked + .form-check-label {
    background-color: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.3);
}

/* Exercise types wrapper */
.exercise-types-wrapper {
    position: relative;
}

/* Selected exercises preview */
.selected-exercises-box {
    min-height: 60px;
    max-height: 120px;
    overflow-y: auto;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
}

.exercise-tag {
    display: inline-block;
    padding: 4px 12px;
    margin: 3px 5px 3px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85em;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.exercise-tag i {
    margin-right: 4px;
    font-size: 0.9em;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form select styling */
.form-select-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #dee2e6;
    transition: all 0.3s;
}

.form-select-lg:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Form control styling */
.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #dee2e6;
    transition: all 0.3s;
}

.form-control-lg:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Form labels */
.form-label.fw-bold {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Form text styling */
.form-text {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Diet options styling */
.diet-options .form-check-input {
    width: 1.2em;
    height: 1.2em;
}

.diet-options .form-check-label {
    font-size: 1.05em;
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.diet-options .form-check-input:checked + .form-check-label {
    background-color: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.3);
}

/* Input group styling */
.input-group-text {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    font-weight: 500;
}

/* Submit button */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-section {
        padding: 15px !important;
    }

    .form-select-lg, .form-control-lg {
        padding: 0.5rem 0.75rem;
    }

    .height-converter-container .row > div {
        margin-bottom: 10px;
    }
}
.exercise-category {
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.exercise-category:hover {
    background: #f1f3f4;
}

.category-title {
    color: #495057;
    font-weight: 600;
}

.exercise-checkbox:checked + .form-check-label {
    font-weight: 600;
    color: #0d6efd;
}

.exercise-checkbox:checked + .form-check-label i {
    color: #0d6efd;
}

   /* Ensure form elements are properly displayed */
        #sportsSelection,
        #exerciseDetails,
        #exerciseTypesContainer {
            transition: all 0.3s ease;
        }

        /* Search results styling */
        .search-results {
            position: absolute;
            width: 100%;
            max-height: 200px;
            overflow-y: auto;
            background: white;
            border: 1px solid #ddd;
            border-top: none;
            z-index: 1000;
            display: none;
        }

        .search-result-item {
            padding: 8px 12px;
            cursor: pointer;
            border-bottom: 1px solid #eee;
        }

        .search-result-item:hover {
            background-color: #f8f9fa;
        }

        /* Exercise badges */
        .exercise-badge {
            display: inline-block;
            padding: 2px 6px;
            margin: 2px;
            background: #e9ecef;
            border-radius: 4px;
            font-size: 0.8em;
        }

        .hidden {
            display: none !important;
        }

        /* Fix for exercise types preview */
        #selectedExercisesPreview {
            margin-top: 15px;
        }

        .selected-exercises-box {
            min-height: 60px;
            padding: 10px;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            background-color: #f8f9fa;
        }

        /* PDF Report Modal Styles */
        #pdfPreview {
            transition: opacity 0.3s ease;
        }

        .modal-xl {
            max-width: 95%;
        }

        #pdfLoading {
            padding: 50px 0;
            text-align: center;
        }

        #pdfLoading .spinner-border {
            width: 3rem;
            height: 3rem;
        }

        #pdfLoading p {
            margin-top: 15px;
            font-size: 1.1rem;
            color: #666;
        }

        /* PDF Preview Container */
        #pdfPreviewContainer {
            width: 100%;
            height: 70vh;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            overflow: auto;
            background: white;
            padding: 20px;
        }

        /* Modal footer button spacing */
        .modal-footer .btn {
            min-width: 120px;
        }

        /* Responsive adjustments for modal */
        @media (max-width: 768px) {
            .modal-xl {
                max-width: 100%;
                margin: 10px;
            }

            .modal-footer {
                flex-wrap: wrap;
            }

            .modal-footer .btn {
                flex: 1;
                margin-bottom: 5px;
                min-width: auto;
            }

            #pdfPreviewContainer {
                height: 60vh;
                padding: 10px;
            }
        }

        /* PDF Content Styling */
        .pdf-content {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            color: #333;
            line-height: 1.6;
        }

        .pdf-header {
            text-align: center;
            border-bottom: 2px solid #007bff;
            padding-bottom: 15px;
            margin-bottom: 25px;
        }

        .pdf-header h1 {
            color: #007bff;
            margin-bottom: 10px;
        }

        .pdf-header h3 {
            color: #28a745;
            margin-bottom: 5px;
        }

        .pdf-section {
            margin-bottom: 25px;
            page-break-inside: avoid;
        }

        .pdf-section h4 {
            color: #495057;
            border-bottom: 1px solid #dee2e6;
            padding-bottom: 5px;
            margin-bottom: 15px;
        }

        .pdf-table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 15px;
        }

        .pdf-table th,
        .pdf-table td {
            border: 1px solid #dee2e6;
            padding: 8px 12px;
            text-align: left;
        }

        .pdf-table th {
            background-color: #f8f9fa;
            font-weight: 600;
        }

        .bmi-indicator {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 4px;
            font-weight: bold;
            margin-left: 10px;
        }

        .underweight { background-color: #ffc107; color: #212529; }
        .normal { background-color: #28a745; color: white; }
        .overweight { background-color: #fd7e14; color: white; }
        .obese { background-color: #dc3545; color: white; }

        .pdf-footer {
            margin-top: 30px;
            padding-top: 15px;
            border-top: 1px solid #dee2e6;
            font-size: 0.9em;
            color: #6c757d;
            text-align: center;
        }

        .no-print {
            /* Hide certain elements when printing */
        }

        @media print {
            .no-print {
                display: none !important;
            }

            .pdf-content {
                padding: 0;
                margin: 0;
            }

            #pdfPreviewContainer {
                border: none;
                overflow: visible;
            }
        }

        /* New styles for calorie calculator button */
        .btn-outline-info {
            border-color: #17a2b8;
            color: #17a2b8;
        }

        .btn-outline-info:hover {
            background-color: #17a2b8;
            color: white;
        }

        .record-actions {
            display: flex;
            gap: 5px;
        }

        .record-actions .btn-sm {
            padding: 0.25rem 0.5rem;
            font-size: 0.875rem;
        }

        /* Body fat calculator button */
        .btn-outline-warning {
            border-color: #ffc107;
            color: #ffc107;
        }

        .btn-outline-warning:hover {
            background-color: #ffc107;
            color: #212529;
        }

        /* Exercise and sports tags */
        .exercise-tag {
            display: inline-block;
            padding: 4px 8px;
            margin: 2px;
            background: #e9ecef;
            border-radius: 4px;
            font-size: 0.8em;
            white-space: nowrap;
        }

        .selected-sports-box {
            min-height: 60px;
            padding: 10px;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            background-color: #f8f9fa;
        }
        /* Add to your existing CSS */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-top: none;
}

.table td {
    vertical-align: middle;
}

.exercise-badge {
    display: inline-block;
    padding: 2px 6px;
    margin: 2px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: nowrap;
}

.record-actions {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
}

.record-actions .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    min-width: 32px;
}

/* Color classes for body fat percentage */
.text-success { color: #28a745 !important; }
.text-primary { color: #007bff !important; }
.text-warning { color: #ffc107 !important; }
.text-danger { color: #dc3545 !important; }
.text-info { color: #17a2b8 !important; }
.text-muted { color: #6c757d !important; }

/* Exercise type styling */
.exercise-running { background-color: #e3f2fd; }
.exercise-weight { background-color: #f3e5f5; }
.exercise-yoga { background-color: #e8f5e8; }
.exercise-swim { background-color: #e0f7fa; }
.exercise-cycle { background-color: #fff3e0; }
.exercise-aerobics { background-color: #fce4ec; }
.exercise-pilates { background-color: #f3e5f5; }
.exercise-dancing { background-color: #fff3e0; }
.exercise-walking { background-color: #e8eaf6; }
.exercise-sports { background-color: #f1f8e9; }
.exercise-hiit { background-color: #fff8e1; }
.exercise-crossfit { background-color: #fff3e0; }
.exercise-martial { background-color: #f3e5f5; }
.exercise-boxing { background-color: #ffebee; }
.exercise-zumba { background-color: #fce4ec; }
.exercise-default { background-color: #f5f5f5; }
