/* Responsive BMI Calculator Styles */
.bmi-calculator-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.bmi-header {
    background: linear-gradient(to right, #5563DE, #6a11cb);
    color: white;
    padding: 25px 30px;
    text-align: center;
    border-radius: 20px 20px 0 0;
}

.bmi-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
}

.bmi-header p {
    opacity: 0.9;
    font-size: 16px;
}

.bmi-main-content {
    display: flex;
    flex-wrap: wrap;
    padding: 30px;
    gap: 30px;
    background: white;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.bmi-calculator-section {
    flex: 2;
    min-width: 300px;
}

.converter-section {
    flex: 1;
    min-width: 300px;
    background: #f9fafc;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: none;
}

.converter-section.show {
    display: block;
}

.unit-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.unit-tab {
    padding: 12px 25px;
    background: #f5f7fa;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
    min-width: 120px;
}

.unit-tab:hover {
    background: #eef2ff;
}

.unit-tab.active {
    background: #5563DE;
    color: white;
    border-color: #5563DE;
}

.converter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.converter-tab {
    padding: 10px 20px;
    background: #eef2ff;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
}

.converter-tab:hover {
    background: #e0e7ff;
}

.converter-tab.active {
    background: #5563DE;
    color: white;
    border-color: #5563DE;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

.input-row {
    display: flex;
    gap: 10px;
}

.input-row input {
    flex: 1;
}

input, select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.3s;
    background: white;
    box-sizing: border-box;
}

input:focus, select:focus {
    outline: none;
    border-color: #5563DE;
}

.converter-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.converter-group {
    margin-bottom: 20px;
}

.gender-selector {
    display: flex;
    gap: 15px;
}

.gender-option {
    flex: 1;
    text-align: center;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.gender-option:hover {
    background: #f5f7fa;
}

.gender-option.selected {
    background: #5563DE;
    color: white;
    border-color: #5563DE;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.calculate-btn {
    background: #5563DE;
    color: white;
}

.calculate-btn:hover {
    background: #4250c4;
}

.clear-btn {
    background: #f5f7fa;
    color: #333;
}

.clear-btn:hover {
    background: #e5e7eb;
}

.result-card {
    background: #f9fafc;
    border-radius: 15px;
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.result-card h2 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 24px;
}

.bmi-value {
    font-size: 48px;
    font-weight: 700;
    color: #2ecc71;
    text-align: center;
    margin: 10px 0;
}

.bmi-category {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.result-details {
    margin-top: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #666;
    font-size: 16px;
}

.detail-value {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.chart-container {
    width: 250px;
    height: 250px;
    margin: 0 auto 20px;
}

.converter-btn {
    background: #10b981;
    color: white;
    padding: 12px;
    margin-top: 10px;
    width: 100%;
}

.converter-btn:hover {
    background: #0da271;
}

.converter-result {
    background: #f0f9ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border: 1px solid #bae6fd;
}

.unit-category {
    margin-bottom: 30px;
    display: none;
}

.unit-category.active {
    display: block;
}

.unit-inputs {
    display: none;
}

.unit-inputs.active {
    display: block;
}

.age-error {
    color: #e74c3c;
    background: #ffeaea;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
    text-align: center;
    font-size: 16px;
}

.age-error.show {
    display: block;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .bmi-main-content {
        padding: 20px;
    }
}

@media (max-width: 992px) {
    .bmi-main-content {
        flex-direction: column;
    }
    
    .bmi-calculator-section, .converter-section {
        min-width: 100%;
    }
    
    .converter-inputs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .bmi-calculator-container {
        padding: 10px;
    }
    
    .bmi-header {
        padding: 20px 15px;
    }
    
    .bmi-header h2 {
        font-size: 24px;
    }
    
    .bmi-header p {
        font-size: 14px;
    }
    
    .bmi-main-content {
        padding: 15px;
        gap: 20px;
    }
    
    .unit-selector {
        gap: 10px;
    }
    
    .unit-tab {
        padding: 10px 15px;
        min-width: 100px;
        font-size: 14px;
    }
    
    .input-group label {
        font-size: 14px;
    }
    
    input, select {
        padding: 10px;
        font-size: 14px;
    }
    
    .gender-option {
        padding: 12px;
        font-size: 14px;
    }
    
    button {
        padding: 12px;
        font-size: 14px;
    }
    
    .result-card {
        padding: 20px;
    }
    
    .result-card h2 {
        font-size: 20px;
    }
    
    .bmi-value {
        font-size: 36px;
    }
    
    .bmi-category {
        font-size: 18px;
    }
    
    .detail-label, .detail-value {
        font-size: 14px;
    }
    
    .chart-container {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .unit-tab {
        min-width: 100%;
        margin-bottom: 5px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .gender-selector {
        flex-direction: column;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .converter-tabs {
        flex-direction: column;
    }
    
    .converter-tab {
        width: 100%;
        text-align: center;
    }
    
    .bmi-value {
        font-size: 32px;
    }
    
    .chart-container {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 360px) {
    .bmi-header h2 {
        font-size: 20px;
    }
    
    .bmi-header p {
        font-size: 12px;
    }
    
    .unit-tab {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .bmi-value {
        font-size: 28px;
    }
    
    .chart-container {
        width: 150px;
        height: 150px;
    }
}