/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main Container */
.bmi-calculator {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Calculator Card */
.calculator-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    animation: slideIn 0.5s ease;
}

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

/* Language Selector */
.language-selector {
    text-align: right;
    margin-bottom: 20px;
}

.language-selector select {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    border-color: #667eea;
}

.language-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Typography */
h1 {
    margin: 0 0 10px 0;
    color: #1f2937;
    font-size: 2.5rem;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #6b7280;
    margin: 0 0 30px 0;
    font-size: 1rem;
}

/* Unit Toggle */
.unit-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.unit-toggle button {
    flex: 1;
    padding: 12px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unit-toggle button:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.unit-toggle button.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Input Groups */
.input-group {
    margin-bottom: 20px;
}

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

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input:hover {
    border-color: #d1d5db;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn-calculate,
.btn-reset {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-calculate {
    background: #667eea;
    color: white;
}

.btn-calculate:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

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

.btn-reset {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-reset:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

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

/* Result Display */
.result {
    margin-top: 30px;
    padding: 30px;
    background: #f9fafb;
    border-radius: 15px;
    text-align: center;
    border-left: 4px solid;
    animation: fadeIn 0.5s ease;
}

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

.result h2 {
    margin: 0 0 15px 0;
    color: #6b7280;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.bmi-value {
    font-size: 4rem;
    font-weight: 700;
    margin: 10px 0;
    line-height: 1;
}

.bmi-category {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 10px;
}

/* BMI Guide */
.bmi-guide {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f3f4f6;
}

.bmi-guide h3 {
    margin: 0 0 15px 0;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Health Information Box */
.health-info {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.health-info h3 {
    margin: 0 0 12px 0;
    color: #1e40af;
    font-size: 1.1rem;
    font-weight: 600;
}

.health-info p {
    color: #1e3a8a;
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0 0 12px 0;
    text-align: justify;
}

.info-source {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #bfdbfe;
    font-size: 0.85rem;
}

.info-source strong {
    color: #1e40af;
    margin-right: 6px;
}

.info-source a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.info-source a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-card {
        padding: 30px 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .bmi-value {
        font-size: 3rem;
    }

    .bmi-category {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .bmi-calculator {
        padding: 15px;
    }

    .calculator-card {
        padding: 25px 15px;
    }

    h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .button-group {
        flex-direction: column;
    }

    .bmi-value {
        font-size: 2.5rem;
    }

    .bmi-category {
        font-size: 1.1rem;
    }

    .unit-toggle button {
        padding: 10px;
        font-size: 0.9rem;
    }

    .input-group input {
        padding: 10px 14px;
    }
}

/* Print Styles */
@media print {
    .bmi-calculator {
        background: white;
        padding: 0;
    }

    .calculator-card {
        box-shadow: none;
        padding: 20px;
    }

    .button-group,
    .unit-toggle {
        display: none;
    }
}
