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

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

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

.input-container.hidden {
    display: none;
}

.input-container label {
    width: 50%;
    text-align: right;
    margin-right: 4%;
}

.input-container input, .input-container select {
    width: 46%;
    padding: 5px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    border: 1px solid #cfd1d8;
    border-radius: 3px;
    outline: none;
    margin-right: 5%;
}

.input-container input::placeholder {
    font-size: 0.8em;
}

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

#button-container button {
    padding: 10px 20px;
    border: 0;
    color: #fff;
    font-size: 16px;
    background: #084288;
    border-radius: 3px;
    margin: 0 10px;
    cursor: pointer;
}

#button-container button:hover {
    background-color: #434c6d;
}

#result {
    margin-top: 20px;
}

#result h3 {
    text-align: center;
    color: #084288;
    margin-bottom: 15px;
}

.pe-display {
    background: linear-gradient(135deg, #084288, #434c6d);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 15px;
}

.pe-display .pe-value {
    font-size: 3em;
    font-weight: bold;
}

.pe-display .pe-label {
    font-size: 1.1em;
    opacity: 0.9;
}

.result-summary {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.result-summary p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
}

.result-summary strong {
    color: #084288;
}

.valuation-meter {
    margin-top: 15px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.valuation-meter.undervalued {
    background: #e8f5e9;
    border: 1px solid #4caf50;
}

.valuation-meter.fair {
    background: #e3f2fd;
    border: 1px solid #2196f3;
}

.valuation-meter.overvalued {
    background: #fff3e0;
    border: 1px solid #ff9800;
}

.valuation-meter h4 {
    margin: 0 0 10px 0;
}

.valuation-meter.undervalued h4 {
    color: #2e7d32;
}

.valuation-meter.fair h4 {
    color: #1565c0;
}

.valuation-meter.overvalued h4 {
    color: #e65100;
}

.comparison-box {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
}

.comparison-box h4 {
    margin: 0 0 10px 0;
    color: #084288;
}

.comparison-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    position: relative;
    margin: 15px 0;
    overflow: hidden;
}

.comparison-bar .your-pe {
    position: absolute;
    height: 100%;
    background: #084288;
    border-radius: 15px;
    min-width: 5px;
}

.comparison-bar .industry-marker {
    position: absolute;
    height: 100%;
    width: 3px;
    background: #f44336;
    top: 0;
}

.comparison-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
}

.earnings-yield {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
}

.earnings-yield h4 {
    color: #2e7d32;
    margin: 0 0 10px 0;
}

.earnings-yield .yield-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #2e7d32;
}

.error-message {
    color: red;
    text-align: center;
    margin-bottom: 10px;
}
