:root {
    --primary-color: #007bff; /* Blue */
    --secondary-color: #28a745; /* Green */
    --background-color: #f4f7f6;
    --card-background: #ffffff;
    --text-color: #333;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.calculator-container {
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 30px;
    width: 100%;
    max-width: 900px;
    margin-bottom: 20px;
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2em;
}

h2 {
    color: var(--text-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 25px;
}

/* Input Styling */
.input-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95em;
    color: #555;
}

input[type="number"] {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.1em;
    transition: border-color 0.3s;
}

input[type="number"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}

/* Results Styling */
.results-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.result-box {
    background-color: var(--background-color);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.result-box h3 {
    margin: 0 0 5px 0;
    font-size: 0.9em;
    color: #666;
}

.result-box p {
    font-size: 1.6em;
    font-weight: bold;
    margin: 0;
}

.net-profit p {
    color: var(--secondary-color);
}

.roi p {
    color: var(--primary-color);
}

.total-costs p {
    color: #dc3545; /* Red for cost awareness */
}

/* Markup Tool Styling */
.markup-tool {
    margin-top: 30px;
    padding: 20px;
    border: 2px dashed var(--primary-color);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.markup-tool h2 {
    width: 100%;
    margin-top: 0;
    border-bottom: none;
}

.markup-tool p:first-of-type {
    width: 100%;
    margin-bottom: 10px;
    color: #777;
}

.markup-tool .half-width {
    flex-grow: 1;
    min-width: 200px;
}

.highlight-result {
    background-color: #e9f7ee; /* Light green background */
    color: var(--secondary-color);
    font-size: 1.8em !important;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    min-height: 48px; /* Maintain height */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Utility and Footer */
hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), var(--primary-color), rgba(0, 0, 0, 0));
    margin: 30px 0;
}

footer {
    padding: 10px;
    text-align: center;
    color: #888;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .calculator-container {
        padding: 20px;
    }

    .results-section {
        grid-template-columns: 1fr 1fr; /* Two per row on small screens */
    }

    .markup-tool {
        flex-direction: column;
        align-items: stretch;
    }
}