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

body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, rgb(16, 16, 16), rgb(6, 6, 6));
color: #e0e0e0;
min-height: 100vh;
display: flex;
flex-direction: column;
}

.header {
text-align: center;
padding: 20px;
background: rgba(0, 0, 0, 0.3);
border-bottom: 2px solid #4caf50;
}

.header h1 {
color: #4caf50;
font-size: 2.5em;
margin-bottom: 10px;
text-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.container {
display: flex;
flex: 1;
gap: 20px;
padding: 20px;
}

.canvas-container {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}

#canvas {
}

.controls {
width: 900px;
background: rgba(255, 255, 255, 0.05);
border-radius: 20px;
padding: 25px;
height: fit-content;
border: 1px solid rgba(76, 175, 80, 0.3);
display: flex;
flex-direction: column;
flex-wrap: wrap;
max-height: 900px;
gap: 20px;
}

.control-group {
margin-bottom: 25px;
flex: 1;
min-width: 200px;
overflow-y: auto;
}

.control-group h3 {
margin-bottom: 15px;
color: #4caf50;
font-size: 18px;
font-weight: 600;
border-bottom: 2px solid rgba(76, 175, 80, 0.3);
padding-bottom: 8px;
}

.control-item {
margin-bottom: 15px;
}

.control-item label {
display: block;
margin-bottom: 8px;
font-size: 14px;
color: #e0e0e0;
font-weight: 500;
}

.control-item input[type="range"] {
width: 100%;
height: 8px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.1);
outline: none;
-webkit-appearance: none;
}

.control-item input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 20px;
height: 20px;
border-radius: 50%;
background: #4caf50;
cursor: pointer;
box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Стили для всех слайдеров в приложении (включая динамически созданные) */
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 20px;
height: 20px;
border-radius: 50%;
background: #4caf50;
cursor: pointer;
box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Firefox */
input[type="range"]::-moz-range-thumb {
width: 20px;
height: 20px;
border-radius: 50%;
background: #4caf50;
cursor: pointer;
border: none;
box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* IE/Edge */
input[type="range"]::-ms-thumb {
width: 20px;
height: 20px;
border-radius: 50%;
background: #4caf50;
cursor: pointer;
border: none;
box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.control-item input[type="number"] {
width: 100%;
padding: 8px 12px;
border-radius: 8px;
border: 1px solid rgba(76, 175, 80, 0.3);
background: rgba(255, 255, 255, 0.1);
color: #e0e0e0;
font-size: 14px;
}

.control-item select {
width: 100%;
padding: 8px 12px;
border-radius: 8px;
border: 1px solid rgba(76, 175, 80, 0.3);
background: rgba(255, 255, 255, 0.1);
color: #e0e0e0;
font-size: 14px;
}

.checkbox-item {
display: flex;
align-items: center;
margin-bottom: 10px;
}

.checkbox-item input[type="checkbox"] {
margin-right: 10px;
width: 18px;
height: 18px;
accent-color: #4caf50;
}

.checkbox-item label {
font-size: 14px;
color: #e0e0e0;
cursor: pointer;
}

.value-display {
font-size: 12px;
color: #4caf50;
margin-top: 5px;
font-weight: 600;
}

.button-group {
display: flex;
gap: 10px;
margin-top: 20px;
}

.btn {
flex: 1;
padding: 12px;
border: none;
border-radius: 10px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 1px;
}

.btn-primary {
background: linear-gradient(45deg, #4caf50, #45a049);
color: white;
}

.btn-secondary {
background: linear-gradient(45deg, #2196f3, #1976d2);
color: white;
}

.btn:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.layers-preview {
margin-top: 20px;
padding: 15px;
background: rgba(0, 0, 0, 0.2);
border-radius: 10px;
border: 1px solid rgba(76, 175, 80, 0.2);
}

.layer-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.layer-info {
font-size: 12px;
color: #b0b0b0;
}

.loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #4caf50;
font-size: 18px;
font-weight: 600;
}

.status {
position: absolute;
bottom: 20px;
left: 20px;
background: rgba(0, 0, 0, 0.8);
padding: 10px 15px;
border-radius: 8px;
font-size: 12px;
color: #4caf50;
border: 1px solid rgba(76, 175, 80, 0.3);
}