* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

h2 {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 1.5em;
}

h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.calculator-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.input-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.percent-input {
    position: relative;
}

.percent-input input {
    padding-right: 25px;
}

.percent-input::after {
    content: '%';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #2c3e50;
    font-weight: 500;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    width: 100%;
    margin-top: 20px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.results-section {
    padding: 20px;
    position: relative;
}

.results-table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    max-height: 500px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: right;
}

th {
    background-color: #3498db;
    color: white;
    text-align: center;
}

tr:nth-child(even) {
    background-color: #f5f7fa;
}

.subtotal {
    font-weight: bold;
    background-color: #eaf2f8;
}

.valuation-results {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.valuation-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.valuation-item.total {
    font-weight: bold;
    font-size: 1.2em;
    color: #2c3e50;
    border-top: 2px solid #3498db;
    border-bottom: none;
    padding-top: 15px;
    margin-top: 10px;
}

.explanation-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    grid-column: 1 / -1;
}

.explanation-steps {
    padding-left: 25px;
}

.explanation-steps li {
    margin-bottom: 20px;
}

.explanation-steps strong {
    color: #3498db;
    display: block;
    margin-bottom: 5px;
}

.explanation-steps p {
    margin: 5px 0;
    color: #2c3e50;
    line-height: 1.5;
}

.floating-chart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    padding: 15px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-chart h3 {
    margin-bottom: 10px;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-container {
    height: 200px;
    margin-bottom: 10px;
}

.chart-summary {
    font-size: 0.9em;
    color: #555;
    line-height: 1.4;
}

.chart-summary strong {
    color: #3498db;
}

.close-chart {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0;
    margin: 0;
    width: auto;
}

.close-chart:hover {
    color: #e74c3c;
}

.toggle-chart-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    border: none;
    font-size: 1.5em;
}

.toggle-chart-btn:hover {
    background-color: #2980b9;
}

.chart-arrow {
    position: fixed;
    bottom: 50px;
    right: 80px;
    width: 100px;
    height: 40px;
    z-index: 1000;
}

.hidden {
    display: none;
}

.footer-contact {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    grid-column: 1 / -1;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form button {
    grid-column: 2 / 3;
    justify-self: end;
    width: auto;
    padding: 10px 30px;
}

.form-message {
    grid-column: 1 / -1;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    display: none;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
}

@media (max-width: 1000px) {
    .calculator-section {
        grid-template-columns: 1fr;
    }
}