.expression-demo {
    background: var(--card-bg);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.demo-canvas-wrap {
    position: relative;
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.demo-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.demo-replay-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #aaa;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.demo-replay-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.demo-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.demo-control-group {
    flex: 1;
    min-width: 140px;
}

.demo-control-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.demo-value {
    color: #fff;
    font-size: 0.8rem;
    font-family: 'Monaco', 'Menlo', monospace;
}

.demo-control-group input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #333;
    border-radius: 2px;
    outline: none;
}

.demo-control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.demo-control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #3392e2;
}

.demo-control-group input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .demo-canvas-wrap {
        height: 200px;
    }

    .demo-control-group {
        min-width: 100%;
    }
}
