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 h3 {
    color: #084288;
    font-size: 14px;
    margin: 15px 0 10px 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

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

.input-container label {
    width: 55%;
    text-align: right;
    margin-right: 5%;
    font-size: 14px;
}

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

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

#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 {
    text-align: left;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: none;
}

#result.show {
    display: block;
}

#result h3 {
    color: #084288;
    margin-top: 0;
    font-size: 16px;
    margin-bottom: 15px;
}

#result .primary-result {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #084288, #17a2b8);
    color: white;
    border-radius: 10px;
    margin-bottom: 20px;
}

#result .primary-result .big-number {
    font-size: 36px;
    font-weight: bold;
}

#result .primary-result .label {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 5px;
}

#result .metrics-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#result .metric-box {
    flex: 1;
    background: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    border-left: 3px solid #084288;
}

#result .metric-box .metric-value {
    font-size: 20px;
    font-weight: bold;
    color: #084288;
}

#result .metric-box .metric-label {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}

#result .chart-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

#result .chart-title {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}

#result .chart-visual {
    position: relative;
    height: 120px;
    background: linear-gradient(to right, #ffebee 0%, #ffebee 50%, #e8f5e9 50%, #e8f5e9 100%);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

#result .chart-visual .break-even-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #084288;
    transform: translateX(-50%);
}

#result .chart-visual .break-even-marker {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #084288;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

#result .chart-visual .zone-label {
    position: absolute;
    top: 10px;
    font-size: 12px;
    font-weight: bold;
}

#result .chart-visual .loss-zone {
    left: 15px;
    color: #c62828;
}

#result .chart-visual .profit-zone {
    right: 15px;
    color: #2e7d32;
}

#result .chart-visual .current-marker {
    position: absolute;
    bottom: 10px;
    transform: translateX(-50%);
    background: #ffc107;
    color: #333;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

#result .profit-scenarios {
    margin-top: 15px;
}

#result .profit-scenarios h4 {
    font-size: 14px;
    color: #084288;
    margin-bottom: 10px;
}

#result .scenario-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#result .scenario-table th,
#result .scenario-table td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

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

#result .scenario-table tr:nth-child(even) {
    background: #f9f9f9;
}

#result .scenario-table .profit {
    color: #28a745;
    font-weight: bold;
}

#result .scenario-table .loss {
    color: #dc3545;
    font-weight: bold;
}

#result .safety-indicator {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

#result .safety-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

#result .safety-fill {
    height: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    transition: width 0.5s ease;
}

#result .safety-fill.safe {
    background: linear-gradient(90deg, #28a745, #20c997);
}

#result .safety-fill.caution {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

#result .safety-fill.danger {
    background: linear-gradient(90deg, #dc3545, #fd7e14);
}

.help-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    cursor: help;
    color: #084288;
    font-size: 14px;
    position: relative;
}

.help-icon:hover .disclaimer {
    display: block;
}

.disclaimer {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    padding: 15px;
    width: 300px;
    z-index: 1;
    left: 50%;
    transform: translateX(-50%);
    top: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-size: 13px;
}

.disclaimer p {
    margin: 5px 0;
}
