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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.pressure-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 600;
}

header .subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

main {
    padding: 30px;
}

.visualization-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.map-panel,
.info-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.map-display,
.conditions-display,
.forecast-display {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.map-display h3,
.conditions-display h3,
.systems-display h3,
.forecast-display h3,
.applications-display h3 {
    color: #1e3a5f;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
}

#weatherCanvas {
    width: 100%;
    height: 400px;
    background: linear-gradient(180deg, #87ceeb 0%, #e0f4ff 100%);
    border-radius: 8px;
    border: 2px solid #1e3a5f;
    display: block;
}

.map-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.legend-symbol {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

.legend-symbol.H {
    background: #4a90d9;
    color: white;
}

.legend-symbol.L {
    background: #e74c3c;
    color: white;
}

.legend-line {
    width: 30px;
    height: 3px;
    background: #2c3e50;
}

.legend-arrow {
    font-size: 1.2em;
    color: #2c3e50;
}

.conditions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.condition-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.condition-item span:first-child {
    font-weight: 600;
    color: #1e3a5f;
}

.condition-item span:last-child {
    color: #2d5a87;
    font-weight: 700;
}

.system-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid;
}

.system-info.high {
    border-left-color: #4a90d9;
}

.system-info.low {
    border-left-color: #e74c3c;
}

.system-info h4 {
    color: #1e3a5f;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.system-features {
    list-style: none;
    padding: 0;
}

.system-features li {
    padding: 6px 0;
    font-size: 0.95em;
    color: #495057;
    position: relative;
    padding-left: 20px;
}

.system-features li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #2d5a87;
    font-weight: bold;
}

.forecast-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.forecast-item {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.weather-icon {
    font-size: 1.5em;
}

.applications-list {
    list-style: none;
    padding: 0;
}

.applications-list li {
    padding: 10px 0;
    font-size: 0.95em;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

.applications-list li:last-child {
    border-bottom: none;
}

.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.systems-info-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.systems-info-panel h3 {
    color: #1e3a5f;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
}

.applications-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.applications-display {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.applications-display h3 {
    color: #1e3a5f;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
}

.preset-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preset-buttons .preset-btn {
    margin-bottom: 0;
}

.controls-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.controls-panel h3 {
    color: #1e3a5f;
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 600;
}

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

.control-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.control-section h3 {
    color: #1e3a5f;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.control-group {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.control-group h4 {
    color: #2d5a87;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
}

.control-group label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.9em;
    color: #495057;
}

.control-group input[type="range"] {
    width: 100%;
    margin-bottom: 8px;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a90d9;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a90d9;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.checkbox-input {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-input:checked {
    background-color: #4a90d9;
    border-color: #4a90d9;
}

.preset-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.preset-btn:active {
    transform: translateY(0);
}

.button-group {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.control-button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.control-button.start {
    background: #28a745;
    color: white;
}

.control-button.start:hover {
    background: #218838;
    transform: translateY(-2px);
}

.control-button.pause {
    background: #ffc107;
    color: #212529;
}

.control-button.pause:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.control-button.reset {
    background: #dc3545;
    color: white;
}

.control-button.reset:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.formulas-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.formulas-section h3 {
    color: #1e3a5f;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
}

.formula-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.formula-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #4a90d9;
}

.formula-label {
    display: block;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.formula {
    display: block;
    color: #2d5a87;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
}

.explanation {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.explanation h2 {
    color: #1e3a5f;
    margin-bottom: 15px;
    font-size: 1.8em;
    font-weight: 600;
}

.explanation h3 {
    color: #2d5a87;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.4em;
    font-weight: 600;
}

.explanation p {
    line-height: 1.8;
    color: #495057;
    margin-bottom: 15px;
}

.explanation strong {
    color: #1e3a5f;
    font-weight: 600;
}

@media (max-width: 968px) {
    .visualization-layout {
        grid-template-columns: 1fr;
    }

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

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

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

    header h1 {
        font-size: 1.5em;
    }

    .button-group {
        flex-direction: column;
    }

    .control-button {
        width: 100%;
    }
}

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

    main {
        padding: 15px;
    }

    header {
        padding: 20px;
    }

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

    .formula-list {
        grid-template-columns: 1fr;
    }
}