:root {
    --primary-color: #8B6B43;
    --secondary-color: #D4AF37;
    --accent-color: #C5A572;
    --text-color: #2C2416;
    --border-color: #E6E8F0;
    --background-color: #FAF9F6;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    min-height: 100vh;
    margin: 0 auto;
    padding: 0;
}

.calculator-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    padding: 25px;
    margin: 0;
    min-height: 100vh;
    border-radius: 0;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 25px;
}

h1 {
    color: var(--text-color);
    font-size: 2.4em;
    font-weight: 800;
    margin-bottom: 10px;
}

.subtitle {
    color: #6B5B3D;
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* Input Section Styles */
.input-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 25px;
}

.input-group {
    margin-bottom: 10px;
    position: relative;
}

.input-section {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.input-section-title {
    color: var(--primary-color);
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.input-prefix {
    position: absolute;
    left: 12px;
    top: 42px;
    color: #8B6B43;
}

/* Form Controls */
label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.95em;
    color: #555;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: 48px;
}

input[type="number"] {
    padding-left: 25px;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 107, 67, 0.08);
    background-color: #FFFCF8;
}

select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95em;
    height: 48px;
    background-color: white;
    transition: border-color 0.3s;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml,...");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    cursor: pointer;
}

/* Layout */
.main-content {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 30px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.calculator-controls {
    display: flex;
    align-items: start;
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(139, 107, 67, 0.08);
    margin-bottom: 30px;
    max-width: 1200px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.result-item {
    padding: 15px;
    border-radius: 6px;
    background: linear-gradient(145deg, #fff 0%, #faf6f0 100%);
    min-width: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.result-label {
    font-size: 0.75em;
    color: #8B6B43;
    margin-bottom: 8px;
    font-weight: 600;
}

.result-value {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--accent-color);
    margin: 0 0 8px 0;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 107, 67, 0.1);
}

.info-text {
    margin-top: 8px;
    font-size: 0.85em;
    color: #8B6B43;
}

.input-group:hover .info-text {
    color: var(--accent-color);
}

/* Chart Container */
.chart-container {
    padding: 15px;
    height: 600px;
    min-width: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
}

.right-column {
    display: flex;
    flex-direction: column;
}

/* How It Works Section */
.how-it-works {
    background: #F6F6F4;
    padding: 60px 0;
}

.how-it-works-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.how-it-works h2 {
    color: var(--text-color);
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.step {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: flex-start;
    position: relative;
}

.step-number {
    color: var(--secondary-color);
    font-size: 1.5em;
    font-weight: bold;
    margin-right: 20px;
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--secondary-color);
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step h3 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

/* FAQ Section */
.faq-section {
    background: white;
    padding: 60px 0;
}

.faq-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.faq-content h2 {
    color: var(--text-color);
    font-size: 2em;
    margin-bottom: 40px;
    text-align: center;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.faq-question {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary-color);
    padding: 15px 0;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.faq-question:hover {
    color: var(--accent-color);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
}

.faq-item.active .faq-answer {
    padding: 0 0 20px 0;
    max-height: 500px;
    opacity: 1;
}

/* Footer Styles */
footer {
    background: white;
    padding: 40px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1em;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    line-height: 2;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    color: #666;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .calculator-section {
        padding: 15px;
    }

    h1 {
        font-size: 2em;
    }

    .input-grid {
        grid-template-columns: 1fr;
    }

    .chart-container {
        padding: 10px;
        margin-top: 20px;
        height: calc(50vh - 100px);
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .results-section {
        margin: 30px 0;
    }

    .calculator-controls {
        flex-direction: column;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 1.2em;
    }

    .step::after {
        left: 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .copyright {
        margin-top: 30px;
    }
}

/* Legal Pages Styles */
.legal-section {
    background: white;
    padding: 60px 0;
    min-height: calc(100vh - 200px);
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.legal-content h1 {
    text-align: left;
    margin-bottom: 20px;
}

.last-updated {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 40px;
}

.legal-block {
    margin-bottom: 40px;
}

.legal-block h2 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-bottom: 15px;
}

.legal-block ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.legal-block p {
    margin-bottom: 15px;
    line-height: 1.6;
}