/* Fence Visualizer Styles */

.fence-visualizer-wrapper {
    position: relative;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.visualizer-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(31, 41, 55, 0.95);
    border-bottom: 1px solid #374151;
    padding: 20px;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.visualizer-header h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #fff;
}

.visualizer-header p {
    font-size: 13px;
    color: #9CA3AF;
    margin: 0;
}

.visualizer-container {
    display: flex;
    height: 100%;
    width: 100%;
    padding-top: 80px;
}

.canvas-container {
    flex: 1;
    background: #1a1a1a;
    position: relative;
    min-height: 400px;
    cursor: grab;
}

.canvas-container:active {
    cursor: grabbing;
}

.canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.canvas-container::before {
    content: '← Left Click + Drag to Rotate | Right Click + Drag to Move | Scroll to Scale →';
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 11px;
    pointer-events: none;
    z-index: 5;
}

.control-panel {
    width: 320px;
    background: #1f2937;
    border-left: 1px solid #374151;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.control-group {
    margin-bottom: 24px;
}

.control-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-sizing: border-box;
}

.btn-upload {
    border: 2px dashed #4B5563;
    background: transparent;
    color: #fff;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    width: 100%;
    display: block;
}

.btn-upload:hover {
    border-color: #3B82F6;
    background: rgba(59, 130, 246, 0.1);
}

.btn-style {
    background: #374151;
    color: #fff;
    width: 100%;
}

.btn-style:hover {
    background: #4B5563;
}

.btn-style.active {
    background: #3B82F6;
    color: #fff;
}

.btn-reset {
    background: #DC2626;
    color: #fff;
    width: 100%;
    margin-top: 12px;
}

.btn-reset:hover {
    background: #B91C1C;
}

.color-picker-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.color-picker {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.color-value {
    font-size: 13px;
    color: #9CA3AF;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #4B5563;
    outline: none;
    -webkit-appearance: none;
    margin: 8px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3B82F6;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #2563EB;
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3B82F6;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #2563EB;
    transform: scale(1.2);
}

.slider-value {
    font-size: 13px;
    color: #9CA3AF;
    margin-top: 8px;
}

input[type="file"] {
    display: none;
}

.upload-text {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 8px;
    display: block;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .visualizer-container {
        flex-direction: column;
    }

    .control-panel {
        width: 100%;
        height: auto;
        max-height: 300px;
        border-left: none;
        border-top: 1px solid #374151;
    }

    .canvas-container {
        flex: 1;
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .visualizer-header {
        padding: 12px;
    }

    .visualizer-header h2 {
        font-size: 18px;
    }

    .visualizer-header p {
        font-size: 12px;
    }

    .control-panel {
        padding: 12px;
    }

    .control-label {
        font-size: 11px;
    }
}