.calculator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-section {
    text-align: center;
    margin-bottom: 40px;
}

.header-section h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.header-section p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.calculator-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 30px;
    flex: 1;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-size: 1rem;
    color: #555;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.input-field {
    flex: 1;
}

.input-field label {
    display: block;
    font-size: 1rem;
    color: #555;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-field input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-field input:focus {
    border-color: #4285f4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.unit-toggle {
    display: flex;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 25px;
}

.unit-toggle button {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #666;
    transition: all 0.3s;
    font-weight: 500;
}

.unit-toggle button.active {
    background: #4285f4;
    color: white;
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.3);
}

.calculate-btn {
    width: 100%;
    padding: 14px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.calculate-btn:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 133, 244, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.result-section {
    text-align: center;
    padding: 30px;
    border-radius: 16px;
    background: #f8f9fa;
    margin-top: 30px;
    display: none;
    transition: all 0.3s ease;
}

.result-section.visible {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.bmi-value {
    font-size: 3.5rem;
    font-weight: bold;
    color: #4285f4;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bmi-category {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 30px;
    padding: 10px 20px;
    background: white;
    border-radius: 30px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-weight: 600;
}

.bmi-scale-container {
    position: relative;
    padding: 20px 0;
    margin: 40px 0;
}

.bmi-scale {
    height: 12px;
    background: linear-gradient(to right, 
        #ff6b6b 0%, /* Underweight */
        #ff6b6b 18.5%,
        #4acf7f 18.5%, /* Normal */
        #4acf7f 25%,
        #ffd93d 25%, /* Overweight */
        #ffd93d 30%,
        #ff8f51 30% /* Obese */
    );
    border-radius: 6px;
    position: relative;
    margin: 20px 0;
}

.scale-markers {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
}

.scale-marker {
    position: absolute;
    transform: translateX(-50%);
}

.scale-marker::before {
    content: '';
    display: block;
    width: 2px;
    height: 16px;
    background: #666;
    margin: 0 auto;
}

.scale-label {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #666;
    white-space: nowrap;
    font-weight: 500;
}

.scale-value {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: #888;
}

.bmi-pointer {
    width: 20px;
    height: 20px;
    background: #333;
    border: 3px solid white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: left 0.5s ease;
}

.bmi-info {
    margin-top: 30px;
}

.bmi-info h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.category-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.category-list li {
    padding: 15px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.category-list li::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.category-list li:nth-child(1)::before { background: #ff6b6b; }
.category-list li:nth-child(2)::before { background: #4acf7f; }
.category-list li:nth-child(3)::before { background: #ffd93d; }
.category-list li:nth-child(4)::before { background: #ff8f51; }

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .calculator-container {
        padding: 20px 15px;
        min-height: auto;
        margin-bottom: 2rem;
    }
    
    .header-section {
        margin-bottom: 30px;
    }
    
    .header-section h1 {
        font-size: 2rem;
    }
    
    .header-section p {
        font-size: 1rem;
    }
    
    .calculator-card {
        padding: 25px 20px;
        margin-bottom: 20px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .input-field input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .unit-toggle button {
        padding: 8px;
        font-size: 0.9rem;
    }
    
    .calculate-btn {
        padding: 12px;
        font-size: 1rem;
    }
    
    .result-section {
        padding: 25px 20px;
        margin-top: 25px;
    }
    
    .bmi-value {
        font-size: 2.8rem;
    }
    
    .bmi-category {
        font-size: 1.2rem;
        padding: 8px 16px;
    }
    
    .bmi-scale-container {
        margin: 30px 0;
    }
    
    .scale-label {
        font-size: 0.8rem;
    }
    
    .category-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .category-list li {
        padding: 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .calculator-container {
        padding: 15px 10px;
        margin-bottom: 1.5rem;
    }
    
    .header-section h1 {
        font-size: 1.8rem;
    }
    
    .header-section p {
        font-size: 0.95rem;
    }
    
    .calculator-card {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .input-field input {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .unit-toggle button {
        padding: 6px;
        font-size: 0.85rem;
    }
    
    .calculate-btn {
        padding: 10px;
        font-size: 0.95rem;
    }
    
    .result-section {
        padding: 20px 15px;
        margin-top: 20px;
    }
    
    .bmi-value {
        font-size: 2.5rem;
    }
    
    .bmi-category {
        font-size: 1.1rem;
        padding: 6px 12px;
    }
    
    .bmi-scale-container {
        margin: 25px 0;
    }
    
    .scale-label {
        font-size: 0.75rem;
    }
    
    .category-list li {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .bmi-info h3 {
        font-size: 1.1rem;
    }
}

/* Ensure proper spacing from footer */
@media (max-height: 700px) {
    .calculator-container {
        min-height: auto;
        padding-bottom: 3rem;
    }
}