/* 建物色彩管理システム用CSS（折りたたみ対応版） */

.color-control-panel {
    position: fixed;
    top: 10px;
    right: 20px;
    width: 320px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85), rgba(30, 30, 30, 0.9));
    border-radius: 15px;
    padding: 20px;
    font-family: 'Arial', sans-serif;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
    transition: all 0.3s ease;
}

/* 折りたたみ時のスタイル */
.color-control-panel.collapsed {
    width: 320px;
    max-height: 80px;
    overflow: hidden;
}

.color-control-panel:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.color-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* 折りたたみ時はボーダーを非表示 */
.color-control-panel.collapsed .color-panel-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.color-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ヘッダーボタン群 */
.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 折りたたみボタン */
.collapse-btn {
    background: linear-gradient(45deg, #ffa726, #ff7043);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 167, 38, 0.3);
}

.collapse-btn:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 167, 38, 0.4);
}

.toggle-colors-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.toggle-colors-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.toggle-colors-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #ee5a5a);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* パネルコンテンツ */
.panel-content {
    transition: all 0.2s ease;
    opacity: 1;
    transform: translateY(0);
}

/* 折りたたみ時のコンテンツ非表示 */
.color-control-panel.collapsed .panel-content {
    display: none;
}

.layer-color-controls {
    margin-bottom: 25px;
}

.layer-group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.layer-group:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.layer-header label {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

.remove-layer-btn {
    background: rgba(255, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.remove-layer-btn:hover {
    background: rgba(255, 0, 0, 0.9);
    transform: scale(1.1);
}

.color-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-selector input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.color-selector input[type="color"]:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.color-preview {
    width: 60px;
    height: 20px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    transition: all 0.3s ease;
}

.variation-global-controls {
    margin-bottom: 25px;
}

.variation-global-controls h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #fff;
    font-weight: bold;
}

.variation-intensity label {
    font-size: 12px;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.variation-intensity input[type="range"] {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.variation-intensity input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.variation-intensity input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.randomize-btn {
    background: linear-gradient(45deg, #ff9800, #f57c00);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 100%;
}

.randomize-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.preset-colors {
    margin-bottom: 25px;
}

.preset-colors h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #fff;
    font-weight: bold;
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 8px;
    border-radius: 8px;
    color: white;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.layer-threshold-controls {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.layer-threshold-controls h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #fff;
    font-weight: bold;
}

.threshold-group {
    margin-bottom: 12px;
}

.threshold-group label {
    font-size: 12px;
    color: #ccc;
    display: block;
    margin-bottom: 5px;
}

.threshold-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}

.threshold-inputs input[type="number"] {
    width: 60px;
    padding: 4px 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 12px;
}

.threshold-inputs span {
    font-size: 12px;
    color: #ccc;
}

.add-layer-btn, .reset-layers-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    color: white;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px 5px 0 0;
}

.add-layer-btn:hover, .reset-layers-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .color-control-panel {
        width: 280px;
        right: 10px;
        top: 60px;
        font-size: 12px;
        max-height: 70vh;
    }
    
    .color-control-panel.collapsed {
        width: 240px;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .color-selector input[type="color"] {
        width: 35px;
        height: 35px;
    }
}

/* アニメーション効果 */
@keyframes colorPulse {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

.toggle-colors-btn.active {
    animation: colorPulse 2s infinite;
}

.preset-message {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}-group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.height-group:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.height-group label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
}

.color-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.color-selector input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.color-selector input[type="color"]:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.color-preview {
    width: 60px;
    height: 20px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    transition: all 0.3s ease;
}

.variation-controls {
    margin-top: 10px;
}

.variation-controls label {
    font-size: 12px;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.variation-controls input[type="range"] {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.variation-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.variation-controls input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.preset-colors {
    margin-bottom: 25px;
}

.preset-colors h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #fff;
    font-weight: bold;
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 8px;
    border-radius: 8px;
    color: white;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.height-threshold-controls {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.height-threshold-controls h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #fff;
    font-weight: bold;
}

.threshold-group {
    margin-bottom: 12px;
}

.threshold-group label {
    font-size: 12px;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.threshold-group input[type="range"] {
    width: 120px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.threshold-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a5a);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* スクロールバーのカスタマイズ */
.color-control-panel::-webkit-scrollbar {
    width: 6px;
}

.color-control-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.color-control-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 3px;
}

.color-control-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #764ba2, #667eea);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .color-control-panel {
        width: 280px;
        right: 10px;
        top: 60px;
        font-size: 12px;
        max-height: 70vh;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .color-selector input[type="color"] {
        width: 35px;
        height: 35px;
    }
}

/* アニメーション効果 */
@keyframes colorPulse {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

.toggle-colors-btn.active {
    animation: colorPulse 2s infinite;
}

/* プリセットメッセージのアニメーション */
.preset-message {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}