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

body {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, 'Courier New', monospace;
    background: #f5f5f5;
    color: #1a1a1a;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    margin-bottom: 32px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    color: #F44336;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: #666666;
}

h2 {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 12px;
}

h3 {
    font-size: 15px;
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 12px;
}

/* Input Section */
.input-section {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.input-row:last-of-type {
    margin-bottom: 0;
}

.input-row-with-toggle {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 16px;
}

.input-row-multi {
    display: flex;
    gap: 16px;
    flex: 1;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.toggle-group {
    display: flex;
    align-items: flex-end;
    padding-bottom: 10px;
}

label {
    font-size: 13px;
    color: #555555;
    font-weight: 500;
}

.input-field {
    background: #ffffff;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    padding: 10px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #1a1a1a;
    transition: all 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.15);
}

.input-field:hover {
    border-color: #0066cc;
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.unit {
    font-size: 13px;
    color: #666666;
    font-weight: 500;
    white-space: nowrap;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #1a1a1a;
}

.radio-label input[type="radio"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* Plot Button */
.plot-button {
    width: 100%;
    background: #0066cc;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.plot-button:hover {
    background: #0052a3;
}

.plot-button:active {
    transform: translateY(1px);
}

.plot-button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* Error Message */
.error-message {
    background: #ffe6e6;
    border: 1px solid #ff4444;
    border-radius: 4px;
    padding: 12px;
    margin-top: 16px;
    font-size: 13px;
    color: #cc0000;
}

/* Results Section */
.results-section {
    background: #f0f7ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: 12px;
}

.results-header:hover {
    opacity: 0.8;
}

.results-header h3 {
    margin-bottom: 0;
}

.collapse-indicator {
    font-size: 14px;
    color: #0066cc;
    transition: transform 0.2s;
}

.results-section.collapsed .collapse-indicator {
    transform: rotate(-90deg);
}

.results-section.collapsed .results-display {
    display: none;
}

.results-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.results-display p {
    margin: 0;
    padding: 6px 0;
}

.results-display strong {
    color: #0066cc;
    font-weight: 600;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.chart-wrapper {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chart-wrapper h2 {
    margin-bottom: 16px;
}

.chart-wrapper canvas {
    max-height: 500px;
}

/* Back Link */
.back-link {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.back-link a {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.back-link a:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .container {
        max-width: 100%;
    }

    h1 {
        font-size: 24px;
    }

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

    .input-row-with-toggle {
        flex-direction: column;
        align-items: flex-start;
    }

    .toggle-group {
        padding-bottom: 0;
        padding-top: 8px;
    }

    .radio-group {
        gap: 12px;
    }

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

    .chart-wrapper {
        padding: 16px;
    }
}
