/* Стили для панели настроек */

#controls {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 280px;
    max-width: 320px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#controls.collapsed {
    transform: translateX(-260px);
    opacity: 0.9;
}

#controls-toggle-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #6a5acd, #483d8b);
    border: none;
    color: white;
    padding: 12px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 110;
    transition: all 0.3s ease;
    display: none;
}

#controls-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

#controls-toggle-btn.show {
    display: block;
}

#controls-collapse-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    border: none;
    color: #1a1a2e;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 105;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#controls-collapse-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Стилизация скроллбара */
#controls::-webkit-scrollbar {
    width: 8px;
}

#controls::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#controls::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    border-radius: 4px;
}

#controls::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ffb347, #ffd700);
}

.control-group {
    margin-bottom: 20px;
}

.control-group:last-child {
    margin-bottom: 10px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #ffd700;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #4a4a6a, #6a6a8a);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

button {
    background: linear-gradient(135deg, #6a5acd, #483d8b);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

button.active {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #1a1a2e;
}

.value-display {
    color: #87ceeb;
    font-size: 12px;
    margin-top: 5px;
}

.lighting-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

h2 {
    color: #ffd700;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.window-controls, .material-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-subgroup {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-subgroup label {
    font-size: 12px;
    margin-bottom: 3px;
}

select {
    background: linear-gradient(135deg, #4a4a6a, #6a6a8a);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

select:hover {
    background: linear-gradient(135deg, #5a5a7a, #7a7a9a);
}

select option {
    background: #2a2a4a;
    color: white;
}

/* Стили для табов */
.tabs-navigation {
    display: flex;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-btn {
    flex: 1;
    background: rgba(106, 90, 205, 0.3);
    border: none;
    color: #ccc;
    padding: 12px 8px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    border-radius: 0;
    position: relative;
}

.tab-btn:hover {
    background: rgba(106, 90, 205, 0.5);
    color: #fff;
    transform: none;
    box-shadow: none;
}

.tab-btn.active {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #1a1a2e;
    font-weight: bold;
}

.tab-btn:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Стили для контента табов */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для кнопок окон */
.window-sections-buttons, .window-style-buttons, .window-shape-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* Стили для кнопок рельефа */
.terrain-buttons, .roof-type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.window-section-btn, .window-style-btn, .window-shape-btn, .terrain-btn, .roof-type-btn {
    background: linear-gradient(135deg, #4a4a6a, #6a6a8a);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 70px;
    text-align: center;
}

.window-section-btn:hover, .window-style-btn:hover, .window-shape-btn:hover, .terrain-btn:hover, .roof-type-btn:hover {
    background: linear-gradient(135deg, #5a5a7a, #7a7a9a);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.window-section-btn.active, .window-style-btn.active, .window-shape-btn.active, .terrain-btn.active, .roof-type-btn.active {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #1a1a2e;
    font-weight: bold;
    border-color: #ffd700;
}

/* Стили для полей ввода */
input[type="text"] {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #4a4a6a, #6a6a8a);
    color: white;
    font-size: 14px;
    outline: none;
}

input[type="text"]:focus {
    border-color: #ffd700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
