* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #0f1419;
    color: #e7e9ea;
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    text-align: center;
    margin-bottom: 15px;
    color: #fff;
    font-size: 1.5rem;
}

.calculator {
    display: flex;
    gap: 30px;
    background: #1a1f26;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    padding: 20px 25px;
    border: 1px solid #2f3640;
    flex: 1;
    min-height: 0;
}

.form-section {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
}

.chart-section {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #a0a8b0;
    font-size: 0.9rem;
}

.form-group input[type="number"],
.form-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #2f3640;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, background-color 0.2s;
    background-color: #252b34;
    color: #e7e9ea;
}

.form-group input[type="number"]:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    background-color: #2a323c;
}

.form-group input[type="number"]::placeholder,
.form-group input[type="text"]::placeholder {
    color: #6b7280;
}

.input-with-select {
    display: flex;
    gap: 10px;
}

.input-with-select input {
    flex: 1;
}

.input-with-select select {
    flex: 0 0 90px;
    padding: 8px 8px;
    border: 2px solid #2f3640;
    border-radius: 6px;
    font-size: 13px;
    background: #252b34;
    color: #e7e9ea;
    cursor: pointer;
    transition: border-color 0.2s;
}

.input-with-select select:focus {
    outline: none;
    border-color: #3498db;
}

.input-with-select select option {
    background: #252b34;
    color: #e7e9ea;
}

.results {
    margin-top: auto;
    padding-top: 12px;
    border-top: 2px solid #2f3640;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #2f3640;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: #8b949e;
    font-weight: 500;
    font-size: 0.85rem;
}

.result-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: #58a6ff;
}

#chart {
    width: 100% !important;
    height: 100% !important;
}

.site-footer {
    text-align: center;
    padding: 15px 20px;
    border-top: 1px solid #2f3640;
}

.site-footer form {
    display: inline-block;
}

.site-footer input[type="image"] {
    height: 40px;
    width: auto;
    cursor: pointer;
    transition: opacity 0.2s;
}

.site-footer input[type="image"]:hover {
    opacity: 0.8;
}

/* Desktop: keep no scroll */
@media (min-width: 901px) {
    body {
        height: 100vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .container {
        flex: 1;
        min-height: 0;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .calculator {
        flex-direction: column;
    }

    .form-section {
        flex: none;
        width: 100%;
    }

    .chart-section {
        min-height: 350px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }

    .calculator {
        padding: 20px;
    }
}
