.bmi-calculator {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

    .bmi-calculator .card {
        border: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        border-radius: 12px;
    }

    .bmi-calculator .card-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 12px 12px 0 0 !important;
        padding: 1.5rem;
    }

/* Beautiful Tab-Style Unit Selection */
.unit-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.unit-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.unit-tab-input {
    display: none;
}

.unit-tab-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #6c757d;
    background: transparent;
    border: none;
    position: relative;
    z-index: 2;
    min-width: 120px;
    margin: 0 2px;
}

    .unit-tab-label i {
        margin-right: 8px;
        font-size: 1.1rem;
    }

    .unit-tab-label span {
        font-size: 0.95rem;
    }

.unit-tab-input:checked + .unit-tab-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.unit-tab-label:hover {
    color: #495057;
    background: #e9ecef;
}

.unit-tab-input:checked + .unit-tab-label:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Animation for tab switching */
.unit-tab-label {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.unit-tab-input:checked + .unit-tab-label {
    animation: tabActive 0.3s ease-out;
}

@keyframes tabActive {
    0% {
        transform: translateY(0) scale(0.95);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-2px) scale(1);
        opacity: 1;
    }
}

.bmi-value-card, .bmi-category-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.bmi-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.bmi-category {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.bmi-progress-container {
    position: relative;
    margin: 1rem 0;
}

.bmi-progress {
    display: flex;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bmi-range {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem;
    position: relative;
}

    .bmi-range.underweight {
        background: linear-gradient(135deg, #74b9ff, #0984e3);
    }

    .bmi-range.normal {
        background: linear-gradient(135deg, #00b894, #00a085);
    }

    .bmi-range.overweight {
        background: linear-gradient(135deg, #fdcb6e, #e17055);
    }

    .bmi-range.obesity {
        background: linear-gradient(135deg, #e17055, #d63031);
    }

.range-label {
    font-weight: bold;
    margin-bottom: 2px;
}

.range-value {
    font-size: 0.7rem;
    opacity: 0.9;
}

.bmi-indicator {
    position: absolute;
    top: -5px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #2d3436;
    display: none;
    transform: translateX(-50%);
    z-index: 10;
}

    .bmi-indicator::after {
        content: '';
        position: absolute;
        top: 12px;
        left: -1px;
        width: 2px;
        height: 60px;
        background-color: #2d3436;
    }

.info-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

    .info-card h6 {
        color: #667eea;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    }

.input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    font-weight: 600;
}

@media (max-width: 768px) {
    .unit-tab-label {
        padding: 10px 16px;
        min-width: 100px;
    }

        .unit-tab-label i {
            margin-right: 6px;
            font-size: 1rem;
        }

        .unit-tab-label span {
            font-size: 0.85rem;
        }

    .bmi-value {
        font-size: 2rem;
    }

    .bmi-category {
        font-size: 1.2rem;
    }

    .bmi-range {
        font-size: 0.7rem;
        padding: 0.3rem;
    }

    .range-value {
        font-size: 0.6rem;
    }
}

/* Animation for results appearing */
#results-section {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading animation */
.ri-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Additional smooth transitions */
.form-control, .form-select {
    transition: all 0.2s ease;
}

    .form-control:focus, .form-select:focus {
        transform: translateY(-1px);
    }

.card {
    transition: all 0.3s ease;
}

    .card:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }
/* Circular BMI Progress Ring */
.bmi-circle-container {
    position: relative;
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bmi-circle {
    position: relative;
    width: 200px;
    height: 200px;
}

.circle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-background {
    fill: none;
    stroke: #f1f3f4;
    stroke-width: 12;
}

.circle-progress {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-in-out, stroke 0.5s ease;
}

.circle-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.circle-bmi-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 0.25rem;
}

.circle-bmi-category {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.circle-bmi-percentage {
    font-size: 0.8rem;
    color: #6c757d;
}
