/* Canvas Demo Styles for Interactive Experiments */

/* Main container for canvas demos */
.canvas-demo-container {
    display: flex;
    flex-direction: row;
    margin: 2rem 0 3rem;
    background-color: rgba(10, 12, 16, 0.5);
    border-radius: 8px;
    overflow: visible;
    border: 1px solid rgba(138, 43, 226, 0.2);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Canvas area styles */
.canvas-area {
    flex: 1;
    position: relative;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(16, 21, 27, 0.7);
}

/* Canvas element */
#canvas {
    width: 100%;
    height: 100%;
    max-width: 600px;
    max-height: 600px;
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

/* Overlay for canvas (buttons, etc) */
.canvas-overlay {
    position: absolute;
    bottom: -2rem;
    z-index: 10;
}

/* Control panel area */
.controls-panel {
    position: sticky;
    top: 100px;
    float: right;
    width: 280px;
    background-color: rgba(10, 12, 16, 0.9);
    border-left: 1px solid rgba(138, 43, 226, 0.2);
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
}

/* Control panel scrollbar */
.controls-panel::-webkit-scrollbar {
    width: 6px;
}

.controls-panel::-webkit-scrollbar-track {
    background: rgba(10, 12, 16, 0.5);
}

.controls-panel::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 6px;
}

/* Control panel header */
.controls-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
}

.controls-header h3 {
    margin: 0 0 0.5rem;
    color: var(--text-light);
    font-size: 1.5rem;
}

.license-note {
    font-size: 0.75rem;
    color: var(--text-light);
    opacity: 0.7;
    margin: 0.5rem 0 0;
    line-height: 1.3;
}

.license-note a {
    color: var(--accent);
}

/* Control panel body */
.controls-body {
    padding: 1.5rem;
}

/* Sections in control panel */
.controls-section {
    margin-bottom: 2rem;
}

.controls-section h4 {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.controls-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent);
}

/* Form controls */
.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
}

/* Tooltip for labels */
.form-group label[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 0;
    background-color: rgba(10, 12, 16, 0.95);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(10px);
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.form-group label[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Range input styling */
.form-control-range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(138, 43, 226, 0.2);
    border-radius: 3px;
    outline: none;
}

.form-control-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-control-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-control-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.form-control-range::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Value display */
.value-display {
    display: flex;
    justify-content: flex-end;
    font-size: 0.85rem;
    color: var(--accent);
    margin-top: 0.25rem;
    font-family: 'Fira Mono', monospace;
}

/* Math formula styling */
.math-formula {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    padding: 1rem;
    background-color: rgba(10, 12, 16, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(138, 43, 226, 0.1);
}

/* Image showcase */
.image-showcase {
    margin: 2rem 0;
    text-align: center;
}

.image-caption {
    font-size: 0.9rem;
    color: var(--text-light);
    opacity: 0.8;
    margin-top: 1rem;
    font-style: italic;
}

/* Carousel customization */
.carousel {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    margin: 2rem 0;
}

.carousel-indicators {
    bottom: -3px;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 1rem;
    bottom: 30px;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .canvas-demo-container {
        flex-direction: column;
    }
    
    .controls-panel {
        width: 100%;
        max-height: none;
        border-left: none;
        border-top: 1px solid rgba(138, 43, 226, 0.2);
    }
    
    .canvas-area {
        min-height: 400px;
    }
}

@media (max-width: 767.98px) {
    .canvas-area {
        min-height: 350px;
    }
    
    .controls-header, .controls-body {
        padding: 1rem;
    }
    
    .form-group label[data-tooltip]::after {
        width: 150px;
    }
}
