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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 20px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.controls-panel {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.condition-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.tab-button {
    background: #e0e0e0;
    border: none;
    padding: 10px 15px;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.tab-button.active {
    background: #4CAF50;
    color: white;
}

.tab-button:hover {
    background: #45a049;
    color: white;
}

.condition-panel {
    display: none;
}

.condition-panel.active {
    display: block;
}

.comparison-section {
    margin-top: 20px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 1px solid #b0d4f1;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.condition-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.condition-card h4 {
    color: #4CAF50;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.condition-summary {
    font-size: 0.9em;
    margin-bottom: 5px;
}

.condition-summary .label {
    font-weight: bold;
    color: #666;
}

.condition-summary .value {
    color: #333;
}

.chart-panel {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

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

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

.results-section {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.results-section h3 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 1.4em;
}

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

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

.result-label {
    font-weight: bold;
    color: #333;
}

.result-value {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #4CAF50;
    font-size: 1.1em;
}

#psychroChart {
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    max-width: 800px;
    height: 600px;
}

.chart-title {
    text-align: center;
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
}

@media (max-width: 1024px) {
    .top-section {
        grid-template-columns: 1fr !important;
    }

    .header h1 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .main-content {
        padding: 15px;
    }
}

.legend {
    margin-top: 15px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    font-size: 0.9em;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.legend-color {
    width: 20px;
    height: 3px;
    margin-right: 10px;
    border-radius: 2px;
}

.calculations-section {
    background: #f8f9fa;
    padding: 30px;
    margin-top: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.calculations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.calculations-section h2 {
    color: #333;
    margin: 0;
    font-size: 1.8em;
}

.learn-more-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.learn-more-btn:hover {
    background: #45a049;
}

.calculations-content {
    transition: all 0.3s ease;
}

.calculations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.calc-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calc-card h3 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
}

.calc-item {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.calc-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.calc-item strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.calc-item p {
    color: #666;
    margin: 5px 0;
    line-height: 1.4;
}

.formula {
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #333;
    margin: 5px 0;
    border-left: 3px solid #4CAF50;
}

.unit {
    color: #666;
    font-style: italic;
    font-size: 0.9em;
}

.note {
    font-size: 0.85em;
    color: #777;
    font-style: italic;
}

/* Toggle Controls */
.toggle-controls {
    margin-bottom: 25px;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.toggle-controls h3 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 1.1rem;
}

.toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 25px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: #2196F3;
}

input:focus+.toggle-slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked+.toggle-slider:before {
    transform: translateX(25px);
}

.toggle-label {
    font-weight: 500;
    color: #495057;
}

/* Condition tabs */
.condition-tabs {
    display: flex;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    background: #fff;
    border: none;
    border-right: 1px solid #dee2e6;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-button:last-child {
    border-right: none;
}

.tab-button:hover {
    background: #e9ecef;
}

.tab-button.active {
    background: #007bff;
    color: white;
}

/* Condition panels */
.condition-panel {
    display: none;
    padding: 2px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.condition-panel.active {
    display: block;
}