/* Сброс и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

#widget-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #d0e2ff, #f0f5ff);
}

#threeCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Панель UI */
.draggable-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 420px;
    background: linear-gradient(to bottom, #c7dbff, #dce8ff);
    border: 1px solid #9fb4d6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px;
    overflow-y: auto;
    max-height: calc(100vh - 40px);
    z-index: 1000;
}

.draggable-panel h2 {
    margin: 12px 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: #003366;
    border-bottom: 1px solid #9fb4d6;
    padding-bottom: 4px;
}

/* Элементы управления */
.control-group {
    margin-bottom: 10px;
}

.control-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.control-label {
    flex: 1;
    font-size: 13px;
    color: #1a1f27;
    min-width: 120px;
}

.control-input {
    flex: 2;
    padding: 6px 8px;
    border: 1px solid #9fb4d6;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.control-select {
    flex: 2;
    padding: 6px 8px;
    border: 1px solid #9fb4d6;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.control-button {
    width: 100%;
    padding: 8px 16px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 5px;
    transition: background 0.2s;
}

.control-button:hover {
    background: #3a78c2;
}

.control-button.secondary {
    background: #6c757d;
}

.control-button.secondary:hover {
    background: #5a6268;
}

/* Canvas превью */
.preview-canvas-container {
    margin-top: 10px;
    text-align: center;
}

.preview-canvas {
    border: 1px solid #9fb4d6;
    border-radius: 4px;
    background: #000;
    margin-top: 5px;
}

/* Слайдеры */
.slider-container {
    display: flex;
    align-items: center;
}

.slider-input {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: #c0cce0;
    outline: none;
    margin-right: 10px;
}

.slider-value {
    min-width: 40px;
    font-size: 12px;
    text-align: right;
}

/* Чекбокс */
.checkbox-container {
    display: flex;
    align-items: center;
}

.checkbox-container input {
    margin-right: 6px;
}

/* Заголовок панели */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #9fb4d6;
    margin-bottom: 10px;
    cursor: move;
}

.panel-title {
    font-weight: bold;
    color: #003366;
}

.close-button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.close-button:hover {
    color: #333;
}