body, div, input, li, p, span, td, textarea {
    font-family: arial, helvetica, sans-serif;
    font-size: 16px;
}

.calculator-container {
    background-color: white;
    width: 90%;
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 0 5px #ccc;
}

.calculator-container h1 {
    text-align: center;
    color: #084288;
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
}

.input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.input-container label {
    width: 120px;
    text-align: right;
    font-weight: bold;
}

.input-container input {
    width: 80px;
    padding: 8px;
    font-size: 1rem;
    border: 1px solid #cfd1d8;
    border-radius: 5px;
    outline: none;
}

.input-container select {
    padding: 8px;
    font-size: 1rem;
    border: 1px solid #cfd1d8;
    border-radius: 5px;
    outline: none;
    background-color: white;
    max-width: 250px;
}

.input-container .unit {
    color: #666;
    font-size: 0.9rem;
    min-width: 40px;
}

.input-container input:focus,
.input-container select:focus {
    border-color: #084288;
    box-shadow: 0 0 3px rgba(8, 66, 136, 0.3);
}

#button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

#button-container button {
    padding: 12px 20px;
    border: 0;
    color: #fff;
    font-size: 16px;
    background: #084288;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#button-container button:hover {
    background-color: #0a5ab8;
}

#result {
    margin-top: 20px;
    padding: 15px;
    min-height: 60px;
}

#result.success {
    background-color: #f5f5f5;
    border-radius: 10px;
}

#result.error {
    background-color: #ffebee;
    border-radius: 10px;
    border: 1px solid #f44336;
    color: #c62828;
    text-align: center;
}

.result-header {
    font-size: 1.1rem;
    font-weight: bold;
    color: #084288;
    text-align: center;
    margin-bottom: 20px;
}

.rmr-display {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    border-radius: 15px;
    color: white;
    margin-bottom: 15px;
}

.rmr-value {
    font-size: 2.5rem;
    font-weight: bold;
}

.rmr-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.tdee-display {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
    border-radius: 15px;
    color: white;
    margin-bottom: 15px;
}

.tdee-value {
    font-size: 2rem;
    font-weight: bold;
}

.calorie-goals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.goal-card {
    text-align: center;
    padding: 15px 10px;
    border-radius: 10px;
}

.goal-card.loss {
    background-color: #e3f2fd;
}

.goal-card.maintain {
    background-color: #e8f5e9;
}

.goal-card.gain {
    background-color: #fff3e0;
}

.goal-card h5 {
    margin: 0 0 5px 0;
    font-size: 0.8rem;
    color: #666;
}

.goal-card .cal-value {
    font-size: 1.2rem;
    font-weight: bold;
}

.goal-card.loss .cal-value { color: #1565c0; }
.goal-card.maintain .cal-value { color: #2e7d32; }
.goal-card.gain .cal-value { color: #e65100; }

.breakdown-section {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.breakdown-section h4 {
    color: #084288;
    margin: 0 0 10px 0;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted #e0e0e0;
}

.breakdown-row:last-child {
    border-bottom: none;
}

.content-section {
    padding: 20px;
    line-height: 1.7;
}

.content-section h2 {
    color: #084288;
    margin-top: 25px;
    margin-bottom: 15px;
}

.content-section h3 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
}

.content-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.content-section li {
    margin-bottom: 8px;
}

.formula-box {
    background-color: #e3f2fd;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.formula-box h4 {
    color: #1565c0;
    margin: 10px 0 5px 0;
}

.formula-box h4:first-child {
    margin-top: 0;
}

.formula-box p {
    font-family: monospace;
    font-size: 0.95rem;
    color: #333;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.info-table th,
.info-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.info-table th {
    background-color: #084288;
    color: white;
}

.info-table tr:nth-child(even) {
    background-color: #f5f5f5;
}

.disclaimer {
    background-color: #fff3e0;
    border: 1px solid #ff9800;
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
}

.disclaimer h3 {
    color: #e65100;
    margin-top: 0;
}

.disclaimer p {
    color: #666;
    font-size: 0.9rem;
}

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

    .input-container {
        flex-direction: column;
        align-items: stretch;
    }

    .input-container label {
        width: 100%;
        text-align: left;
        margin-bottom: 5px;
    }

    .input-container input,
    .input-container select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #button-container {
        flex-direction: column;
    }

    #button-container button {
        width: 100%;
    }

    .calorie-goals {
        grid-template-columns: 1fr;
    }

    .breakdown-row {
        flex-direction: column;
        text-align: center;
    }

    .rmr-value {
        font-size: 2rem;
    }
}
