body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    background: linear-gradient(to bottom, #1a4d2e 0%, #4f9d69 100%);
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

* {
    box-sizing: border-box;
}

.main-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
    flex-wrap: wrap;
}

.container {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    flex: 1;
    min-width: 320px;
    max-width: 850px;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: clamp(1.2rem, 4vw, 2rem);
}

.window-svg {
    width: 100%;
    height: auto;
    max-width: 800px;
    margin: 20px auto;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #e8f4f8;
    display: block;
}

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

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: clamp(14px, 2vw, 18px);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 80px;
    flex: 1;
}

button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

#upBtn {
    background: #e74c3c;
}

#upBtn:hover:not(:disabled) {
    background: #c0392b;
}

#downBtn {
    background: #27ae60;
}

#downBtn:hover:not(:disabled) {
    background: #229954;
}

.slider-container {
    margin-top: 20px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 8px;
}

.slider-label {
    font-size: clamp(12px, 2vw, 14px);
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

input[type="range"] {
    width: 100%;
    max-width: 300px;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
}

.value-display {
    display: inline-block;
    margin-left: 10px;
    font-weight: bold;
    color: #3498db;
}

.graph-container {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    flex: 1;
    min-width: 320px;
    max-width: 500px;
}

.graph-container h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: clamp(16px, 3vw, 20px);
}

.graph-canvas {
    width: 100%;
    height: auto;
    max-width: 400px;
    aspect-ratio: 2/3;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #f8f8f8;
    display: block;
    margin: 0 auto;
}

.current-value {
    margin-top: 15px;
    font-size: clamp(14px, 2vw, 18px);
    color: #333;
    font-weight: bold;
}

.current-value span {
    color: #e74c3c;
    font-size: clamp(16px, 2.5vw, 24px);
}

/* Media queries for smaller screens */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .main-layout {
        gap: 20px;
    }
    
    .container, .graph-container {
        padding: 15px;
    }
    
    h1 {
        margin-bottom: 15px;
    }
    
    .controls {
        gap: 10px;
    }
}
