
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #333;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.hidden {
    display: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 25px;
    position: relative;
    overflow: hidden;
}

header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eaeaea;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.description {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 1.1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.sliders {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    justify-content: center;
    margin-bottom: 2em;
    padding: 10px 5px;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.control-group {
    display: flex;
    flex-wrap: nowrap;
    flex: 1;
    min-width: 250px;
    align-items: center;
    gap: .8em;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #34495e;
    font-size: 1.1rem;
    text-align: end;
}

.value-label {
    font-size: 1.1rem;
    text-wrap: nowrap;
    margin-bottom: 8px;
}

input[type="range"] {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: #93beda;
    outline: none;
    border-radius: 5px;
    margin-bottom: 10px;
    flex-grow: 0;
    flex-shrink: 2;
    margin-top: .3em;
}

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

.value-display {
    text-align: center;
    font-weight: bold;
    color: #2980b9;
    font-size: 1.2rem;
    padding: 5px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.visualization-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
}

.container-vis-section {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.container-wrapper {
    position: relative;
    width: 250px;
}

.pressure-gauge {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 90px;
    background: white;
    border: 3px solid #34495e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.4rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    /* z-index: 5; */
}

.pressure-stem {
    top: 40px;
    width: 40px;
    height: 40px;
    background: white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border: 3px solid #34495e;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.container-vis {
    position: relative;
    height: 300px;
    width: 200px;
    border: 3px solid #34495e;
    border-radius: 8px;
    background: #ecf0f1;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: auto;
    margin-top: 70px;
}

.water {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to bottom, #3498db, #2980b9);
    transition: height 0.5s ease;
}

.air {
    position: absolute;
    width: 100%;
    transition: height 0.5s ease, background-color 0.5s ease;
}

.chart-section {
    /* flex: 1 0 0%; */
    display: flex;
    flex-direction: column;
    min-width: 500px;
    max-width: 0%;
    align-items: center;
}

.chart-title {
    text-align: center;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: bold;
}

#plotly-chart {
    flex: 1;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-height: 350px;
    width: 500px;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* Hamburger Menu */
.hamburger-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}
.menu-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: #3498db;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s;
}
.menu-btn:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}
.menu-btn i {
    color: white;
    font-size: 24px;
}
.menu-content {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border-radius: 5px;
    overflow: hidden;
    z-index: 1000;
}
.menu-content.show {
    display: block;
    animation: fadeIn 0.3s;
}
.menu-item {
    margin: 1em;
    background-color: #3498db;
    border-radius: .5em;
    color: white;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
}
.menu-item:hover {
    background-color: #67aedd;
}
.menu-item i {
    margin-left: 5px;
    margin-right: 10px;
    color: #ffffff;
}


/* Modal Dialogs */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
    overflow-y: auto;
}
.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 800px;
    position: relative;
    animation: slideIn 0.3s;
}
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}
.close-btn:hover {
    color: #333;
}
.modal-header {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}
.modal-header h2 {
    margin: 0;
    color: #2c3e50;
}
.modal-body {
    padding: 10px 0;
    line-height: 1.6;
}

/* Menu items */
.menu-items {
    position: absolute;
    top: 60px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 10;
    overflow: hidden;
}

.menu-items.show {
    display: block;
}

.menu-items button {
    display: block;
    width: 100%;
    padding: 15px 25px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1.1rem;
    color: #2c3e50;
}

.menu-items button:hover {
    background: #f5f7fa;
}

@media (max-width: 800px) {
    .visualization-container {
        flex-direction: column;
    }
    
    .sliders {
        flex-direction: column;
        gap: 20px;
    }
    
    .container-wrapper {
        width: 200px;
    }
    
    .container-vis {
        width: 180px;
        height: 250px;
    }
}
